Skip to content

Commit

Permalink
Merge pull request #210 from millicast/develop
Browse files Browse the repository at this point in the history
Fix/puppeteer tests (#209)
  • Loading branch information
nico-ramos authored Dec 27, 2022
2 parents 6eb883c + 0c834b0 commit e021c5e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ afterEach(async () => {
defineFeature(feature, test => {
test('Load example page with Puppeteer', ({ given, when, then }) => {
given('i have a browser opened', async () => {
browser = await puppeteer.launch()
browser = await puppeteer.launch({ args: ['--no-sandbox'] })
})

when('i open a new page and go to the example web', async () => {
Expand All @@ -29,13 +29,13 @@ defineFeature(feature, test => {
then('the web page title says "PuppeteerJest"', async () => {
await expect(page.title()).resolves.toMatch('PuppeteerJest')
})
})
}, 100000)

test('SDK loaded', ({ given, when, then }) => {
let millicastModule = null

given('i have a browser opened and an example page with the Millicast SDK', async () => {
browser = await puppeteer.launch()
browser = await puppeteer.launch({ args: ['--no-sandbox'] })
page = await browser.newPage()
await page.goto(`file:${path.join(__dirname, '../../PuppeteerJest.html')}`)
})
Expand All @@ -47,5 +47,5 @@ defineFeature(feature, test => {
then('returns an instance of "millicast"', () => {
expect(millicastModule).toBeDefined()
})
})
}, 100000)
})

0 comments on commit e021c5e

Please sign in to comment.