/*
 * Copyright (c) 2022 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { EmptyStatePage } from "../../support/empty-state.po";



describe('Empty State Functionality in the Layout', () => {
    let page: EmptyStatePage;
    before(() => {
      page = new EmptyStatePage();
      page.navigateTo();
    });
  
    beforeEach(() => {
      cy.viewport(1920, 1200);
    });

    describe('The Empty State Component', () => {
        it('should exist', () => {
            page.getEmptyState().should('exist');
        });
        it('should show text', () => {
            page.getEmptyState().eq(0).should('contain', 'No items to display.')
            page.getEmptyState().eq(1).should('contain','To add new elements, click the add button.');
        });
        it('should have 500px height', () => {
            cy.get('div[id="mat-tab-label-0-2"]').click();
            page.getEmptyStateWithHeight().should('exist');
            page.getEmptyStateWithHeightDiv().should('have.css', 'height', '500px');
        });
    });
});