UnlyEd/next-right-now-admin

View on GitHub
cypress/integration/app/pages/index.js

Summary

Maintainability
A
0 mins
Test Coverage
const baseUrl = Cypress.config().baseUrl;

describe('Index page', () => {
  /*
  * Visits the page before each test
  */
  beforeEach(() => {
    cy.visit('/');
  });

  /**
   * Navbar section
   */
  it('should have a navigation bar', () => {
    cy.get('header.MuiAppBar-root').should('have.length', 1);
    cy.get('header.MuiAppBar-root button[title="Refresh"]').should('have.length', 1);
    cy.get('header.MuiAppBar-root button[title="Profile"]').should('have.length', 1);
  });

  /**
   * Main default section
   */
  it('should have a list view', () => {
    cy.get('main .list-page').should('have.length', 1);
  });
});