gorgeous-forest-77630
03/18/2023, 10:45 PM/// <reference types="cypress" />
import {homePageGeant} from '../../../support/Pages/SuperMarkets'
const datatest = '../fixtures/datatest.json'
describe('Get the page information',()=>{
it('Store the page information', ()=>{
homePageGeant.visitHomepage();
homePageGeant.typeSearchInput('Cafe');
homePageGeant.clickSeeAllProducts();
homePageGeant.storeEachPMarca();
homePageGeant.storeEachH2();
homePageGeant.storeEachPPrice();
homePageGeant.pushIntoCoffeeListArray();
homePageGeant.writefile();
})
it('check json', ()=>{
cy.readFile(datatest).then((str)=>{
cy.wrap(str).pause()
cy.wrap(str[0]).pause()
cy.wrap(str[0][1]).pause()
cy.wrap(str[1]).pause()
cy.wrap(str[0].ProductBrand).pause()
})
})
})
Result from the pipeline:
1) check json
1 passing (31s)
1 failing
1) Get the page information
check json:
AssertionError: Timed out retrying after 4000ms: `cy.readFile("../fixtures/datatest.json")` failed because the file does not exist at the following path:
`/home/runner/work/Scapping/fixtures/datatest.json`
Any ideas?gray-kilobyte-89541
03/19/2023, 9:19 PMcypress folder?