webapp/test/basic-routes.test.js
Untone 4f91f9830b
Some checks failed
deploy / test (push) Successful in 53s
deploy / quality (push) Failing after 10s
deploy / Run end-to-end tests (push) Failing after 1m25s
deploy / Update templates on Mailgun (push) Has been skipped
deploy / push (push) Failing after 1s
basic-routes-e2e
2024-02-04 13:20:41 +03:00

34 lines
832 B
JavaScript

// test/discoursio-webapp.check.js
const { chromium } = require('playwright')
;(async () => {
const browser = await chromium.launch()
const context = await browser.newContext()
// Define the URLs to visit
const pagesToVisit = [
'http://localhost:3000/',
'http://localhost:3000/feed',
'http://localhost:3000/create',
'http://localhost:3000/about/donate',
'http://localhost:3000/authors',
'http://localhost:3000/topics',
'http://localhost:3000/inbox',
]
// Loop through the pages and visit each one
for (const pageUrl of pagesToVisit) {
const page = await context.newPage()
await page.goto(pageUrl)
// Add your test assertions here if needed
// Close the page before moving to the next one
await page.close()
}
// Close the browser
await browser.close()
})()