From 10f21b8817e0f53cd0bd86b9330f513dbea60b7f Mon Sep 17 00:00:00 2001 From: John Hill Date: Mon, 15 Oct 2018 08:06:58 -0400 Subject: [PATCH] Updating e2e tests to match new settings nav --- .../tests/test-configuration-ldap-fields.js | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/awx/ui/test/e2e/tests/test-configuration-ldap-fields.js b/awx/ui/test/e2e/tests/test-configuration-ldap-fields.js index ab0db09d16..9b5693b5f3 100644 --- a/awx/ui/test/e2e/tests/test-configuration-ldap-fields.js +++ b/awx/ui/test/e2e/tests/test-configuration-ldap-fields.js @@ -1,9 +1,7 @@ module.exports = { 'expected LDAP codemirror fields are rendered when returning from another tab': client => { - const authTab = '#auth_tab'; const authView = 'div[ui-view="auth"]'; const ldapForm = '#configuration_ldap_template_form'; - const systemTab = '#system_tab'; const systemView = 'div[ui-view="system"]'; const { navigation } = client.page.dashboard().section; @@ -14,20 +12,22 @@ module.exports = { navigation .waitForElementVisible('@settings') - .click('@settings'); + .moveToElement('@settings',0,0) + .waitForElementVisible('@settingsSubPaneSystem') + .click('@settingsSubPaneSystem'); - configuration.waitForElementVisible(authView); - - configuration.waitForElementVisible(systemTab); - configuration.click(systemTab); - configuration.waitForElementNotVisible(authView); configuration.waitForElementVisible(systemView); - configuration.waitForElementVisible(authTab); - configuration.click(authTab); - configuration.waitForElementNotVisible(systemView); - configuration.waitForElementVisible(authView); + navigation + .waitForElementVisible('@settings') + .moveToElement('@settings',0,0) + .waitForElementVisible('@settingsSubPane') + .waitForElementVisible('@settingsSubPaneAuth') + .click('@settingsSubPaneAuth'); + configuration.waitForElementVisible(authView); + + // works as xpath const categoryName = `//*[@id="configuration_edit"]/div[1]/div/div/div[4]`; configuration.selectSubcategory('LDAP'); configuration.waitForElementVisible(ldapForm); @@ -41,7 +41,7 @@ module.exports = { 'AUTH_LDAP_TEAM_MAP', ]; - const ldapCodeMirrors = `${ldapForm} div[class^="CodeMirror"] textarea`; + const ldapCodeMirrors = `${ldapForm} div[class^="CodeMirror"] textarea`; client.elements('css selector', ldapCodeMirrors, ({ value }) => { client.assert.equal(value.length, expectedCodemirrorFields.length);