Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 committed Dec 28, 2024
1 parent 5f6a1d5 commit 3831964
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions tests/cypress/e2e/dashboards.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* ---------------------------------------------------------------------
*
* GLPI - Gestionnaire Libre de Parc Informatique
*
* http://glpi-project.org
*
* @copyright 2015-2024 Teclib' and contributors.
* @copyright 2003-2014 by the INDEPNET Development Team.
* @licence https://www.gnu.org/licenses/gpl-3.0.html
*
* ---------------------------------------------------------------------
*
* LICENSE
*
* This file is part of GLPI.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* ---------------------------------------------------------------------
*/
describe('Entities selector', () => {
beforeEach(() => {
cy.login();
});

const dashboards = new Map([
['Asset', '/front/dashboard_assets.php'],
['Assistance', '/front/dashboard_helpdesk.php'],
['Central', '/front/central.php'],
]);

dashboards.forEach((value, key) => {
it(`${key} Dashboard Loads`, () => {
cy.visit(value);
cy.get('.grid-stack-item .g-chart').should('be.visible');
// grid-stack-items should have reasonable height
cy.get('.grid-stack-item').each(($el) => {
cy.get($el).invoke('height').should('be.gt', 30);
});
});
});
});

0 comments on commit 3831964

Please sign in to comment.