2023-12-08 03:52:25 -08:00
|
|
|
import { SettingsPage } from '../pages/settings';
|
|
|
|
|
|
|
|
const settingsPage = new SettingsPage();
|
|
|
|
|
|
|
|
describe('Admin user', { disableAutoLogin: true }, () => {
|
|
|
|
it('should see same Settings sub menu items as instance owner', () => {
|
2024-06-11 05:45:15 -07:00
|
|
|
cy.signinAsOwner();
|
2023-12-08 03:52:25 -08:00
|
|
|
cy.visit(settingsPage.url);
|
|
|
|
|
|
|
|
let ownerMenuItems = 0;
|
|
|
|
|
|
|
|
settingsPage.getters.menuItems().then(($el) => {
|
|
|
|
ownerMenuItems = $el.length;
|
|
|
|
});
|
|
|
|
|
|
|
|
cy.signout();
|
2024-06-11 05:45:15 -07:00
|
|
|
cy.signinAsAdmin();
|
2023-12-08 03:52:25 -08:00
|
|
|
cy.visit(settingsPage.url);
|
|
|
|
|
|
|
|
settingsPage.getters.menuItems().should('have.length', ownerMenuItems);
|
|
|
|
});
|
|
|
|
});
|