Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit c0edf36

Browse files
Foxandxssnaomiblack
authored andcommitted
fix e2e specs
1 parent bead362 commit c0edf36

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

public/docs/_examples/animations/e2e-spec.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ describe('Animation Tests', () => {
3737
expect(li.getCssValue('backgroundColor')).toBe(INACTIVE_COLOR);
3838

3939
li.click();
40+
browser.driver.sleep(300);
4041
expect(getScaleX(li)).toBe(1.1);
4142
expect(li.getCssValue('backgroundColor')).toBe(ACTIVE_COLOR);
4243

4344
li.click();
45+
browser.driver.sleep(300);
4446
expect(getScaleX(li)).toBe(1.0);
4547
expect(li.getCssValue('backgroundColor')).toBe(INACTIVE_COLOR);
4648
});
@@ -49,7 +51,7 @@ describe('Animation Tests', () => {
4951

5052
describe('styles inline in transitions', () => {
5153

52-
var host: protractor.ElementFinder;
54+
let host: protractor.ElementFinder;
5355

5456
beforeEach(function() {
5557
host = element(by.css('hero-list-inline-styles'));
@@ -58,9 +60,10 @@ describe('Animation Tests', () => {
5860
it('are not kept after animation', () => {
5961
addHero();
6062

61-
var li = host.element(by.css('li'));
63+
let li = host.element(by.css('li'));
6264

6365
li.click();
66+
browser.driver.sleep(300);
6467
expect(getScaleX(li)).toBe(1.0);
6568
expect(li.getCssValue('backgroundColor')).toBe(INACTIVE_COLOR);
6669
});
@@ -84,10 +87,12 @@ describe('Animation Tests', () => {
8487
expect(li.getCssValue('backgroundColor')).toBe(INACTIVE_COLOR);
8588

8689
li.click();
90+
browser.driver.sleep(300);
8791
expect(getScaleX(li)).toBe(1.1);
8892
expect(li.getCssValue('backgroundColor')).toBe(ACTIVE_COLOR);
8993

9094
li.click();
95+
browser.driver.sleep(300);
9196
expect(getScaleX(li)).toBe(1.0);
9297
expect(li.getCssValue('backgroundColor')).toBe(INACTIVE_COLOR);
9398
});
@@ -111,10 +116,12 @@ describe('Animation Tests', () => {
111116
expect(li.getCssValue('backgroundColor')).toBe(INACTIVE_COLOR);
112117

113118
li.click();
119+
browser.driver.sleep(300);
114120
expect(getScaleX(li)).toBe(1.1);
115121
expect(li.getCssValue('backgroundColor')).toBe(ACTIVE_COLOR);
116122

117123
li.click();
124+
browser.driver.sleep(300);
118125
expect(getScaleX(li)).toBe(1.0);
119126
expect(li.getCssValue('backgroundColor')).toBe(INACTIVE_COLOR);
120127
});
@@ -157,9 +164,11 @@ describe('Animation Tests', () => {
157164
expect(li.getCssValue('transform')).toMatch(NO_TRANSFORM_MATRIX_REGEX);
158165

159166
li.click();
167+
browser.driver.sleep(300);
160168
expect(getScaleX(li)).toBe(1.1);
161169

162170
li.click();
171+
browser.driver.sleep(300);
163172
expect(li.getCssValue('transform')).toMatch(NO_TRANSFORM_MATRIX_REGEX);
164173

165174
removeHero();
@@ -232,7 +241,7 @@ describe('Animation Tests', () => {
232241

233242
describe('parallel groups', () => {
234243

235-
var host: protractor.ElementFinder;
244+
let host: protractor.ElementFinder;
236245

237246
beforeEach(() => {
238247
host = element(by.css('hero-list-groups'));
@@ -253,10 +262,12 @@ describe('Animation Tests', () => {
253262

254263
function addHero() {
255264
element(by.buttonText('Add hero')).click();
265+
browser.driver.sleep(500);
256266
}
257267

258268
function removeHero() {
259269
element(by.buttonText('Remove hero')).click();
270+
browser.driver.sleep(500);
260271
}
261272

262273
function getScaleX(el: protractor.ElementFinder) {

0 commit comments

Comments
 (0)