diff options
Diffstat (limited to 'tests/UI/specs/Dashboard_spec.js')
-rw-r--r-- | tests/UI/specs/Dashboard_spec.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/UI/specs/Dashboard_spec.js b/tests/UI/specs/Dashboard_spec.js index 2489f69637..0c4f28f080 100644 --- a/tests/UI/specs/Dashboard_spec.js +++ b/tests/UI/specs/Dashboard_spec.js @@ -122,22 +122,24 @@ describe("Dashboard", function () { page.click('.dashboard-manager .title'); page.mouseMove('.widgetpreview-categorylist>li:contains(Live!)'); // have to mouse move twice... otherwise Live! will just be highlighted + page.click('.widgetpreview-categorylist>li:contains(Live!)'); + page.mouseMove('.widgetpreview-categorylist>li:contains(Times):first'); + page.click('.widgetpreview-categorylist>li:contains(Times):first'); page.mouseMove('.widgetpreview-widgetlist>li:contains(Visits per local time)'); - page.click('.widgetpreview-widgetlist>li:contains(Visits per local time)'); }, done); }); it("should remove widget when remove widget icon is clicked", function (done) { expect.screenshot("widget_move_removed").to.be.capture(function (page) { - var widget = '[id="widgetVisitTimegetVisitInformationPerLocalTimeviewDataTablegraphVerticalBar"]'; + var widget = '[id="widgetVisitTimegetVisitInformationPerLocalTime"]'; page.mouseMove(widget + ' .widgetTop'); page.click(widget + ' .button#close'); - page.click('.ui-dialog button>span:contains(Yes)'); + page.click('.modal.open .modal-footer a:contains(Yes)'); page.mouseMove('.dashboard-manager'); }, done); }); @@ -146,8 +148,8 @@ describe("Dashboard", function () { expect.screenshot("change_layout").to.be.capture(function (page) { page.click('.dashboard-manager .title'); page.click('li[data-action=showChangeDashboardLayoutDialog]'); - page.click('div[layout=50-50]'); - page.click('.ui-dialog button>span:contains(Save)'); + page.click('.modal.open div[layout=50-50]'); + page.click('.modal.open .modal-footer a:contains(Save)'); }, done); }); @@ -157,7 +159,7 @@ describe("Dashboard", function () { page.click('li[data-action=renameDashboard]'); page.evaluate(function () { $('#newDashboardName:visible').val('newname'); // don't use sendKeys or click, since in this test it appears to trigger a seg fault on travis - $('.ui-dialog[aria-describedby=renameDashboardConfirm] button>span:contains(Save):visible').click(); + $('.modal.open .modal-footer a:contains(Save):visible').click(); }); }, done); }); @@ -173,7 +175,7 @@ describe("Dashboard", function () { page.evaluate(function () { $('[id=copyDashboardUser]:last').val('superUserLogin'); }); - page.click('.ui-dialog button>span:contains(Ok)'); + page.click('.modal.open .modal-footer a:contains(Ok)'); page.load(url.replace("idDashboard=5", "idDashboard=6")); }, done); @@ -183,7 +185,7 @@ describe("Dashboard", function () { expect.screenshot("reset").to.be.capture(function (page) { page.click('.dashboard-manager .title'); page.click('li[data-action=resetDashboard]'); - page.click('.ui-dialog button>span:contains(Yes)', 4000); + page.click('.modal.open .modal-footer a:contains(Yes)', 4000); page.mouseMove('.dashboard-manager'); }, done); }); @@ -192,7 +194,7 @@ describe("Dashboard", function () { expect.screenshot("removed").to.be.capture(function (page) { page.click('.dashboard-manager .title'); page.click('li[data-action=removeDashboard]'); - page.click('.ui-dialog[aria-describedby=removeDashboardConfirm] button>span:contains(Yes)'); + page.click('.modal.open .modal-footer a:contains(Yes)'); page.mouseMove('.dashboard-manager'); page.evaluate(function () { $('.widgetTop').removeClass('widgetTopHover'); @@ -205,7 +207,7 @@ describe("Dashboard", function () { page.load(url); page.click('.dashboard-manager .title'); page.click('li[data-action=setAsDefaultWidgets]'); - page.click('.ui-dialog button>span:contains(Yes)'); + page.click('.modal.open .modal-footer a:contains(Yes)'); }, done); }); @@ -214,7 +216,7 @@ describe("Dashboard", function () { page.click('.dashboard-manager .title'); page.click('li[data-action=createDashboard]'); page.sendKeys('#createDashboardName:visible', 'newdash2'); - page.click('.ui-dialog[aria-describedby=createDashboardConfirm] button>span:contains(Yes)'); + page.click('.modal.open .modal-footer a:contains(Ok)'); // toggle map widget to prevent failures page.mouseMove('#widgetUserCountryMapvisitorMap .widgetTop', 3000); page.click('#widgetUserCountryMapvisitorMap #minimise'); |