access-home.spec.ts 796 B

1234567891011121314151617181920212223242526272829303132
  1. /* eslint-disable cypress/no-unnecessary-waiting */
  2. context('Access Home', () => {
  3. const ssPrefix = 'access-home-';
  4. let connectSid: string | undefined;
  5. before(() => {
  6. // login
  7. cy.fixture("user-admin.json").then(user => {
  8. cy.login(user.username, user.password);
  9. });
  10. cy.getCookie('connect.sid').then(cookie => {
  11. connectSid = cookie?.value;
  12. });
  13. });
  14. beforeEach(() => {
  15. if (connectSid != null) {
  16. cy.setCookie('connect.sid', connectSid);
  17. }
  18. });
  19. it('Visit home', () => {
  20. cy.visit('/');
  21. cy.get('.grw-personal-dropdown').click();
  22. cy.get('.grw-personal-dropdown .dropdown-menu .btn-group > .btn-outline-secondary:eq(0)').click();
  23. cy.wait(1500);
  24. cy.screenshot(`${ssPrefix}-visit-home`, { capture: 'viewport' });
  25. });
  26. });