-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Bump cypress to v10 Bumps cypress to [latest major v10](https://docs.cypress.io/guides/references/changelog#10-0-0) which introduces code config (`cypress.config.ts`). Done for both v9 and northstar. * update CI command * changefiles * update package.json * new e2e:local command * remove cypress plugins * update generator * fix script types * remove unnecessary deps * fix changefiles * fix gulp
- Loading branch information
Showing
34 changed files
with
192 additions
and
130 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-2f53b9f6-dfb1-4bc5-bde8-648d91f1dded.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Bump cypress to v10", | ||
"packageName": "@fluentui/react", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-card-cb431b04-92ad-4928-ae7c-7d1fa13d8021.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Bump cypress to v10", | ||
"packageName": "@fluentui/react-card", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-menu-b71dc5b0-0f29-47a4-9f8e-00e564852313.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Bump cypress to v10", | ||
"packageName": "@fluentui/react-menu", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-popover-f29a77e6-85cc-40c6-b1f8-d79ce4323ef1.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Bump cypress to v10", | ||
"packageName": "@fluentui/react-popover", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-tabster-741540b1-91bb-4a96-9939-9c49bc6491d9.json
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,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Bump cypress to v10", | ||
"packageName": "@fluentui/react-tabster", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
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,13 @@ | ||
import { defineConfig } from 'cypress'; | ||
|
||
export default defineConfig({ | ||
video: false, | ||
screenshotOnRunFailure: false, | ||
e2e: { | ||
specPattern: './tests/**/*.spec.ts', | ||
}, | ||
retries: { | ||
runMode: 2, | ||
openMode: 0, | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
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
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,3 @@ | ||
import baseConfig from '@fluentui/scripts/cypress.config'; | ||
|
||
export default baseConfig; |
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,3 @@ | ||
import baseConfig from '@fluentui/scripts/cypress.config'; | ||
|
||
export default baseConfig; |
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,3 @@ | ||
import baseConfig from '@fluentui/scripts/cypress.config'; | ||
|
||
export default baseConfig; |
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,3 @@ | ||
import baseConfig from '@fluentui/scripts/cypress.config'; | ||
|
||
export default baseConfig; |
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,3 @@ | ||
import baseConfig from '@fluentui/scripts/cypress.config'; | ||
|
||
export default baseConfig; |
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,3 @@ | ||
import baseConfig from '@fluentui/scripts/cypress.config'; | ||
|
||
export default baseConfig; |
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,6 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"types": ["node", "jest"] | ||
} | ||
} |
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,77 @@ | ||
import { defineConfig } from 'cypress'; | ||
import { Configuration } from 'webpack'; | ||
import * as path from 'path'; | ||
import * as fs from 'fs'; | ||
import * as jju from 'jju'; | ||
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'; | ||
import * as applyV8WebpackConfig from './storybook/webpack.config'; | ||
|
||
const isLocalRun = !process.env.DEPLOYURL; | ||
|
||
export const cypressWebpackConfig = (): Configuration => { | ||
const webpackConfig: Configuration = { | ||
resolve: { | ||
extensions: ['.js', '.ts', '.jsx', '.tsx'], | ||
}, | ||
mode: 'development', | ||
devtool: 'eval', | ||
output: { | ||
publicPath: '/', | ||
chunkFilename: '[name].bundle.js', | ||
}, | ||
module: { | ||
rules: [], | ||
}, | ||
}; | ||
|
||
if (path.basename(process.cwd()) === 'react-examples') { | ||
// For v8, reuse the storybook webpack config helper to add required options for building v8, | ||
// including the `resolve.alias` config that's currently REQUIRED to make tests re-run when a | ||
// component file in @fluentui/react is modified while running in open mode. | ||
// (This is different than the v9 config because v8 doesn't use tsconfig paths, so the only way | ||
// it can respond to file edits is by using `resolve.alias`, which doesn't work with esbuild.) | ||
applyV8WebpackConfig(webpackConfig); | ||
} else { | ||
// For v9, use tsconfig paths and esbuild-loader | ||
const tsConfigBasePath = path.resolve(__dirname, '../tsconfig.base.json'); | ||
/** @type {import("../../../tools/types").TsConfig} */ | ||
const tsConfigBase = jju.parse(fs.readFileSync(tsConfigBasePath).toString()); | ||
const tsPaths = new TsconfigPathsPlugin({ | ||
configFile: tsConfigBasePath, | ||
}); | ||
|
||
webpackConfig.resolve.plugins = [tsPaths]; | ||
webpackConfig.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
loader: 'esbuild-loader', | ||
options: { | ||
loader: 'tsx', | ||
target: tsConfigBase.compilerOptions.target, | ||
}, | ||
}); | ||
} | ||
|
||
return webpackConfig; | ||
}; | ||
|
||
export default defineConfig({ | ||
video: false, | ||
component: { | ||
specPattern: path.join(process.cwd(), '**/*.e2e.tsx'), | ||
devServer: { | ||
framework: 'react', | ||
bundler: 'webpack', | ||
webpackConfig: cypressWebpackConfig(), | ||
}, | ||
supportFile: path.join(__dirname, './cypress/support/component.js'), | ||
indexHtmlFile: path.join(__dirname, './cypress/support/component-index.html'), | ||
}, | ||
retries: { | ||
runMode: 2, | ||
openMode: 0, | ||
}, | ||
// Screenshots go under <pkg>/cypress/screenshots and can be useful to look at after failures in | ||
// local headless runs (especially if the failure is specific to headless runs) | ||
// screenshotOnRunFailure: isLocalRun && argv.mode === 'run', | ||
fixturesFolder: path.join(__dirname, 'cypress/fixtures'), | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> | ||
<title>Components App</title> | ||
</head> | ||
<body> | ||
<div data-cy-root id="__cy_root"></div> | ||
</body> | ||
</html> |
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
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
Oops, something went wrong.