add extra test for more info (#15326) (#15381)

This commit is contained in:
Stacey Gammon 2017-12-04 15:54:55 -05:00 committed by GitHub
parent 8e5eb46536
commit b0e5bd6d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -32,10 +32,15 @@ export default function ({ getService, getPageObjects }) {
});
});
it('clone warns on duplicate name', async function () {
it('clone appends Copy to the dashboard title name', async () => {
await PageObjects.dashboard.loadSavedDashboard(dashboardName);
await PageObjects.dashboard.clickClone();
const title = await PageObjects.dashboard.getCloneTitle();
expect(title).to.be(clonedDashboardName);
});
it('and warns on duplicate name', async function () {
await PageObjects.dashboard.confirmClone();
const isConfirmOpen = await PageObjects.common.isConfirmModalOpen();
expect(isConfirmOpen).to.equal(true);

View file

@ -141,6 +141,10 @@ export function DashboardPageProvider({ getService, getPageObjects }) {
await testSubjects.click('dashboardClone');
}
async getCloneTitle() {
return await testSubjects.getProperty('clonedDashboardTitle', 'value');
}
async confirmClone() {
log.debug('Confirming clone');
await testSubjects.click('cloneConfirmButton');