mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
add e2e test for notification template copy
This commit is contained in:
parent
09d3e6cd98
commit
21a32f90ce
50
awx/ui/test/e2e/tests/test-notifications-list-actions.js
Normal file
50
awx/ui/test/e2e/tests/test-notifications-list-actions.js
Normal file
@ -0,0 +1,50 @@
|
||||
import { getNotificationTemplate } from '../fixtures';
|
||||
|
||||
const data = {};
|
||||
|
||||
module.exports = {
|
||||
before: (client, done) => {
|
||||
getNotificationTemplate('test-actions')
|
||||
.then(obj => { data.notification = obj; })
|
||||
.then(done);
|
||||
},
|
||||
'copy notification template': client => {
|
||||
const notifications = client.page.notificationTemplates();
|
||||
|
||||
client.useCss();
|
||||
client.resizeWindow(1200, 800);
|
||||
client.login();
|
||||
client.waitForAngular();
|
||||
|
||||
notifications.navigate();
|
||||
notifications.waitForElementVisible('div.spinny');
|
||||
notifications.waitForElementNotVisible('div.spinny');
|
||||
|
||||
notifications.section.list.expect.element('smart-search').visible;
|
||||
notifications.section.list.expect.element('smart-search input').enabled;
|
||||
|
||||
notifications.section.list
|
||||
.sendKeys('smart-search input', `id:>${data.notification.id - 1} id:<${data.notification.id + 1}`)
|
||||
.sendKeys('smart-search input', client.Keys.ENTER);
|
||||
|
||||
notifications.waitForElementVisible('div.spinny');
|
||||
notifications.waitForElementNotVisible('div.spinny');
|
||||
|
||||
notifications.expect.element(`#notification_templates_table tr[id="${data.notification.id}"]`).visible;
|
||||
notifications.expect.element('i[class*="copy"]').visible;
|
||||
notifications.expect.element('i[class*="copy"]').enabled;
|
||||
|
||||
notifications.click('i[class*="copy"]');
|
||||
notifications.waitForElementVisible('div.spinny');
|
||||
notifications.waitForElementNotVisible('div.spinny');
|
||||
|
||||
notifications.expect.element('#notification_template_form').visible;
|
||||
notifications.section.edit.expect.element('@title').visible;
|
||||
notifications.section.edit.expect.element('@title').text.contain(data.notification.name);
|
||||
notifications.section.edit.expect.element('@title').text.not.equal(data.notification.name);
|
||||
notifications.expect.element('@save').visible;
|
||||
notifications.expect.element('@save').enabled;
|
||||
|
||||
client.end();
|
||||
}
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user