add setup step for org lookup check

This commit is contained in:
Jake McDermott 2018-02-25 15:12:56 -05:00
parent 01a8b2771a
commit c786736688
No known key found for this signature in database
GPG Key ID: 3B02CAD476EECB35
2 changed files with 22 additions and 16 deletions

View File

@ -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

View File

@ -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();