Testing: Added regression tests for various samples

This commit is contained in:
Ian Prest 2015-07-18 19:46:31 -04:00
parent 7d8f090064
commit bd2c69b308
6 changed files with 33 additions and 2 deletions

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

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

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB