mirror of
https://github.com/ijprest/keyboard-layout-editor.git
synced 2026-04-10 02:00:46 -07:00
Testing: Added regression tests for various samples
This commit is contained in:
parent
7d8f090064
commit
bd2c69b308
6 changed files with 33 additions and 2 deletions
|
|
@ -8,12 +8,43 @@ function getSpecName() {
|
|||
// Tests for keyboard-layout-editor
|
||||
describe('keyboard-layout-editor', function() {
|
||||
var home = 'http://localhost:8080/kb.html';
|
||||
var kbScreenshot = function() {
|
||||
browser.waitForAngular();
|
||||
browser.driver.manage().window().setSize(1440,1024);
|
||||
browser.actions().mouseMove({x:0,y:0}).perform();
|
||||
browser.waitForAngular();
|
||||
capture.snap(getSpecName(), $('#keyboard'));
|
||||
};
|
||||
|
||||
// Simple launch test
|
||||
it('should launch without an error', function() {
|
||||
browser.get(home);
|
||||
browser.driver.manage().window().setSize(1280,720);
|
||||
capture.snap(getSpecName(), $('#keyboard'));
|
||||
kbScreenshot();
|
||||
});
|
||||
|
||||
// Test renderings of various samples
|
||||
describe('rendering sample', function() {
|
||||
it('commodore-vic20', function() {
|
||||
browser.get(home + "#/samples/commodore-vic20");
|
||||
browser.waitForAngular();
|
||||
browser.driver.sleep(2000); // give the browser time to load the custom font
|
||||
kbScreenshot();
|
||||
});
|
||||
|
||||
it('gb-ccng', function() {
|
||||
browser.get(home + "#/samples/gb-ccng");
|
||||
kbScreenshot();
|
||||
});
|
||||
|
||||
it('gb-retro-dsa', function() {
|
||||
browser.get(home + "#/samples/gb-retro-dsa");
|
||||
kbScreenshot();
|
||||
});
|
||||
|
||||
it('stealth-black', function() {
|
||||
browser.get(home + "#/samples/stealth-black");
|
||||
kbScreenshot();
|
||||
});
|
||||
});
|
||||
|
||||
// Check for exceptions thrown during each scenario
|
||||
|
|
|
|||
BIN
tests/screenshots/commodore-vic20.png
Normal file
BIN
tests/screenshots/commodore-vic20.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
BIN
tests/screenshots/gb-ccng.png
Normal file
BIN
tests/screenshots/gb-ccng.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 112 KiB |
BIN
tests/screenshots/gb-retro-dsa.png
Normal file
BIN
tests/screenshots/gb-retro-dsa.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
BIN
tests/screenshots/stealth-black.png
Normal file
BIN
tests/screenshots/stealth-black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
Loading…
Add table
Add a link
Reference in a new issue