mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
404 tests for varied resources
This commit is contained in:
parent
006797014c
commit
bcdb590a29
@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
AWX_E2E_URL
|
AWX_E2E_URL,
|
||||||
|
AWX_E2E_TIMEOUT_MEDIUM
|
||||||
} from '../settings';
|
} from '../settings';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -9,12 +10,35 @@ module.exports = {
|
|||||||
.waitForAngular()
|
.waitForAngular()
|
||||||
.resizeWindow(1200, 1000);
|
.resizeWindow(1200, 1000);
|
||||||
},
|
},
|
||||||
'Verify 404 page behavior': client => {
|
'Test that default the 404 behavior redirects to the dashboard': client => {
|
||||||
client.navigateTo(`${AWX_E2E_URL}#/brokenurl`, false);
|
client.navigateTo(`${AWX_E2E_URL}#/brokenurl`, false);
|
||||||
client.useXpath().waitForElementVisible('//job-status-graph');
|
client.useXpath().waitForElementVisible('//job-status-graph');
|
||||||
client.assert.urlContains('#/home');
|
client.assert.urlContains('#/home');
|
||||||
},
|
},
|
||||||
|
'Test 404 modal for job templates': client => {
|
||||||
|
client.navigateTo(`${AWX_E2E_URL}#/templates/job_template/99999`, false);
|
||||||
|
client.expect.element('//*[@id="alert-modal"]')
|
||||||
|
.to.be.visible.after(AWX_E2E_TIMEOUT_MEDIUM);
|
||||||
|
client.findThenClick('//*[@id="alert_ok_btn"]');
|
||||||
|
},
|
||||||
|
'Test 404 modal for workflow job templates': client => {
|
||||||
|
client.navigateTo(`${AWX_E2E_URL}#/templates/workflow_job_template/99999`, false);
|
||||||
|
client.expect.element('//*[@id="alert-modal"]')
|
||||||
|
.to.be.visible.after(AWX_E2E_TIMEOUT_MEDIUM);
|
||||||
|
client.findThenClick('//*[@id="alert_ok_btn"]');
|
||||||
|
},
|
||||||
|
'Test 404 modal for credentials': client => {
|
||||||
|
client.navigateTo(`${AWX_E2E_URL}#/credentials/99999`, false);
|
||||||
|
client.expect.element('//*[@id="alert-modal"]')
|
||||||
|
.to.be.visible.after(AWX_E2E_TIMEOUT_MEDIUM);
|
||||||
|
client.findThenClick('//*[@id="alert_ok_btn"]');
|
||||||
|
},
|
||||||
|
'Test 404 modal for projects': client => {
|
||||||
|
client.navigateTo(`${AWX_E2E_URL}#/projects/99999`, false);
|
||||||
|
client.expect.element('//*[@id="alert-modal"]')
|
||||||
|
.to.be.visible.after(AWX_E2E_TIMEOUT_MEDIUM);
|
||||||
|
client.findThenClick('//*[@id="alert_ok_btn"]');
|
||||||
|
},
|
||||||
after: client => {
|
after: client => {
|
||||||
client.end();
|
client.end();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user