diff --git a/testem.json b/testem.json index 6280a9793..79d466a5c 100644 --- a/testem.json +++ b/testem.json @@ -3,10 +3,11 @@ "test_page": "tests/index.html?hidepassed", "disable_watching": true, "launch_in_ci": [ - "PhantomJS" + "Chrome", + "Firefox" ], "launch_in_dev": [ - "PhantomJS", - "Chrome" + "Chrome", + "Firefox" ] } diff --git a/tests/acceptance/posts/post-test.js b/tests/acceptance/posts/post-test.js index 267161e58..17cd403f6 100644 --- a/tests/acceptance/posts/post-test.js +++ b/tests/acceptance/posts/post-test.js @@ -41,12 +41,13 @@ describe('Acceptance: Posts - Post', function() { visit('/'); andThen(() => { - // it redirects to first post - expect(currentURL(), 'currentURL').to.equal(`/${posts[0].id}`); - - expect(find('.posts-list li').first().hasClass('active'), 'highlights latest post').to.be.true; - expect(find('.posts-list li').length, 'post list count').to.equal(3); + + // if we're in "desktop" size, we should redirect and highlight + if (find('.content-preview:visible').length) { + expect(currentURL(), 'currentURL').to.equal(`/${posts[0].id}`); + expect(find('.posts-list li').first().hasClass('active'), 'highlights latest post').to.be.true; + } }); }); diff --git a/tests/acceptance/settings/tags-test.js b/tests/acceptance/settings/tags-test.js index 71bd4f11f..35334c4b3 100644 --- a/tests/acceptance/settings/tags-test.js +++ b/tests/acceptance/settings/tags-test.js @@ -267,7 +267,9 @@ describe('Acceptance: Settings - Tags', function () { find('.tag-list').scrollTop(find('.tag-list-content').height()); }); - wait().then(() => { + triggerEvent('.tag-list', 'scroll'); + + andThen(() => { // it loads the second page expect(find('.settings-tags .settings-tag').length, 'tag list count on second load') .to.equal(30); @@ -275,7 +277,9 @@ describe('Acceptance: Settings - Tags', function () { find('.tag-list').scrollTop(find('.tag-list-content').height()); }); - wait().then(() => { + triggerEvent('.tag-list', 'scroll'); + + andThen(() => { // it loads the final page expect(find('.settings-tags .settings-tag').length, 'tag list count on third load') .to.equal(32); diff --git a/tests/index.html b/tests/index.html index f0e8a6729..b7426ce0a 100644 --- a/tests/index.html +++ b/tests/index.html @@ -33,6 +33,13 @@ #ember-testing > div { height: 100%; } + /* fix firefox not supporting `zoom: 50%` */ + _::-moz-range-track, body:last-child #ember-testing { + -moz-transform-origin: 0 0; + -moz-transform: scale(0.5); + width: 200%; + height: 200%; + }