Skip to content

Commit 01f1f58

Browse files
Sebastian FlorekSebastian Florek
authored andcommitted
Merge pull request #508 from floreks/integration-text-fix
Fixed test flakiness on application deploy in IE
2 parents c9c1bc1 + c9b9c06 commit 01f1f58

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/app/frontend/deploy/deploy.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ <h3 class="md-headline kd-deploy-form-title">Deploy a Containerized App</h3>
4545
</deploy-from-file>
4646
</div>
4747

48-
<md-button class="md-raised md-primary" type="submit" ng-disabled="ctrl.isDeployDisabled()">
48+
<md-button id="kd-deploy-btn" class="md-raised md-primary" type="submit"
49+
ng-disabled="ctrl.isDeployDisabled()">
4950
Deploy
5051
</md-button>
5152
<md-button class="md-raised" ng-click="ctrl.cancel()">Cancel</md-button>

src/test/integration/deploy/deploy_po.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
export default class DeployPageObject {
1616
constructor() {
17-
this.deployButtonQuery = by.buttonText('Deploy');
17+
this.deployButtonQuery = by.id('kd-deploy-btn');
1818
this.deployButton = element(this.deployButtonQuery);
1919

2020
this.appNameFieldQuery = by.model('ctrl.name');

src/test/integration/stories/deploy_and_delete_replication_controller.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ describe('Deploy and delete replication controller user story test', () => {
6464
});
6565

6666
it('should deploy replication controller', () => {
67-
deployPage.deployButton.click();
68-
69-
expect(browser.getCurrentUrl()).toContain('replicationcontrollers');
70-
expect(element(by.xpath(applicationCardXPath))).not.toBeNull();
67+
deployPage.deployButton.click().then(() => {
68+
expect(browser.getCurrentUrl()).toContain('replicationcontrollers');
69+
expect(element(by.xpath(applicationCardXPath))).not.toBeNull();
70+
});
7171
});
7272

7373
it('should open delete replication controller dialog', () => {

src/test/integration/stories/deploy_not_existing_img_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ describe('Deploy not existing image story', () => {
8080
deployPage.containerImageField.sendKeys(containerImage);
8181

8282
// when
83-
deployPage.deployButton.click();
84-
85-
// then
86-
expect(browser.getCurrentUrl()).toContain('replicationcontrollers');
83+
deployPage.deployButton.click().then(() => {
84+
// then
85+
expect(browser.getCurrentUrl()).toContain('replicationcontrollers');
86+
});
8787
});
8888

8989
it('should wait for card to be in error state', () => {

0 commit comments

Comments
 (0)