Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/UI/specs/Menus_spec.js')
-rw-r--r--tests/UI/specs/Menus_spec.js29
1 files changed, 18 insertions, 11 deletions
diff --git a/tests/UI/specs/Menus_spec.js b/tests/UI/specs/Menus_spec.js
index d3fe6720c0..3124766e79 100644
--- a/tests/UI/specs/Menus_spec.js
+++ b/tests/UI/specs/Menus_spec.js
@@ -14,48 +14,55 @@ describe("Menus", function () {
urlBase = 'module=CoreHome&action=index&' + generalParams
;
+ function openMenuItem(page, menuItem)
+ {
+ page.click('#secondNavBar .navbar a:contains('+ menuItem + ')');
+ }
+
// main menu tests
it('should load the main reporting menu correctly', function (done) {
- expect.screenshot('mainmenu_loaded').to.be.captureSelector('.Menu--dashboard,.nav_sep', function (page) {
+ expect.screenshot('mainmenu_loaded').to.be.captureSelector('#secondNavBar', function (page) {
page.load("?" + urlBase + "#" + generalParams + "&module=Actions&action=menuGetPageUrls");
}, done);
});
it('should change the menu when a upper menu item is clicked in the main menu', function (done) {
- expect.screenshot('mainmenu_upper_clicked').to.be.captureSelector('.Menu--dashboard,.nav_sep', function (page) {
- page.click('.Menu-tabList > li:eq(1) > a');
+ expect.screenshot('mainmenu_upper_clicked').to.be.captureSelector('#secondNavBar', function (page) {
+ page.click('#secondNavBar .navbar > li:eq(1) > a');
}, done);
});
it('should change the menu when a lower menu item is clicked in the main menu', function (done) {
- expect.screenshot('mainmenu_lower_clicked').to.be.captureSelector('.Menu--dashboard,.nav_sep', function (page) {
- page.click('.Menu-tabList > li:eq(1) > ul > li:eq(1) > a');
+ expect.screenshot('mainmenu_lower_clicked').to.be.captureSelector('#secondNavBar', function (page) {
+ page.click('#secondNavBar .navbar > li:eq(1) > ul > li:eq(1) > a');
}, done);
});
// user menu tests
it('should load the user reporting menu correctly', function (done) {
- expect.screenshot('user_loaded').to.be.captureSelector('.Menu--admin', function (page) {
+ expect.screenshot('user_loaded').to.be.captureSelector('#secondNavBar', function (page) {
page.load("?" + generalParams + "&module=UsersManager&action=userSettings");
}, done);
});
it('should change the user page correctly when a user menu item is clicked', function (done) {
- expect.screenshot('user_changed').to.be.captureSelector('.Menu--admin', function (page) {
- page.click('.Menu--admin a:contains(API)');
+ expect.screenshot('user_changed').to.be.captureSelector('#secondNavBar', function (page) {
+ openMenuItem(page, 'Platform');
+ openMenuItem(page, 'API');
}, done);
});
// admin menu tests
it('should load the admin reporting menu correctly', function (done) {
- expect.screenshot('admin_loaded').to.be.captureSelector('.Menu--admin', function (page) {
+ expect.screenshot('admin_loaded').to.be.captureSelector('#secondNavBar', function (page) {
page.load("?" + generalParams + "&module=CoreAdminHome&action=generalSettings");
}, done);
});
it('should change the admin page correctly when an admin menu item is clicked', function (done) {
- expect.screenshot('admin_changed').to.be.captureSelector('.Menu--admin', function (page) {
- page.click('.Menu--admin a:contains(Websites)');
+ expect.screenshot('admin_changed').to.be.captureSelector('#secondNavBar', function (page) {
+ openMenuItem(page, 'Administration');
+ openMenuItem(page, 'Websites');
}, done);
});
}); \ No newline at end of file