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

import { DemoPage } from "../../support/app.po";
import { ContentFullScreenPage } from "../../support/content-fullscreen.po";

describe('Full Screen Functionality in the Layout', () => {
    let page: ContentFullScreenPage;
    let app: DemoPage;
  
    before(() => {
      page = new ContentFullScreenPage();
      app = new DemoPage();
      page.navigateTo();
    });
  
    beforeEach(() => {
      cy.viewport(1920, 1200);
    });
  
    describe('Content FullScreen within body of DOM', () => {
      it('should have fullscreen button/icon', () => {
        page.getFullScreenIcon('fullscreen').should('exist');
      });
    });
  
    describe('Content FullScreen within body of DOM Fullscreen icon click', () => {
      it('should hide the side nav bar', () => {
        page.getFullScreenIcon('fullscreen').first().click();
        app.getSidebar().find('mat-sidenav').should('have.class','closed-sidebar');
      });
    });
})