Skip to content

Commit

Permalink
run webdriver spec for all breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Oct 17, 2015
1 parent ca926de commit 3440598
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions test/specs/webdriver.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// TODO: run these tests for all breakpoints

describe('matchHeight browser tests', function() {
it('passes all specs in matchHeight.spec.js', function(done) {
describe('matchHeight webdriver', function() {
var runAllTests = function(done, width, height) {
browser
.setViewportSize({ width: width, height: height })
.url('http://localhost:8000/test/page/test.html')
.waitForExist('.jasmine_html-reporter', 5000)
.execute(function() {
Expand All @@ -16,5 +15,17 @@ describe('matchHeight browser tests', function() {
expect(ret.value.passed).toBe(ret.value.total, 'number of specs passed');
expect(ret.value.failed).toBe(0, 'number of specs failed');
}).call(done);
};

it('passes matchHeight.spec.js at desktop breakpoint', function(done) {
runAllTests(done, 1280, 1024);
});

it('passes matchHeight.spec.js at tablet breakpoint', function(done) {
runAllTests(done, 640, 480);
});

it('passes matchHeight.spec.js at mobile breakpoint', function(done) {
runAllTests(done, 320, 640);
});
});

0 comments on commit 3440598

Please sign in to comment.