hedera-web/src/test/cypress/integration/admin/UsersView.spec.js

33 lines
919 B
JavaScript

describe('UsersView', () => {
beforeEach(() => {
cy.login('adminboss');
cy.visit('/#/admin/users');
});
afterEach(() => {
cy.logout();
});
it('should show empty state when entering the view', () => {
cy.dataCy('usersViewList').should('contain', 'Sin datos');
});
it('supplants user', () => {
cy.userViewSupplant('Bruce Wayne');
cy.getSessionStorage('supplantUser').should('equal', 'brucewayne');
});
it('makes actions for the supplanted user', () => {
cy.userViewSupplant('Bruce Wayne');
cy.wait(100);
cy.visit('/#/account/conf');
cy.url().should('contain', '/#/account/conf');
cy.changeUserNickname('Bruce Wayne', 'New test nickname');
cy.dataCy('layoutSupplantedUserName').should(
'contain',
'New test nickname'
);
cy.resetDB();
});
});