diff --git a/awx/ui/test/e2e/README.md b/awx/ui/test/e2e/README.md index 86ff61f36b..3f31335edb 100644 --- a/awx/ui/test/e2e/README.md +++ b/awx/ui/test/e2e/README.md @@ -4,7 +4,6 @@ docker exec -i tools_awx_1 sh <<-EOSH awx-manage createsuperuser --noinput --username=awx-e2e --email=null@ansible.com awx-manage update_password --username=awx-e2e --password=password - make --directory=/awx_devel DATA_GEN_PRESET=e2e bulk_data EOSH # run all of the tests with a live browser diff --git a/awx/ui/test/e2e/tests/test-credentials-lookup-organization.js b/awx/ui/test/e2e/tests/test-credentials-lookup-organization.js index 5b62fac9ac..948c6693de 100644 --- a/awx/ui/test/e2e/tests/test-credentials-lookup-organization.js +++ b/awx/ui/test/e2e/tests/test-credentials-lookup-organization.js @@ -1,25 +1,32 @@ +import { range } from 'lodash'; + +import { getOrganization } from '../fixtures'; + module.exports = { before: (client, done) => { - const credentials = client.page.credentials(); - const { details } = credentials.section.add.section; + const resources = range(100).map(n => getOrganization(`test-lookup-${n}`)); - client.login(); - client.waitForAngular(); + Promise.all(resources) + .then(() => { + const credentials = client.page.credentials(); + const { details } = credentials.section.add.section; - credentials.section.navigation - .waitForElementVisible('@credentials') - .click('@credentials'); + client.login(); + client.waitForAngular(); - credentials - .waitForElementVisible('div.spinny') - .waitForElementNotVisible('div.spinny'); + credentials.section.navigation.waitForElementVisible('@credentials'); + credentials.section.navigation.click('@credentials'); - credentials.section.list - .waitForElementVisible('@add') - .click('@add'); + credentials.waitForElementVisible('div.spinny'); + credentials.waitForElementNotVisible('div.spinny'); - details - .waitForElementVisible('@save', done); + credentials.section.list.waitForElementVisible('@add'); + credentials.section.list.click('@add'); + + details.waitForElementVisible('@save'); + + done(); + }); }, 'open the lookup modal': client => { const credentials = client.page.credentials();