Skip to content

Commit 43e36d1

Browse files
committed
Add test for sandboxes with index.html not in root
1 parent 8a52f1d commit 43e36d1

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

generate-test-screenshots.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
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
3+
sleep 50 && docker exec -it test-container yarn test:integrations && \
4+
docker stop test-container
7.65 KB
Loading

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const SANDBOXES = [
3636
'31kn7voz4q', // cxjs
3737
'zw9zjy0683', // aurelia
3838
'zx22owojr3', // vue v-slot test
39+
'4888omqqz7', // material-ui https://github.com/CompuIves/codesandbox-client/issues/1741
3940
];
4041

4142
function pageLoaded(page) {

packages/app/src/sandbox/compile.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,11 @@ async function compile({
557557
manager.clearCompiledCache();
558558
}
559559

560-
if (!manager.preset.htmlDisabled || !firstLoad) {
560+
if (
561+
!manager.preset.htmlDisabled ||
562+
!firstLoad ||
563+
process.env.LOCAL_SERVER
564+
) {
561565
// The HTML is loaded from the server as a static file, no need to set the innerHTML of the body
562566
// on the first run.
563567
document.body.innerHTML = body;

0 commit comments

Comments
 (0)