Skip to content

Commit d841e13

Browse files
authored
refactor: Data context cleanup & IPC bindings for data push (#18357)
1 parent b07ccf8 commit d841e13

File tree

120 files changed

+1210
-813
lines changed

Some content is hidden

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

120 files changed

+1210
-813
lines changed

.gitignore

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,35 @@ cypress.zip
1313
Cached Theme.pak
1414
Cached Theme Material Design.pak
1515

16+
# from data-context, compiled .js files
17+
packages/data-context/src/**/*.js
18+
1619
# from desktop-gui
1720
packages/desktop-gui/cypress/videos
1821
packages/desktop-gui/src/jsconfig.json
1922

23+
2024
# from driver
2125
packages/driver/cypress/videos
2226
packages/driver/cypress/screenshots
2327

28+
# from launcher, compiled .js files
29+
packages/launcher/index.js
30+
packages/launcher/lib/**/*.js
31+
32+
# from network, compiled .js files
33+
packages/network/lib/**/*.js
34+
35+
# from net-stubbing, compiled .js files
36+
packages/net-stubbing/lib/**/*.js
37+
2438
# from runner
2539
packages/runner/cypress/videos
2640
packages/runner/cypress/screenshots
2741

42+
# from proxy, compiled .js files
43+
packages/proxy/lib/**/*.js
44+
2845
# npm packages
2946
npm/**/cypress/screenshots
3047

@@ -40,6 +57,9 @@ packages/server/support
4057
packages/server/test/support/fixtures/server/imgs
4158
packages/server/test/support/fixtures/server/libs
4259

60+
# from socket, dist built files
61+
packages/socket/lib/*.js
62+
4363
# from npm/react
4464
/npm/react/bin/*
4565
/npm/react/cypress/videos
@@ -347,4 +367,4 @@ globbed_node_modules
347367

348368
# Autogenerated files, typically from graphql-code-generator
349369
*.gen.ts
350-
*.gen.json
370+
*.gen.json

npm/angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"semantic-release": "17.4.2",
6060
"to-string-loader": "1.1.6",
6161
"ts-loader": "8.1.0",
62-
"ts-node": "9.1.1",
62+
"ts-node": "^10.2.1",
6363
"tslib": "^2.2.0",
6464
"tslint": "5.20.1",
6565
"typescript": "4.2.4",

npm/design-system/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"sass-loader": "10.1.1",
8080
"style-loader": "^2.0.0",
8181
"svg-url-loader": "3.0.3",
82-
"ts-node": "^9.1.1",
82+
"ts-node": "^10.2.1",
8383
"tsc-alias": "^1.2.9",
8484
"tsconfig-paths-webpack-plugin": "^3.5.1",
8585
"typed-scss-modules": "^4.1.1",

npm/webpack-preprocessor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"sinon": "^9.0.0",
5858
"sinon-chai": "^3.5.0",
5959
"snap-shot-it": "7.9.2",
60-
"ts-node": "8.10.1",
60+
"ts-node": "^10.2.1",
6161
"webpack": "^4.41.12"
6262
},
6363
"peerDependencies": {

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
"cypress:run:debug": "node ./scripts/debug.js cypress:run",
3333
"cypress:verify": "cypress verify --dev",
3434
"dev": "gulp dev",
35+
"dev:no-watch": "gulp dev:no-watch",
36+
"dev:clean": "gulp dev:clean",
3537
"gulp:debug": "node --inspect-brk ./node_modules/.bin/gulp",
3638
"dev-debug": "node ./scripts/debug.js dev",
3739
"docker": "./scripts/run-docker-local.sh",
@@ -116,6 +118,7 @@
116118
"@types/react": "16.9.50",
117119
"@types/react-dom": "16.9.8",
118120
"@types/request-promise": "4.1.45",
121+
"@types/send": "^0.17.1",
119122
"@types/sinon-chai": "3.2.3",
120123
"@types/through2": "^2.0.36",
121124
"@typescript-eslint/eslint-plugin": "4.18.0",
@@ -129,6 +132,7 @@
129132
"babel-eslint": "10.1.0",
130133
"bluebird": "3.5.3",
131134
"bluebird-retry": "0.11.0",
135+
"c8": "^7.10.0",
132136
"chai": "4.2.0",
133137
"chai-as-promised": "7.1.1",
134138
"chalk": "2.4.2",
@@ -217,7 +221,7 @@
217221
"through": "2.3.8",
218222
"through2": "^4.0.2",
219223
"tree-kill": "1.2.2",
220-
"ts-node": "8.3.0",
224+
"ts-node": "^10.2.1",
221225
"typescript": "^4.2.3",
222226
"yarn-deduplicate": "3.1.0"
223227
},

packages/app/cypress.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"projectId": "sehy69",
3-
"baseUrl": "http://localhost:5556",
43
"viewportWidth": 800,
54
"viewportHeight": 850,
65
"fixturesFolder": false,
@@ -14,11 +13,16 @@
1413
"reporterOptions": {
1514
"configFile": "../../mocha-reporter-config.json"
1615
},
16+
"integrationFolder": "cypress/e2e/integration",
1717
"componentFolder": "src",
1818
"supportFile": false,
1919
"component": {
2020
"testFiles": "**/*.spec.{js,ts,tsx,jsx}",
2121
"supportFile": "cypress/component/support/index.ts",
2222
"pluginsFile": "cypress/component/plugins/index.js"
23+
},
24+
"e2e": {
25+
"pluginsFile": "cypress/e2e/plugins/index.ts",
26+
"supportFile": "cypress/e2e/support/e2eSupport.ts"
2327
}
2428
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
let GQL_PORT
2+
let SERVER_PORT
3+
4+
describe('App', () => {
5+
beforeEach(() => {
6+
cy.withCtx(async (ctx) => {
7+
await ctx.dispose()
8+
await ctx.actions.project.setActiveProject(ctx.launchArgs.projectRoot)
9+
ctx.actions.wizard.setTestingType('e2e')
10+
await ctx.actions.project.initializeActiveProject({
11+
skipPluginIntializeForTesting: true,
12+
})
13+
14+
await ctx.actions.project.launchProject({
15+
skipBrowserOpenForTest: true,
16+
})
17+
18+
return [
19+
ctx.gqlServerPort,
20+
ctx.appServerPort,
21+
]
22+
}).then(([gqlPort, serverPort]) => {
23+
GQL_PORT = gqlPort
24+
SERVER_PORT = serverPort
25+
})
26+
})
27+
28+
it('resolves the home page', () => {
29+
cy.visit(`dist/index.html?serverPort=${SERVER_PORT}&gqlPort=${GQL_PORT}`)
30+
cy.get('[href="#/runner"]').click()
31+
cy.get('[href="#/settings"]').click()
32+
})
33+
34+
it('resolves the home page, with a different server port?', () => {
35+
cy.visit(`dist/index.html?serverPort=${SERVER_PORT}&gqlPort=${GQL_PORT}`)
36+
cy.get('[href="#/runner"]').click()
37+
cy.get('[href="#/settings"]').click()
38+
})
39+
})

packages/launchpad/cypress/plugins/index.js renamed to packages/app/cypress/e2e/plugins/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/// <reference types="cypress" />
2+
const { monorepoPaths } = require('../../../../../scripts/gulp/monorepoPaths')
3+
import { e2ePluginSetup } from '@packages/frontend-shared/cypress/e2e/e2ePluginSetup'
4+
25
// ***********************************************************
36
// This example plugins/index.js can be used to load plugins
47
//
@@ -15,8 +18,6 @@
1518
/**
1619
* @type {Cypress.PluginConfig}
1720
*/
18-
// eslint-disable-next-line no-unused-vars
19-
module.exports = (on, config) => {
20-
// `on` is used to hook into various events Cypress emits
21-
// `config` is the resolved Cypress config
21+
module.exports = async (on, config) => {
22+
return await e2ePluginSetup(monorepoPaths.pkgApp, on, config)
2223
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference path="../../../../frontend-shared/cypress/e2e/support/e2eSupport.ts" />
2+
require('../../../../frontend-shared/cypress/e2e/support/e2eSupport')

packages/app/cypress/integration/basic.spec.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)