-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: - `mainPage` is renamed into `page` - "/globalSetup" => "/setup" - "/globalTeardown" => "/teardown" - "/testEnvironment" => ""
- Loading branch information
Showing
10 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
/* | ||
!/lib/*.js | ||
!index.js | ||
!globalSetup.js | ||
!globalTeardown.js | ||
!testEnvironment.js | ||
!setup.js | ||
!teardown.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = require('./lib/PuppeteerEnvironment').default | ||
module.exports.globalSetup = require('./lib/global').setup | ||
module.exports.globalTeardown = require('./lib/global').teardown | ||
module.exports.setup = require('./lib/global').setup | ||
module.exports.teardown = require('./lib/global').teardown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
globalSetup: './globalSetup.js', | ||
globalTeardown: './globalTeardown.js', | ||
testEnvironment: './testEnvironment.js', | ||
globalSetup: './setup', | ||
globalTeardown: './teardown', | ||
testEnvironment: './', | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ module.exports = { | |
browser: true, | ||
}, | ||
globals: { | ||
mainPage: true, | ||
page: true, | ||
browser: true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
describe('Google', () => { | ||
beforeAll(async () => { | ||
await mainPage.goto('https://google.com') | ||
await page.goto('https://google.com') | ||
}) | ||
|
||
it('should display "google" text on page', async () => { | ||
const text = await mainPage.evaluate(() => document.body.textContent) | ||
const text = await page.evaluate(() => document.body.textContent) | ||
expect(text).toContain('google') | ||
}) | ||
}) |