@@ -35,16 +35,16 @@ The `configure()` function replaces standard browser launchers (Chrome, Firefox,
3535
3636> ** Note for Ember + Vite projects** : The ` cwd: 'dist' ` option is required because Vite builds test files into the ` dist/ ` directory. Without this, Testem won't find your test assets.
3737
38- ### 2. Write Tests with Snapshots
38+ ### 2. Write Tests with Screenshots
3939
40- Import ` vizzlySnapshot ` in your test files:
40+ Import ` vizzlyScreenshot ` in your test files:
4141
4242``` javascript
4343// tests/acceptance/dashboard-test.js
4444import { module , test } from ' qunit' ;
4545import { visit } from ' @ember/test-helpers' ;
4646import { setupApplicationTest } from ' ember-qunit' ;
47- import { vizzlySnapshot } from ' @vizzly-testing/ember/test-support' ;
47+ import { vizzlyScreenshot } from ' @vizzly-testing/ember/test-support' ;
4848
4949module (' Acceptance | Dashboard' , function (hooks ) {
5050 setupApplicationTest (hooks);
@@ -53,7 +53,7 @@ module('Acceptance | Dashboard', function(hooks) {
5353 await visit (' /dashboard' );
5454
5555 // Capture screenshot
56- await vizzlySnapshot (' dashboard-empty' );
56+ await vizzlyScreenshot (' dashboard-empty' );
5757
5858 assert .dom (' [data-test-empty-state]' ).exists ();
5959 });
@@ -63,7 +63,7 @@ module('Acceptance | Dashboard', function(hooks) {
6363 await visit (' /dashboard' );
6464
6565 // Capture specific element
66- await vizzlySnapshot (' dashboard-table' , {
66+ await vizzlyScreenshot (' dashboard-table' , {
6767 selector: ' [data-test-data-table]'
6868 });
6969
@@ -142,29 +142,29 @@ The second argument accepts [Playwright browserType.launch() options](https://pl
142142- ` Firefox ` → Uses Playwright Firefox
143143- ` Safari ` / ` WebKit ` → Uses Playwright WebKit
144144
145- ### ` vizzlySnapshot (name, options?)`
145+ ### ` vizzlyScreenshot (name, options?)`
146146
147147Captures a screenshot and sends it to Vizzly for comparison. By default, captures just the ` #ember-testing ` container (your app), not the QUnit test runner UI.
148148
149149``` javascript
150- import { vizzlySnapshot } from ' @vizzly-testing/ember/test-support' ;
150+ import { vizzlyScreenshot } from ' @vizzly-testing/ember/test-support' ;
151151
152152// Basic usage - captures app at 1280x720
153- await vizzlySnapshot (' homepage' );
153+ await vizzlyScreenshot (' homepage' );
154154
155155// Mobile viewport
156- await vizzlySnapshot (' homepage-mobile' , {
156+ await vizzlyScreenshot (' homepage-mobile' , {
157157 width: 375 ,
158158 height: 667
159159});
160160
161161// Capture specific element within the app
162- await vizzlySnapshot (' login-form' , {
162+ await vizzlyScreenshot (' login-form' , {
163163 selector: ' [data-test-login-form]'
164164});
165165
166166// Full options
167- await vizzlySnapshot (' screenshot-name' , {
167+ await vizzlyScreenshot (' screenshot-name' , {
168168 // Viewport dimensions (default: 1280x720)
169169 width: 1280 ,
170170 height: 720 ,
@@ -198,7 +198,7 @@ await vizzlySnapshot('screenshot-name', {
198198| ` selector ` | string | null | CSS selector to capture specific element |
199199| ` scope ` | string | 'app' | What to capture: ` 'app' ` (just #ember-testing), ` 'container' ` , or ` 'page' ` (full page including QUnit) |
200200| ` fullPage ` | boolean | false | Capture full scrollable content |
201- | ` properties ` | object | {} | Custom metadata attached to the snapshot |
201+ | ` properties ` | object | {} | Custom metadata attached to the screenshot |
202202| ` failOnDiff ` | boolean | null | Fail the test when visual diff is detected. ` null ` uses the ` --fail-on-diff ` CLI flag. |
203203
204204The function automatically:
@@ -214,7 +214,7 @@ Check if Vizzly is available in the current test environment.
214214import { isVizzlyAvailable } from ' @vizzly-testing/ember/test-support' ;
215215
216216if (isVizzlyAvailable ()) {
217- await vizzlySnapshot (' conditional-snapshot ' );
217+ await vizzlyScreenshot (' conditional-screenshot ' );
218218}
219219```
220220
@@ -239,7 +239,7 @@ npx playwright install webkit
2392391 . ** Testem Configuration** : The ` configure() ` wrapper replaces standard browser launchers with custom Vizzly launchers
2402402 . ** Custom Launcher** : When Testem starts, it spawns ` vizzly-testem-launcher ` which uses Playwright
2412413 . ** Playwright Integration** : The launcher uses Playwright to control the browser and capture screenshots
242- 4 . ** Snapshot Server** : A local HTTP server receives screenshot requests from test code
242+ 4 . ** Screenshot Server** : A local HTTP server receives screenshot requests from test code
2432435 . ** Vizzly Integration** : Screenshots are forwarded to the Vizzly TDD server for comparison
244244
245245## CI/CD
@@ -268,15 +268,15 @@ By default, visual differences don't fail tests (similar to Percy). To fail test
268268# Via CLI flag
269269vizzly tdd start --fail-on-diff
270270
271- # Or per-snapshot in your test
272- await vizzlySnapshot ('critical-ui', { failOnDiff : true });
271+ # Or per-screenshot in your test
272+ await vizzlyScreenshot ('critical-ui', { failOnDiff : true });
273273` ` `
274274
275- The priority order is: per-snapshot option > ` --fail-on-diff` CLI flag > default (no failure).
275+ The priority order is: per-screenshot option > ` --fail-on-diff` CLI flag > default (no failure).
276276
277277# # Troubleshooting
278278
279- # ## "No snapshot server available"
279+ # ## "No screenshot server available"
280280
281281Tests must be run through Testem with the Vizzly-configured launchers. Ensure :
282282- ` testem.js` uses `configure()` wrapper
0 commit comments