mirror of
https://github.com/ansible/awx.git
synced 2026-04-09 03:59:21 -02:30
Update jobs portal list actions e2e
This commit is contained in:
@@ -7,6 +7,10 @@ let data;
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
before: (client, done) => {
|
before: (client, done) => {
|
||||||
|
client.resizeWindow(1200, 800);
|
||||||
|
client.login();
|
||||||
|
client.waitForAngular();
|
||||||
|
|
||||||
const resources = [
|
const resources = [
|
||||||
getJobTemplateAdmin('test-actions'),
|
getJobTemplateAdmin('test-actions'),
|
||||||
getJob('test-actions'),
|
getJob('test-actions'),
|
||||||
@@ -15,11 +19,6 @@ module.exports = {
|
|||||||
Promise.all(resources)
|
Promise.all(resources)
|
||||||
.then(([admin, job]) => {
|
.then(([admin, job]) => {
|
||||||
data = { admin, job };
|
data = { admin, job };
|
||||||
|
|
||||||
client.login(data.admin.username);
|
|
||||||
client.resizeWindow(1200, 800);
|
|
||||||
client.waitForAngular();
|
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -29,33 +28,29 @@ module.exports = {
|
|||||||
const allJobsButton = '#all-jobs-btn';
|
const allJobsButton = '#all-jobs-btn';
|
||||||
const relaunch = `#job-${data.job.id} i[class*="launch"]`;
|
const relaunch = `#job-${data.job.id} i[class*="launch"]`;
|
||||||
const search = '#portal-container-jobs smart-search input';
|
const search = '#portal-container-jobs smart-search input';
|
||||||
const spinny = 'div.spinny';
|
|
||||||
|
|
||||||
portal.load();
|
portal.load();
|
||||||
|
|
||||||
portal.expect.element(allJobsButton).visible;
|
portal.waitForElementVisible(allJobsButton);
|
||||||
portal.expect.element(allJobsButton).enabled;
|
portal.expect.element(allJobsButton).enabled;
|
||||||
portal.click(allJobsButton);
|
portal.click(allJobsButton);
|
||||||
|
portal.waitForSpinny();
|
||||||
portal.waitForElementVisible(spinny);
|
portal.assert.cssClassPresent(allJobsButton, 'btn-primary');
|
||||||
portal.waitForElementNotVisible(spinny);
|
|
||||||
|
|
||||||
const query = `id:>${data.job.id - 1} id:<${data.job.id + 1}`;
|
const query = `id:>${data.job.id - 1} id:<${data.job.id + 1}`;
|
||||||
|
|
||||||
portal.expect.element(search).visible;
|
portal.waitForElementVisible(search);
|
||||||
portal.expect.element(search).enabled;
|
portal.expect.element(search).enabled;
|
||||||
portal.sendKeys(search, query);
|
portal.sendKeys(search, query);
|
||||||
portal.sendKeys(search, client.Keys.ENTER);
|
portal.sendKeys(search, client.Keys.ENTER);
|
||||||
|
|
||||||
portal.waitForElementVisible(spinny);
|
portal.waitForSpinny();
|
||||||
portal.waitForElementNotVisible(spinny);
|
|
||||||
|
|
||||||
portal.expect.element(relaunch).visible;
|
portal.waitForElementVisible(relaunch);
|
||||||
portal.expect.element(relaunch).enabled;
|
portal.expect.element(relaunch).enabled;
|
||||||
portal.click(relaunch);
|
portal.click(relaunch);
|
||||||
|
|
||||||
portal.waitForElementVisible(spinny);
|
portal.waitForSpinny();
|
||||||
portal.waitForElementNotVisible(spinny);
|
|
||||||
|
|
||||||
const jobDetails = 'at-job-details';
|
const jobDetails = 'at-job-details';
|
||||||
const output = './/span[normalize-space(text())=\'"msg": "Hello World!"\']';
|
const output = './/span[normalize-space(text())=\'"msg": "Hello World!"\']';
|
||||||
|
|||||||
Reference in New Issue
Block a user