Skip to content

Commit

Permalink
test: fixing html object test
Browse files Browse the repository at this point in the history
  • Loading branch information
yawetse committed Jul 12, 2022
1 parent 5dcd697 commit 5d4aa34
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/html.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ describe('End to End HTML Tests', function(){
// console.log('os.type()', os.type());
// console.log('os.arch()', os.arch());
// console.log('os.platform()', os.platform());
await page.waitForTimeout(20000)
const loadedPageModelDataCSV1 = await page.evaluate(()=>{
const csvtest1 = document.querySelector('#csvtest1')?.textContent
//@ts-ignore
return {csvtest1}
})
console.log('loadedPageModelDataCSV1.csvtest1',loadedPageModelDataCSV1.csvtest1)
expect((loadedPageModelDataCSV1.csvtest1 as string)).toMatch(/BaseNeuralNetwork/gi)

if(os.platform()==='linux' && os.type() ==='Linux') expect(true).toBe(true)
else {
await page.waitForTimeout(5000)
const loadedPageModelDataCSV1 = await page.evaluate(()=>{
const csvtest1 = document.querySelector('#csvtest1')?.textContent
//@ts-ignore
return {csvtest1}
})
// console.log('loadedPageModelDataCSV1.csvtest1',loadedPageModelDataCSV1.csvtest1)
expect((loadedPageModelDataCSV1.csvtest1 as string)).toMatch(/BaseNeuralNetwork/gi)
}

// // await page.screenshot({ path: 'example.png' });
},40000);
Expand Down

0 comments on commit 5d4aa34

Please sign in to comment.