-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: consolidate test-utils and add easy e2e script (#2688)
* rename e2e script to e2e-ci * [wip] start cross env e2e script * add assertion on visit page method * add @bfc/test-utils package * update visual designer to use test-utils * mark test-utils private * update adaptive-form to use test-utils * migrate extension to test-utils * migrate client to test-utils * update config function interfaces * add node configuration * update lockfile * migrate electron-server to test-utils * migrate lib to test-utils * migrate server to test-utils * migrate tools to test-utils * migrate ui-plugins to test-utils * update lock file * update documentation * add typings for test-utils Keep this as a JS module to reduce compile steps, but at least consumers get type info * convert all test imports to test-utils * allow configuration of babel options * convert missing js files to jsx * remove ability for babel overrides packages can include their own babel config instead * remove babel overrides from type * migrate ui-shared to test-utils * do not load other babel configs for tests * add e2e scripts to run app and clean artifacts in cross plat way * add more logging * add yarn script to start composer for e2e
- Loading branch information
1 parent
4704385
commit 2936a71
Showing
132 changed files
with
2,647 additions
and
2,613 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
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,2 @@ | ||
__test_bots__ | ||
__e2e_data.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
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
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
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
19 changes: 0 additions & 19 deletions
19
Composer/packages/client/__tests__/components/conversation.test.js
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
Composer/packages/client/__tests__/components/conversation.test.jsx
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 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import * as React from 'react'; | ||
import { render } from '@bfc/test-utils'; | ||
|
||
import '../../src/components/Conversation'; | ||
|
||
describe('<Conversation/>', () => { | ||
it('should render the conversation', async () => { | ||
// const { findByText } = render( | ||
// <Conversation> | ||
// <div>test</div> | ||
// </Conversation> | ||
// ); | ||
// await findByText(/test/); | ||
// expect(true).toBe(false); | ||
}); | ||
}); |
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
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
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
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
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
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
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
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,42 +1,13 @@ | ||
// eslint-disable-next-line | ||
const path = require('path'); | ||
module.exports = { | ||
displayName: 'client', | ||
preset: 'ts-jest/presets/js-with-ts', | ||
// transform: { | ||
// '^.+\\.tsx?$': 'ts-jest', | ||
// '^.+\\.jsx?$': 'babel-jest', | ||
// }, | ||
moduleNameMapper: { | ||
// Any imports of .scss / .css files will instead import styleMock.js which is an empty object | ||
'\\.(jpg|jpeg|png|svg|gif)$': '<rootDir>/__tests__/jestMocks/styleMock.js', | ||
'\\.(s)?css$': '<rootDir>/__tests__/jestMocks/styleMock.js', | ||
// lsp code editor | ||
vscode$: 'monaco-languageclient/lib/vscode-compatibility', | ||
const { createConfig } = require('@bfc/test-utils'); | ||
|
||
// use commonjs modules for test so they do not need to be compiled | ||
'office-ui-fabric-react/lib/(.*)$': 'office-ui-fabric-react/lib-commonjs/$1', | ||
'@uifabric/fluent-theme/lib/(.*)$': '@uifabric/fluent-theme/lib-commonjs/$1', | ||
module.exports = createConfig( | ||
'client', | ||
'react', | ||
{ | ||
setupFilesAfterEnv: [path.resolve(__dirname, 'setupTests.ts')], | ||
}, | ||
testPathIgnorePatterns: [ | ||
'/node_modules/', | ||
'/jestMocks/', | ||
'__mocks__', | ||
'/testUtils/', | ||
'__tests__/setupTests.ts', | ||
'.*\\.d\\.ts', | ||
], | ||
// Some node modules are packaged and distributed in a non-transpiled form | ||
// (ex. contain import & export statements); and Jest won't be able to | ||
// understand them because node_modules aren't transformed by default. So | ||
// we can specify that they need to be transformed here. | ||
transformIgnorePatterns: ['/node_modules/'], | ||
|
||
setupFilesAfterEnv: [path.resolve(__dirname, './__tests__/setupTests.ts')], | ||
globals: { | ||
'ts-jest': { | ||
tsConfig: path.resolve(__dirname, './tsconfig.json'), | ||
diagnostics: false, | ||
}, | ||
}, | ||
}; | ||
{ | ||
presets: ['react-app', '@emotion/babel-preset-css-prop'], | ||
} | ||
); |
Oops, something went wrong.