{"size": 658, "ext": "js", "max_stars_repo_path": "cypress/integration/auth/logout.spec.js", "max_stars_repo_name": "ipackr/saas-ui", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "cypress/integration/auth/logout.spec.js", "max_issues_repo_name": "ipackr/saas-ui", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "cypress/integration/auth/logout.spec.js", "max_forks_repo_name": "ipackr/saas-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.3333333333, "max_line_length": 79, "alphanum_fraction": 0.6808510638}
import { EXISTING_USER, pageDetailsMap, Pages } from 'pages/common/constants';
import { loginForm } from 'pages/auth/selectors';
import { setAliases } from 'pages/auth/requests';
import { dropdownMenu, logoutButton, profileIcon } from 'pages/main/selectors';

context('Logout', () => {
  beforeEach(() => {
    setAliases();
    cy.visit(pageDetailsMap[Pages.Login].url);
    cy.runLoginAction(EXISTING_USER.user);
  });

  it('SAAS-T80 - should be able to logout', () => {
    profileIcon().click();
    dropdownMenu().isVisible();
    logoutButton().click();
    loginForm().isVisible();
    cy.checkPopUpMessage(EXISTING_USER.loggedOutMessage);
  });
});
