Skip to content

Commit 35bba91

Browse files
author
Ives van Hoorne
committed
Add more test sandboxes
1 parent ffb9eed commit 35bba91

File tree

9 files changed

+13
-4
lines changed

9 files changed

+13
-4
lines changed
56.8 KB
Loading
131 KB
Loading
47.9 KB
Loading
8.19 KB
Loading
31.3 KB
Loading
17.5 KB
Loading
41.6 KB
Loading
14.1 KB
Loading

integration-tests/tests/sandboxes.test.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
import puppeteer from 'puppeteer';
2-
import { basename } from 'path';
32

43
const SANDBOXES = [
54
'new',
65
'preact',
7-
{ id: 'vue', root: 'app' },
6+
{ id: 'vue', root: '#app' },
87
'svelte',
98
'react-ts',
109
'github/reactjs/redux/tree/master/examples/todomvc',
10+
'jvlrl98xw3',
11+
'vVoQVk78',
12+
'github/faceyspacey/redux-first-router-codesandbox/tree/master',
13+
'mZRjw05yp',
14+
'pk1qjqpw67',
15+
'X6npLXPRW',
16+
{ id: 'o29j95wx9', root: '#app' },
17+
{ id: 'k3q1zjjml5', root: '#app' },
1118
];
1219

1320
SANDBOXES.forEach(sandbox => {
1421
const id = sandbox.id || sandbox;
15-
const root = sandbox.root || 'root';
22+
const root = sandbox.root || '#root';
1623
let browser = puppeteer.launch();
1724

1825
describe('sandboxes', () => {
@@ -26,7 +33,7 @@ SANDBOXES.forEach(sandbox => {
2633
browser = await browser;
2734
const page = await browser.newPage();
2835
await page.goto('http://localhost:3001/#' + id);
29-
await page.waitForSelector('#' + root);
36+
await page.waitForSelector(root);
3037
await page.waitFor(2000);
3138

3239
// const html = await page.evaluate(() => document.body.innerHTML);
@@ -40,6 +47,8 @@ SANDBOXES.forEach(sandbox => {
4047
},
4148
customSnapshotIdentifier: id.split('/').join('-'),
4249
});
50+
51+
page.close();
4352
},
4453
1000 * 60 * 10 // 10 minutes for all tests in total
4554
);

0 commit comments

Comments
 (0)