fix workflow e2e tests

This commit is contained in:
Jake McDermott
2018-11-12 00:26:30 -05:00
parent 75c2d1eda1
commit 75566bad39
2 changed files with 93 additions and 54 deletions

View File

@@ -140,12 +140,31 @@ module.exports = {
templates.expect.element('@save').enabled;
client.pause(1000);
templates.section.editWorkflowJobTemplate
.waitForElementVisible('@visualizerButton')
.click('@visualizerButton')
.waitForElementVisible('div.spinny')
.waitForElementNotVisible('div.spinny')
.waitForAngular();
client.getValue('#workflow_job_template_name', result => {
templates.expect.element('#workflow_job_template_cancel_btn').visible;
templates.click('#workflow_job_template_cancel_btn');
client.refresh();
client.waitForElementVisible('div.spinny');
client.waitForElementNotVisible('div.spinny');
templates.expect.element('smart-search').visible;
templates.expect.element('smart-search input').enabled;
templates
.sendKeys('smart-search input', `name.iexact:"${result.value}"`)
.sendKeys('smart-search input', client.Keys.ENTER);
templates.waitForElementVisible('div.spinny');
templates.waitForElementNotVisible('div.spinny');
templates.expect.element('.at-Panel-headingTitleBadge').text.equal('1').before(10000);
templates.expect.element('div[ui-view="templatesList"] i[class*="sitemap"]').visible;
templates.expect.element('div[ui-view="templatesList"] i[class*="sitemap"]').enabled;
client
.click('div[ui-view="templatesList"] i[class*="sitemap"]')
.pause(1500)
.waitForElementNotVisible('div.spinny');
client.expect.element('#workflow-modal-dialog').visible;
client.expect.element('#workflow-modal-dialog span[class^="badge"]').visible;
@@ -191,5 +210,6 @@ module.exports = {
templates.expect.element('@save').enabled;
client.end();
});
}
};

View File

@@ -53,20 +53,39 @@ module.exports = {
data = { source, template, project, workflow };
done();
});
},
'navigate to the workflow template visualizer': client => {
const templates = client.page.templates();
client.useCss();
client.resizeWindow(1200, 800);
client.login();
client.waitForAngular();
templates.load();
templates.waitForElementVisible('div.spinny');
templates.waitForElementNotVisible('div.spinny');
templates.expect.element('smart-search').visible;
templates.expect.element('smart-search input').enabled;
templates
.sendKeys('smart-search input', `id:>${data.workflow.id - 1} id:<${data.workflow.id + 1}`)
.sendKeys('smart-search input', client.Keys.ENTER);
templates.waitForElementVisible('div.spinny');
templates.waitForElementNotVisible('div.spinny');
templates.expect.element('.at-Panel-headingTitleBadge').text.equal('1').before(10000);
templates.expect.element(`#row-${data.workflow.id}`).visible;
templates.expect.element('div[ui-view="templatesList"] i[class*="sitemap"]').visible;
templates.expect.element('div[ui-view="templatesList"] i[class*="sitemap"]').enabled;
client
.login()
.waitForAngular()
.resizeWindow(1200, 1000)
.useXpath()
.findThenClick(workflowTemplateNavTab)
.click('div[ui-view="templatesList"] i[class*="sitemap"]')
.pause(1500)
.waitForElementNotVisible(spinny)
.clearValue(workflowSearchBar)
.setValue(workflowSearchBar, [workflowText, client.Keys.ENTER])
.waitForElementVisible(workflowSearchBadgeCount)
.waitForElementNotVisible(spinny)
.findThenClick(workflowSelector)
.findThenClick(workflowVisualizerBtn);
.useXpath()
.waitForElementNotVisible(spinny);
},
'verify that workflow visualizer root node can only be set to always': client => {
client