square-beard-35242
12/02/2022, 10:03 PM> class Homepage_PO {
> Visit_Homepage(){
> cy.visit(Cypress.env('integrax_homepage'),{timeout:60000})
> }
> Login(login, password){
> cy.get('input[name="login"]').type(login)
> cy.get('input[name="password"]').type(password)
> cy.get('#loginBtn').click()
> }
> }
> export default Homepage_PO;
>
and the spec code
> import Homepage_PO from "../../support/pageObjects/integraX/Homepage_PO";
> /// <reference types = 'cypress'/>
>
> describe('Log in into IntegraX', () => {
> const homepage_PO = new Homepage_PO()
> beforeEach(() => {
> homepage_PO.Visit_Homepage();
> });
> it.only('log in as Integra administrator', () => {
> homepage_PO.Login(Cypress.env('integra_admin_login'), Cypress.env('integra_admin_password'));
> });
>
> it('log in as Car Service', () => {
> });
> });