Skip to content

Commit b34dd58

Browse files
authored
Jim/wall 4849/remove integration package from the monorepo (deriv-com#16895)
* chore: delete integration package * chore: delete any references to the integration package in wallets * chore: delete any references to the integration package in account * chore: delete playwright config * ci: remove scripts and dependencies related to integration and component tests * chore: add package-lock * chore: update jest config to remove integration and component tests related config * chore: update gitignore file * docs: update v2 migration guide
1 parent cfdce11 commit b34dd58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3
-16473
lines changed

.eslintrc.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = {
1212
},
1313
{
1414
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
15-
excludedFiles: '**/integration-tests/**/*.[jt]s?(x)',
1615
extends: ['plugin:testing-library/react'],
1716
},
1817
{

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ packages/wallets/src/translations/messages.json
2626
.env
2727
.env.*
2828
*.env
29-
test-results/
30-
playwright-report/
31-
playwright/.cache/
3229
.nx
3330
packages/*/stats.json
3431
packages/*/report.json

V2-MIGRATION-GUIDE.MD

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ https://drive.google.com/drive/folders/1XOCreZ6Zfd0uyh-Xmm6ux2_ak1Cqo2Hw?usp=dri
5858

5959
All the informations should be within the above presentation. But to reiterate very briefly:
6060
- unit tests are the default ones. They are easy to write and quick to execute, so feel free to add as many as you need
61-
- component tests are slightly heavier (especially given our setup with PlayWright), so use when unit tests are no longer suitable
6261
- e2e tests are the slowest, and they are in separate repository, and they use actual backend (which makes them prone to flakiness), so use as a last resort in a daily work
6362

6463
## Css patterns:

jest.config.base.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44

55
module.exports = {
66
collectCoverage: false,
7-
collectCoverageFrom: [
8-
'**/*.{js,jsx,ts,tsx}',
9-
'!**/node_modules/**',
10-
'!**/dist/**',
11-
'!/integration-tests/',
12-
'!/component-tests/',
13-
],
7+
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/node_modules/**', '!**/dist/**'],
148
coverageReporters: ['lcov'],
159
coverageDirectory: './coverage/',
1610
testRegex: '(/__tests__/.*|(\\.)(test|spec))\\.(js|jsx|tsx|ts)?$',
@@ -20,5 +14,4 @@ module.exports = {
2014
],
2115
setupFiles: ['<rootDir>/../../jest.setup.js'],
2216
setupFilesAfterEnv: ['<rootDir>/../../setupTests.js'],
23-
testPathIgnorePatterns: ['/integration-tests/', '/component-tests/'],
2417
};

jest.config.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ const baseConfig = require('./jest.config.base');
22

33
module.exports = {
44
collectCoverage: false,
5-
collectCoverageFrom: [
6-
'**/*.{js,jsx,ts,tsx}',
7-
'!**/node_modules/**',
8-
'!**/dist/**',
9-
'!/integration-tests/',
10-
'!/component-tests/',
11-
],
5+
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/node_modules/**', '!**/dist/**'],
126
coverageReporters: ['lcov'],
137
coverageDirectory: './coverage/',
148
clearMocks: true,
@@ -20,5 +14,4 @@ module.exports = {
2014
},
2115
testRegex: '(/__tests__/.*|(\\.)(test|spec))\\.(js|jsx|tsx|ts)?$',
2216
transformIgnorePatterns: baseConfig.transformIgnorePatterns,
23-
testPathIgnorePatterns: ['/integration-tests/'],
2417
};

package-lock.json

-100
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"@jest/globals": "^26.5.3",
2626
"@nrwl/nx-cloud": "latest",
2727
"@nrwl/workspace": "^14.5.10",
28-
"@playwright/test": "^1.37.1",
2928
"@testing-library/jest-dom": "^5.12.0",
3029
"@testing-library/react": "^12.0.0",
3130
"@testing-library/react-hooks": "^7.0.2",
@@ -87,9 +86,6 @@
8786
"test:stylelint": "stylelint \"./packages/*/src/**/*.s(a|c)ss\"",
8887
"test:ci": "f () { npm run test:stylelint && npm run test:eslint-all ;}; f",
8988
"test:jest": "jest --all --maxWorkers=${JEST_MAX_WORKERS:-'50%'}",
90-
"test:component": "npx playwright test",
91-
"test:component-debug": "npx playwright test --debug",
92-
"test:component-ui": "npx playwright test --ui",
9389
"test:performance": "cd e2e-tests && jest -c ./jest.config.js --detectOpenHandles performance",
9490
"stylelint:fix": "stylelint \"./packages/*/src/**/*.s(a|c)ss\" --fix",
9591
"translate": "f () { lerna exec --scope @deriv/translations -- npm run translate ;}; f",
@@ -106,9 +102,7 @@
106102
"react": "^17.0.2",
107103
"react-dom": "^17.0.2",
108104
"react-toastify": "^9.1.3",
109-
"selfsigned": "^2.1.1",
110-
"typescript": "^4.6.3",
111-
"ws": "^8.13.0"
105+
"typescript": "^4.6.3"
112106
},
113107
"optionalDependencies": {
114108
"fsevents": "^2.3.2"

packages/account/integration-tests/personal-details/menu.spec.tsx

-27
This file was deleted.

0 commit comments

Comments
 (0)