-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
121 additions
and
22 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
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 |
---|---|---|
|
@@ -7,6 +7,8 @@ | |
|
||
# testing | ||
/coverage | ||
/playwright-report | ||
/test-results | ||
|
||
# production | ||
/build | ||
|
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {test, expect} from '@playwright/test'; | ||
|
||
test('smoke test', async ({page}) => { | ||
const consoleErrors = []; | ||
page.on('console', msg => { | ||
const type = msg.type(); | ||
if (type === 'warn' || type === 'error') { | ||
consoleErrors.push({type: type, text: msg.text()}); | ||
} | ||
}); | ||
const pageErrors = []; | ||
page.on('pageerror', error => { | ||
pageErrors.push(error.stack); | ||
}); | ||
await page.goto('/'); | ||
|
||
await expect(consoleErrors).toEqual([]); | ||
await expect(pageErrors).toEqual([]); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {defineConfig, devices} from '@playwright/test'; | ||
|
||
const isCI = process.env.CI === '1'; | ||
|
||
export default defineConfig({ | ||
// relative to this configuration file. | ||
testDir: '__tests__/__e2e__', | ||
fullyParallel: true, | ||
// Fail the build on CI if you accidentally left test.only in the source code. | ||
forbidOnly: !isCI, | ||
retries: isCI ? 2 : 0, | ||
// Opt out of parallel tests on CI. | ||
workers: isCI ? 1 : undefined, | ||
reporter: 'html', | ||
use: { | ||
baseURL: 'http://localhost:3000', | ||
|
||
trace: 'on-first-retry', | ||
}, | ||
projects: [ | ||
{ | ||
name: 'chromium', | ||
use: {...devices['Desktop Chrome']}, | ||
}, | ||
], | ||
webServer: { | ||
command: 'yarn dev', | ||
url: 'http://localhost:3000', | ||
reuseExistingServer: !isCI, | ||
}, | ||
}); |
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,16 +1 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
// TODO: this is special because it gets imported during build. | ||
// | ||
// TODO: 18.0.0 has not been released to NPM; | ||
// It exists as a placeholder so that DevTools can support work tag changes between releases. | ||
// When we next publish a release, update the matching TODO in backend/renderer.js | ||
// TODO: This module is used both by the release scripts and to expose a version | ||
// at runtime. We should instead inject the version number as part of the build | ||
// process, and use the ReactVersions.js module as the single source of truth. | ||
export default '18.2.0'; | ||
export default '18.3.0-PLACEHOLDER'; |