Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions addon-test-support/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export async function capture(assert, fileName, { selector = null, fullPage = tr
});
}

// if skipvisual QUnit param is true, do nothing
if (queryParams.includes('skipvisual')) {
assert.ok(true, `visual-test: ${fileName} skipped`);
return;
}

// If not in capture mode, make a request to the middleware to capture a screenshot in node
let urlQueryParams = [
`testId=${testId}`,
Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ module.exports = {
this.import('vendor/visual-test.css', {
type: 'test'
});

this.import('vendor/qunit/qunit.js', { type: 'test' });
this.import('vendor/ember-visual-test/qunit-configuration.js', {
type: 'test'
});
},

async _getBrowser() {
Expand Down
9 changes: 9 additions & 0 deletions vendor/ember-visual-test/qunit-configuration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* globals QUnit */

(function() {
QUnit.config.urlConfig.push({
id: 'skipvisual',
label: 'Skip visual tests',
tooltip: 'Pass all capture calls without performing them'
});
})();