From bd8e9d0cca33b77cdfde3230025fa98ec77848da Mon Sep 17 00:00:00 2001 From: Kirill Mashchenko Date: Thu, 27 Apr 2017 15:37:01 +0300 Subject: [PATCH] Fix test_clusters_page tests Adds timeout after creating cluster Change-Id: I6e9bcc674a6090a3aa4b793a13793b0b620b2080 --- static/tests/functional/pages/common.js | 4 ++-- static/tests/functional/test_clusters_page.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/tests/functional/pages/common.js b/static/tests/functional/pages/common.js index 25703a45b..38463d35c 100644 --- a/static/tests/functional/pages/common.js +++ b/static/tests/functional/pages/common.js @@ -53,14 +53,14 @@ class CommonMethods { createCluster(clusterName, stepsMethods) { return this.remote .clickLinkByText('Environments') - .waitForCssSelector('.clusters-page', 2000) + .waitForCssSelector('.clusters-page', 20000) .then(() => this.clustersPage.createCluster(clusterName, stepsMethods)); } removeCluster(clusterName, suppressErrors) { return this.remote .clickLinkByText('Environments') - .waitForCssSelector('.clusters-page', 2000) + .waitForCssSelector('.clusters-page', 20000) .then(() => this.clustersPage.goToEnvironment(clusterName)) .then(() => this.clusterPage.removeCluster(clusterName)) .catch((e) => { diff --git a/static/tests/functional/test_clusters_page.js b/static/tests/functional/test_clusters_page.js index b63745be1..41de7835e 100644 --- a/static/tests/functional/test_clusters_page.js +++ b/static/tests/functional/test_clusters_page.js @@ -35,11 +35,12 @@ registerSuite(() => { }, beforeEach() { return this.remote - .then(() => common.createCluster(clusterName)); + .then(() => common.createCluster(clusterName)) + .waitForCssSelector('.clusters-page', 20000); }, afterEach() { return this.remote - .then(() => common.removeCluster(clusterName)); + .then(() => common.removeCluster(clusterName, true)); }, 'Create Cluster'() { return this.remote