-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(progress-bar): add basic e2e tests (#1895)
Adds basic e2e tests that assert that the different progress bars are being rendered. Referencing #559.
- Loading branch information
1 parent
e332f15
commit 7f37ec1
Showing
7 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
describe('progress-bar', () => { | ||
beforeEach(() => browser.get('/progress-bar')); | ||
|
||
it('should render a determinate progress bar', () => { | ||
shouldExist('md-progress-bar[mode="determinate"]'); | ||
}); | ||
|
||
it('should render a buffer progress bar', () => { | ||
shouldExist('md-progress-bar[mode="buffer"]'); | ||
}); | ||
|
||
it('should render a query progress bar', () => { | ||
shouldExist('md-progress-bar[mode="query"]'); | ||
}); | ||
|
||
it('should render a indeterminate progress bar', () => { | ||
shouldExist('md-progress-bar[mode="indeterminate"]'); | ||
}); | ||
|
||
function shouldExist(selector: string): void { | ||
expect(element(by.css(selector)).isPresent()).toBe(true); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<md-progress-bar mode="determinate" [value]="determinateValue"></md-progress-bar> | ||
<md-progress-bar mode="buffer" [value]="bufferValue"></md-progress-bar> | ||
<md-progress-bar mode="query"></md-progress-bar> | ||
<md-progress-bar mode="indeterminate"></md-progress-bar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
|
||
@Component({ | ||
moduleId: module.id, | ||
selector: 'progress-bar-e2e', | ||
templateUrl: 'progress-bar-e2e.html', | ||
styles: [` | ||
md-progress-bar { | ||
margin-bottom: 10px; | ||
} | ||
`] | ||
}) | ||
export class ProgressBarE2E { | ||
determinateValue: number = 57; | ||
bufferValue: number = 35; | ||
} |