{"size": 725, "ext": "js", "max_stars_repo_path": "cypress/integration/info.spec.js", "max_stars_repo_name": "macho-catt/tote", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "cypress/integration/info.spec.js", "max_issues_repo_name": "macho-catt/tote", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "cypress/integration/info.spec.js", "max_forks_repo_name": "macho-catt/tote", "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": 27.8846153846, "max_line_length": 76, "alphanum_fraction": 0.5710344828}
describe('Info', () => {
  beforeEach(() => {
    cy.visit('/');
  });

  it('renders the info button', () => {
    cy.contains('?');
    cy.get('[type="button"]').contains('?').should('have.length', 1);
  });

  it('renders the modal on button click', () => {
    cy.get('[type="button"]').contains('?').click();
    cy.contains('tote (time + quote) displays a changing background color');
  });

  it('exits the modal when clicking outside', () => {
    cy.get('[type="button"]').contains('?').click();
    cy.contains('tote (time + quote) displays a changing background color');

    cy.clickOutside();
    cy.contains(
      'tote (time + quote) displays a changing background color'
    ).should('not.exist');
  });
});
