Skip to content
Snippets Groups Projects
Commit 6dd6c685 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Add an integration test for toolbox updating after see-inside.

I needed to update the player css because the editor side wasn't large enough to be useable.
parent ebbf292f
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
width: calc(480px + 1rem); width: calc(480px + 1rem);
} }
.editor {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.stage-only * { .stage-only * {
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -21,11 +21,7 @@ if (process.env.NODE_ENV === 'production' && typeof window === 'object') { ...@@ -21,11 +21,7 @@ if (process.env.NODE_ENV === 'production' && typeof window === 'object') {
import styles from './player.css'; import styles from './player.css';
const Player = ({isPlayerOnly, onSeeInside, projectId}) => ( const Player = ({isPlayerOnly, onSeeInside, projectId}) => (
<Box <Box className={classNames(isPlayerOnly ? styles.stageOnly : styles.editor)}>
className={classNames({
[styles.stageOnly]: isPlayerOnly
})}
>
{isPlayerOnly && <button onClick={onSeeInside}>{'See inside'}</button>} {isPlayerOnly && <button onClick={onSeeInside}>{'See inside'}</button>}
<GUI <GUI
enableCommunity enableCommunity
......
...@@ -228,4 +228,21 @@ describe('Working with the blocks', () => { ...@@ -228,4 +228,21 @@ describe('Working with the blocks', () => {
await driver.sleep(500); // Wait for scroll to finish await driver.sleep(500); // Wait for scroll to finish
await clickText('Meow', scope.blocksTab); // Meow, not A Bass await clickText('Meow', scope.blocksTab); // Meow, not A Bass
}); });
// Regression test for switching between editor/player causing toolbox to stop updating
test('"See inside" after being on project page re-initializing variables', async () => {
const playerUri = path.resolve(__dirname, '../../build/player.html');
await loadUri(playerUri);
await clickText('See inside');
await clickText('Variables');
await driver.sleep(500); // Wait for scroll to finish
await clickText('my\u00A0variable');
await clickText('See Project Page');
await clickText('See inside');
await clickText('Variables');
await driver.sleep(500); // Wait for scroll to finish
await clickText('my\u00A0variable');
});
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment