Skip to content

Commit 1278278

Browse files
authored
🧪 Add preview command to static-site SDK E2E tests (#185)
## Summary - Adds `vizzly preview` step to the static-site SDK E2E workflow - Uploads the test-site as a preview after cloud mode tests complete - Tests the preview command in real CI conditions ## Test plan - [ ] CI runs the static-site SDK E2E job - [ ] Preview upload step succeeds after `vizzly run` - [ ] Preview URL is generated and linked to the build
1 parent a927e17 commit 1278278

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/sdk-e2e.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ jobs:
248248
VIZZLY_COMMIT_MESSAGE: ${{ github.event.pull_request.head.commit.message || github.event.head_commit.message }}
249249
VIZZLY_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }}
250250

251+
- name: Upload preview
252+
working-directory: ./clients/static-site
253+
run: ../../bin/vizzly.js preview ../../test-site
254+
env:
255+
VIZZLY_TOKEN: ${{ secrets.VIZZLY_STATIC_SITE_CLIENT_TOKEN }}
256+
251257
# Ember SDK
252258
ember:
253259
name: Ember SDK

clients/static-site/tests/sdk-integration.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ describe('Static-Site E2E with shared test-site', { skip: !runE2E }, () => {
326326
pool = createTabPool(browser, 2);
327327

328328
let pages = [
329-
{ path: '/index.html', source: 'html' },
330-
{ path: '/features.html', source: 'html' },
331-
{ path: '/pricing.html', source: 'html' },
329+
{ path: '/', source: 'html' },
330+
{ path: '/features', source: 'html' },
331+
{ path: '/pricing', source: 'html' },
332332
];
333333

334334
let config = {

0 commit comments

Comments
 (0)