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

import { TabPage } from "../../support/tab.po";



describe('Tab Functionality in the Layout', () => {
    let page: TabPage;
    before(() => {
      page = new TabPage();
      page.navigateTo();
    });
  
    beforeEach(() => {
      cy.viewport(1920, 1200);
    });
  
    describe('check if Tab with Back Button exists', () => {
      it('should have not button visible', () => {
        page.getBackButtonWithUrl().should('not.exist');
      });
    });
  
    describe('check if Tab with Back Button exists', () => {
      it('should have button visible', () => {
        page.getBackButtonWithUrl().should('exist');
      });
    });

    describe('check if onclick of Back Button Navigating to Layout Overview Demo Page', () => {
      it('should navigate to layout overview demo', () => {
        page.getBackButtonWithUrl().should('exist');
        page.getBackButtonWithUrl().click();
        cy.url().should('include','/layout-demo')
      });
    });
})