Skip to content

Commit 947a2d8

Browse files
author
avin_kumar
committed
Merge branch 'master' of https://github.com/codesandbox/codesandbox-client into use-overmind-modals
2 parents d3f8645 + cea1362 commit 947a2d8

File tree

94 files changed

+1728
-672
lines changed

Some content is hidden

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

94 files changed

+1728
-672
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ jobs:
279279
- build_prod
280280
test-integrations:
281281
executor: node-with-puppeteer
282+
parallelism: 2
282283
steps:
283284
- checkout_with_cache
284285
- test_integrations

.yarnclean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ docs
99
doc
1010
website
1111
images
12-
assets
1312

1413
# examples
1514
example

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"test:ci": "lerna run test --ignore codesandbox-browserfs -- --ci --testResultsProcessor=\"jest-junit\" ",
6161
"test:integrations": "lerna exec --scope app --stream -- yarn test:integrations",
6262
"test:jest-lite": "lerna exec --scope app --stream -- yarn run test jest-lite --watch --coverage",
63-
"typecheck": "lerna run typecheck --scope app"
63+
"typecheck": "lerna run typecheck"
6464
},
6565
"dependencies": {
6666
"@typescript-eslint/eslint-plugin": "^1.13.0",

packages/app/integration-tests/browser-tests/browsers.test.js

Lines changed: 61 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -38,68 +38,76 @@ function testPageWitCapabilities(capabilities) {
3838
});
3939
}
4040

41+
const PARALLEL_INDEX = Number.parseInt(process.env.CIRCLE_NODE_INDEX, 10) || 0;
42+
4143
const usedDescribe = process.env.BROWSER_STACK_KEY ? describe : describe.skip;
4244
usedDescribe('browser-tests', () => {
43-
test.skip('ie11', async () => {
44-
// Input capabilities
45-
const capabilities = {
46-
browserName: 'IE',
47-
browser_version: '11.0',
48-
os: 'Windows',
49-
os_version: '10',
50-
resolution: '1024x768',
51-
};
45+
if (PARALLEL_INDEX === 0) {
46+
test.skip('ie11', async () => {
47+
// Input capabilities
48+
const capabilities = {
49+
browserName: 'IE',
50+
browser_version: '11.0',
51+
os: 'Windows',
52+
os_version: '10',
53+
resolution: '1024x768',
54+
};
5255

53-
await testPageWitCapabilities(capabilities);
54-
}, 130000);
56+
await testPageWitCapabilities(capabilities);
57+
}, 130000);
5558

56-
test.skip('ios', async () => {
57-
// Input capabilities
58-
const capabilities = {
59-
browserName: 'iPhone',
60-
device: 'iPhone X',
61-
real_mobile: 'true',
62-
os_version: '11.0',
63-
};
59+
test.skip('ios', async () => {
60+
// Input capabilities
61+
const capabilities = {
62+
browserName: 'iPhone',
63+
device: 'iPhone X',
64+
real_mobile: 'true',
65+
os_version: '11.0',
66+
};
6467

65-
await testPageWitCapabilities(capabilities);
66-
}, 130000);
68+
await testPageWitCapabilities(capabilities);
69+
}, 130000);
6770

68-
test('firefox', async () => {
69-
// Input capabilities
70-
const capabilities = {
71-
browserName: 'Firefox',
72-
browser_version: '58.0',
73-
os: 'Windows',
74-
os_version: '10',
75-
resolution: '1024x768',
76-
};
71+
test('firefox', async () => {
72+
// Input capabilities
73+
const capabilities = {
74+
browserName: 'Firefox',
75+
browser_version: '58.0',
76+
os: 'Windows',
77+
os_version: '10',
78+
resolution: '1024x768',
79+
};
7780

78-
await testPageWitCapabilities(capabilities);
79-
}, 130000);
81+
await testPageWitCapabilities(capabilities);
82+
}, 130000);
8083

81-
test('safari', async () => {
82-
// Input capabilities
83-
const capabilities = {
84-
browserName: 'Safari',
85-
browser_version: '11.0',
86-
os: 'OS X',
87-
os_version: 'High Sierra',
88-
resolution: '1024x768',
89-
};
84+
test('safari', async () => {
85+
// Input capabilities
86+
const capabilities = {
87+
browserName: 'Safari',
88+
browser_version: '11.0',
89+
os: 'OS X',
90+
os_version: 'High Sierra',
91+
resolution: '1024x768',
92+
};
9093

91-
await testPageWitCapabilities(capabilities);
92-
}, 130000);
94+
await testPageWitCapabilities(capabilities);
95+
}, 130000);
9396

94-
test.skip('android', async () => {
95-
// Input capabilities
96-
const capabilities = {
97-
browserName: 'android',
98-
device: 'Samsung Galaxy S8',
99-
real_mobile: 'true',
100-
os_version: '7.0',
101-
};
97+
test.skip('android', async () => {
98+
// Input capabilities
99+
const capabilities = {
100+
browserName: 'android',
101+
device: 'Samsung Galaxy S8',
102+
real_mobile: 'true',
103+
os_version: '7.0',
104+
};
102105

103-
await testPageWitCapabilities(capabilities);
104-
}, 130000);
106+
await testPageWitCapabilities(capabilities);
107+
}, 130000);
108+
} else {
109+
test('it just works', () => {
110+
expect(1).toBe(1);
111+
});
112+
}
105113
});
3.84 KB
Loading
4.26 KB
Loading

packages/app/integration-tests/tests/sandboxes.test.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,22 @@ const SANDBOXES = [
3838
'31kn7voz4q', // cxjs
3939
'zw9zjy0683', // aurelia
4040
'zx22owojr3', // vue v-slot test
41-
'4888omqqz7', // material-ui https://github.com/codesandbox/codesandbox-client/issues/1741
41+
'4888omqqz7', // material-ui https://github.com/codesandbox/codesandbox-client/issues/1741,
42+
'sebn6', // babel plugin dynamically downloaded
43+
'utmms', // babel plugin pragmatic-jsx which requires other babel plugin
4244
];
4345
const SANDBOXES_REPO = 'codesandbox/integration-sandboxes';
4446

47+
// Logic for parallelizing the tests
48+
const PARALLEL_NODES = Number.parseInt(process.env.CIRCLE_NODE_TOTAL, 10) || 1;
49+
const PARALLEL_INDEX = Number.parseInt(process.env.CIRCLE_NODE_INDEX, 10) || 0;
50+
51+
const batchSize = Math.floor(SANDBOXES.length / PARALLEL_NODES);
52+
const sandboxesToTest = SANDBOXES.slice(
53+
batchSize * PARALLEL_INDEX,
54+
batchSize * (PARALLEL_INDEX + 1)
55+
);
56+
4557
function pageLoaded(page) {
4658
return new Promise(async resolve => {
4759
await page.exposeFunction('__puppeteer__', () => {
@@ -110,7 +122,7 @@ describe('sandboxes', () => {
110122
browser.close();
111123
});
112124

113-
SANDBOXES.forEach(sandbox => {
125+
sandboxesToTest.forEach(sandbox => {
114126
const id = sandbox.id || sandbox;
115127
const threshold = sandbox.threshold || 0.01;
116128

packages/app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@
156156
"normalizr": "^3.2.3",
157157
"onigasm": "^2.2.1",
158158
"ot": "^0.0.15",
159-
"overmind": "^20.0.0",
159+
"overmind": "^20.1.0-1572182984474",
160160
"overmind-devtools": "^19.0.0",
161-
"overmind-react": "^21.0.0",
161+
"overmind-react": "^21.1.0-1572182984474",
162162
"phoenix": "^1.3.0",
163163
"postcss": "^6.0.9",
164164
"postcss-selector-parser": "^2.2.3",

packages/app/src/app/components/GitProgress/GitProgress.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react';
22
import {
33
Container,
4+
Cube,
45
DeployAnimationContainer,
6+
DeployText,
57
GitHubLogo,
6-
Cube,
78
OpaqueLogo,
8-
DeployText,
99
Result,
1010
} from './elements';
1111

1212
interface IGitProgressProps {
13-
result: string;
13+
result: string | null;
1414
message: string;
1515
}
1616

packages/app/src/app/overmind/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export const searchMounted: AsyncAction = withLoadApp();
1919

2020
export const codesadboxMounted: AsyncAction = withLoadApp();
2121

22+
export const genericPageMounted: AsyncAction = withLoadApp();
23+
2224
export const cliMounted: AsyncAction = withLoadApp(
2325
async ({ state, actions }) => {
2426
if (state.user) {
@@ -72,7 +74,6 @@ type ModalName =
7274
| 'netlifyLogs'
7375
| 'newSandbox'
7476
| 'preferences'
75-
| 'privacyServerWarning'
7677
| 'share'
7778
| 'searchDependencies'
7879
| 'signInForTemplates';

0 commit comments

Comments
 (0)