-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(stepper): Add e2e test #6776
Conversation
e2e/components/stepper-e2e.spec.ts
Outdated
import {Key} from 'selenium-webdriver'; | ||
import {screenshot} from '../screenshot'; | ||
|
||
fdescribe('stepper', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fdescribe
src/e2e-app/stepper/stepper-e2e.html
Outdated
@@ -0,0 +1,23 @@ | |||
<button (click)="isLinear=!isLinear" id="toggle-linear">Enable linear</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than creating a new e2e test page, the new preference is to run e2e tests over an example from the material-examples/
package. Check out the card tests as an example of doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than J's comments
e2e/components/stepper-e2e.spec.ts
Outdated
describe('basic behavior', () => { | ||
it('should change steps correctly when stepper button is clicked', async () => { | ||
let previousButton = element.all(by.buttonText('Back')); | ||
let nextButton = element.all(by.buttonText('Next')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: const
Comments have been addressed. Ready for review again 👍 |
<md-step [stepControl]="firstFormGroup"> | ||
<form [formGroup]="firstFormGroup"> | ||
<ng-template mdStepLabel>Step one</ng-template> | ||
Content of step one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make the example a little more "real"? In general, users will get a better idea of how the component works when it more closely represents what they're be doing with it.
(these are the examples that show up on the docs site)
import {FormBuilder, FormGroup, Validators} from '@angular/forms'; | ||
|
||
/** | ||
* @title Stepper overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you have this example, you can add
<!-- example(stepper-overview) -->
To stepper.md
(under the first sentence summary) and it will embed the example.
Modified stepper example for the docs site 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@g1shin please rebase |
@tinayuangao rebase done 👍 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.