Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Protractor tests #1063

Closed
mlb6 opened this issue Dec 29, 2014 · 8 comments
Closed

Protractor tests #1063

mlb6 opened this issue Dec 29, 2014 · 8 comments
Milestone

Comments

@mlb6
Copy link

mlb6 commented Dec 29, 2014

It seems there is no e2e tests with Protractor in this project for the moment.
It would be useful to have an example of test for each component. There is some component like "Toast" that does not seem easy to test since DOM Elements can appear for only few seconds.

It could also be nice to have some "Locator" specific to material design components.
For example, the input field in the "Text Field" component is wrapped by md-input-group.
The following:

<md-text-float id="myId" label="Test" > </md-text-float>

is transformed in something like this

<md-input-group id="myId">
  <label for="001">Test</label>
  <input id="001" type="text"/>
</md-input-group>

But in my test I want to be able to get the input element, and not the md-input-group. And as a user of the library I don't want to know how it is implemented because implementation can change.
So it would be very helpful to have a locators like this:

element(by.mdID("myId")) // should return element "md-input-group#myId input"
@EladBezalel
Copy link
Member

I think its related #547

@marcysutton
Copy link
Contributor

👍 to including protractor examples, I'd love to see this.

@ThomasBurleson ThomasBurleson added this to the 0.9.0 milestone Jan 6, 2015
@JJB1980
Copy link

JJB1980 commented Jan 8, 2015

I would like to interact with the button on the dialog component. However protractor can't select the button e.g.
element(by.css('md-actions')).element(by.css('md-primary')).click();

Any ideas?

@marcysutton
Copy link
Contributor

@JJB1980 Are you missing the . for a CSS class?

@marcysutton marcysutton self-assigned this Mar 12, 2015
@marcysutton marcysutton modified the milestones: 0.10.0, 0.9.0 Mar 24, 2015
@bvaughn
Copy link

bvaughn commented Apr 1, 2015

I'd love to see an example of such a test as well. I've been trying (and failing) to write some Protractor tests in a project I'm working on that makes use of Angular Material.

FYI material-start issue #30.

@tkrotoff
Copy link
Contributor

+1

Beside e2e tests, a lot of code is not being unit tested, example: https://github.com/angular/material/blob/v0.9.0-rc2/src/components/gridList/gridList.spec.js

And even with the presence of unit tests for a component, new commits don't come with tests, example: 6c7734e

@ThomasBurleson
Copy link
Contributor

While e2e tests will be provided in the future, they are not currently a priority; our current focus is component implementation, unit tests, performance, and effects.

@ThomasBurleson ThomasBurleson modified the milestones: Backlog, 0.10.0 May 20, 2015
@ThomasBurleson ThomasBurleson modified the milestones: post-1.0 , Backlog Sep 4, 2015
@chayutzee
Copy link

+1

@ThomasBurleson ThomasBurleson modified the milestones: post-1.0 , Backlog Jan 5, 2016
@ThomasBurleson ThomasBurleson modified the milestones: Backlog, Deprecated Apr 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants