Skip to content

Commit 45abb30

Browse files
author
Ives van Hoorne
committed
Add more integration tests
1 parent 7b858af commit 45abb30

File tree

9 files changed

+12
-7
lines changed

9 files changed

+12
-7
lines changed

docker/Dockerfile.integrations

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM 'circleci/node:9.0'
1+
FROM 'circleci/node:9'
22

33
RUN sudo apt-get update && sudo apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
44
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \

generate-test-screenshots.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
2-
docker run -v $(pwd):/home/circleci/codesandbox-client -w /home/circleci/codesandbox-client --name test-container -t codesandbox/node-puppeteer yarn start:test && \
3-
id=$(docker inspect --format="{{.Id}}" test-container) && \
4-
docker exec $(id) yarn test:integrations
2+
docker run --rm --name test-container -v $(pwd):/home/circleci/codesandbox-client -w /home/circleci/codesandbox-client -d -t codesandbox/node-puppeteer yarn start:test && \
3+
sleep 6 && docker exec -it test-container yarn test:integrations && \
4+
docker stop test-container
5.01 KB
Loading
27.4 KB
Loading
47.1 KB
Loading
Loading
4.86 KB
Loading

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ const SANDBOXES = [
1818
'github/CompuIves/codesandbox-presentation',
1919
'lp5rjr0z4z',
2020
'nOymMxyY',
21+
'y26rj99yov', // react transition
22+
'X6npLXPRW', // react-table
23+
'6w66jzw3mn', // material-design & preact
24+
'4j7m47vlm4', // material-ui
25+
'github/cssinjs/egghead/tree/master/from-sass-to-cssinjs/templates-and-variables', // postcss egghead
2126
];
2227

2328
function pageLoaded(page) {
@@ -42,7 +47,7 @@ describe('sandboxes', () => {
4247
const id = sandbox.id || sandbox;
4348
const threshold = sandbox.threshold || 0.01;
4449

45-
it(
50+
it.concurrent(
4651
`loads the sandbox with id '${id}'`,
4752
async () => {
4853
browser = await browser;
@@ -65,7 +70,7 @@ describe('sandboxes', () => {
6570

6671
await page.close();
6772
},
68-
1000 * 60 * 1
73+
1000 * 120 * 1
6974
);
7075
});
7176
});

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build": "NODE_ENV=production node scripts/build.js",
1111
"test": "jest --env=jsdom",
1212
"test:watch": "jest --watch --env=jsdom",
13-
"test:integrations": "jest --config integration-tests/jest.config.json --env=jsdom --maxWorkers=2",
13+
"test:integrations": "jest --config integration-tests/jest.config.json --maxWorkers=2",
1414
"lint": "npm run lint:app && npm run lint:embed",
1515
"lint:app": "eslint src/app",
1616
"lint:embed": "eslint src/embed",

0 commit comments

Comments
 (0)