Merge branch 'develop' of https://github.com/llk/scratch-gui into develop
This commit is contained in:
commit
46acc81843
8 files changed
+62
-13
No files matched your search
Generated
+12
-12
@@ -3978,7 +3978,7 @@
|
||||
"amdefine": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
|
||||
"integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg=="
|
||||
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
|
||||
},
|
||||
"ansi-colors": {
|
||||
"version": "3.2.4",
|
||||
@@ -4569,9 +4569,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"follow-redirects": {
|
||||
"version": "1.14.9",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
|
||||
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.0.tgz",
|
||||
"integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -5368,7 +5368,7 @@
|
||||
"browser-stdout": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz",
|
||||
"integrity": "sha512-7Rfk377tpSM9TWBEeHs0FlDZGoAIei2V/4MdZJoFMBFAK6BqLpxAIUepGRHGdPFgGsLb02PXovC4qddyHvQqTg=="
|
||||
"integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8="
|
||||
},
|
||||
"browserify-aes": {
|
||||
"version": "1.2.0",
|
||||
@@ -5724,9 +5724,9 @@
|
||||
}
|
||||
},
|
||||
"chromedriver": {
|
||||
"version": "100.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-100.0.0.tgz",
|
||||
"integrity": "sha512-oLfB0IgFEGY9qYpFQO/BNSXbPw7bgfJUN5VX8Okps9W2qNT4IqKh5hDwKWtpUIQNI6K3ToWe2/J5NdpurTY02g==",
|
||||
"version": "101.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-101.0.0.tgz",
|
||||
"integrity": "sha512-LkkWxy6KM/0YdJS8qBeg5vfkTZTRamhBfOttb4oic4echDgWvCU1E8QcBbUBOHqZpSrYMyi7WMKmKMhXFUaZ+w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@testim/chrome-version": "^1.1.2",
|
||||
@@ -5754,9 +5754,9 @@
|
||||
}
|
||||
},
|
||||
"del": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz",
|
||||
"integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz",
|
||||
"integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"globby": "^11.0.1",
|
||||
@@ -13813,7 +13813,7 @@
|
||||
"color-convert": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-0.5.3.tgz",
|
||||
"integrity": "sha1-vbbGnOZg+t/+CwAHzER+G59ygr0="
|
||||
"integrity": "sha512-RwBeO/B/vZR3dfKL1ye/vx8MHZ40ugzpyfeVG5GsiuGnrlMWe2o8wxBbLCpw9CsxV+wHuzYlCiWnybrIA0ling=="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "10.0.3",
|
||||
"babel-loader": "8.2.2",
|
||||
"chromedriver": "100.0.0",
|
||||
"chromedriver": "101.0.0",
|
||||
"enzyme": "3.10.0",
|
||||
"enzyme-adapter-react-16": "1.3.0",
|
||||
"eslint": "5.16.0",
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -87,4 +87,25 @@ describe('Loading scratch gui', () => {
|
||||
expect(tileVisible).toBe(true);
|
||||
});
|
||||
|
||||
test('Load sb3 project with a missing bmp costume', async () => {
|
||||
await loadUri(uri);
|
||||
await clickText('File');
|
||||
await clickText('Load from your computer');
|
||||
const input = await findByXpath('//input[@accept=".sb,.sb2,.sb3"]');
|
||||
await input.sendKeys(path.resolve(__dirname, '../fixtures/missing-bmp.sb3'));
|
||||
const spriteTile = await findByText('green-bmp-guy');
|
||||
const tileVisible = await spriteTile.isDisplayed();
|
||||
expect(tileVisible).toBe(true);
|
||||
});
|
||||
|
||||
test('Load sb3 project with an invalid bmp costume', async () => {
|
||||
await loadUri(uri);
|
||||
await clickText('File');
|
||||
await clickText('Load from your computer');
|
||||
const input = await findByXpath('//input[@accept=".sb,.sb2,.sb3"]');
|
||||
await input.sendKeys(path.resolve(__dirname, '../fixtures/corrupt-bmp.sb3'));
|
||||
const spriteTile = await findByText('green-bmp-guy');
|
||||
const tileVisible = await spriteTile.isDisplayed();
|
||||
expect(tileVisible).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -270,4 +270,32 @@ describe('Working with sprites', () => {
|
||||
await expect(tileVisible).toBe(true);
|
||||
});
|
||||
|
||||
test('Load a sprite3 with a missing bmp costume', async () => {
|
||||
await loadUri(uri);
|
||||
const el = await findByXpath('//button[@aria-label="Choose a Sprite"]');
|
||||
await driver.actions().mouseMove(el)
|
||||
.perform();
|
||||
await driver.sleep(500); // Wait for thermometer menu to come up
|
||||
const input = await findByXpath('//input[@type="file"]');
|
||||
await input.sendKeys(path.resolve(__dirname, '../fixtures/missing-bmp.sprite3'));
|
||||
const tile = await findByText('green-bmp-guy', scope.spriteTile);
|
||||
const tileVisible = await tile.isDisplayed();
|
||||
await expect(tileVisible).toBe(true);
|
||||
});
|
||||
|
||||
test('Load a sprite3 with a currupt bmp costume', async () => {
|
||||
await loadUri(uri);
|
||||
const el = await findByXpath('//button[@aria-label="Choose a Sprite"]');
|
||||
await driver.actions().mouseMove(el)
|
||||
.perform();
|
||||
await driver.sleep(500); // Wait for thermometer menu to come up
|
||||
const input = await findByXpath('//input[@type="file"]');
|
||||
await input.sendKeys(path.resolve(__dirname, '../fixtures/corrupt-bmp.sprite3'));
|
||||
const tile = await findByText('green-bmp-guy', scope.spriteTile);
|
||||
const tileVisible = await tile.isDisplayed();
|
||||
await expect(tileVisible).toBe(true);
|
||||
});
|
||||
|
||||
// TODO: uploading a corrupt bmp as a sprite should throw an error and not add a gray question mark
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user