Skip to content

test: add class with e2e test utilities #2070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 18, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Dec 3, 2016

  • Adds a class that simplifies some common and hard to remember Protractor expressions.
  • Refactors the existing tests to use the new utilities.

Fixes #2025.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 3, 2016
@crisbeto
Copy link
Member Author

crisbeto commented Dec 3, 2016

This will need a little more work once #2051 is merged.

@crisbeto crisbeto force-pushed the 2025/e2e-utils branch 2 times, most recently from 6184c90 to 34743ce Compare December 6, 2016 20:35
@crisbeto
Copy link
Member Author

Should be good to go now.

@crisbeto
Copy link
Member Author

Can we get this one through @jelbourn? It should make writing e2e tests a little simpler.

/**
* A set of utility functions for writing E2E tests.
*/
export class E2EUtils {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of things I want to rearrange here:

  • I think we should just export / use the standalone functions without them being in a class (similar to coerceBooleanProperty or applyCssTransform in core).
  • I want to avoid having one big "utils" file and instead divide the functions into more tightly-scoped files. I was thinking we could have something util/asserts.ts, util/geometry.ts, util/actions.ts, and util/query.ts

@crisbeto
Copy link
Member Author

crisbeto commented Jan 5, 2017

Split the E2E class into a few smaller files @jelbourn.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just add the "merge ready" label after rebase

# Conflicts:
#	e2e/components/button/button.e2e.ts
#	e2e/components/dialog/dialog.e2e.ts
#	e2e/components/menu/menu-page.ts
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jan 14, 2017
@mmalerba mmalerba merged commit 899f190 into angular:master Jan 18, 2017
kara pushed a commit to kara/material2 that referenced this pull request Jan 20, 2017
* test: add class with e2e test utilities

* Adds a class that simplifies some common and hard to remember Protractor expressions.
* Refactors the existing tests to use the new utilities.

Fixes angular#2025.

* Add types to the e2e utils and fix the selector on the dialog tests.

* Remove unnecessary rounding.

* Remove `any` cast.

* Simplify the slide toggle tests.

* Split the E2E utils class into smaller files.

* Fix a leftover.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a class with e2e test utilities
4 participants