From aafbf14c419c077fd9d412b2fa2734d807d42bc9 Mon Sep 17 00:00:00 2001 From: nickevansuk <2616208+nickevansuk@users.noreply.github.com> Date: Tue, 6 Aug 2024 20:58:03 +0100 Subject: [PATCH 1/4] chore: Add Lost Pixel support --- .github/workflows/test-and-deploy.yml | 6 ++++++ lostpixel.config.js | 13 +++++++++++++ package.json | 1 + 3 files changed, 20 insertions(+) create mode 100644 lostpixel.config.js diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index e531018..cfbd1e0 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -71,6 +71,12 @@ jobs: run: npm install - name: Test run: npm test + - name: Start server (in background) + run: npm run start & + - name: Lost Pixel + uses: lost-pixel/lost-pixel@v3.16.0 + env: + LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }} deploy-site: needs: [test-site, test-models, test-data-model-validator, test-rpde-validator] diff --git a/lostpixel.config.js b/lostpixel.config.js new file mode 100644 index 0000000..08b855c --- /dev/null +++ b/lostpixel.config.js @@ -0,0 +1,13 @@ +module.exports = { + pageShots: { + pages: [ + { path: '/', name: 'model-validator-home' }, + { path: '/rpde', name: 'rpde-validator-home' }, + { path: '/?url=https%3A%2F%2Fopenactive.io%2Fdata-models%2Fversions%2F2.x%2Fexamples%2Fsessionseries-split_example_1.json&version=2.x', name: 'sessionseries' }, + { path: '/?url=https%3A%2F%2Fopenactive.io%2Fdata-models%2Fversions%2F2.x%2Fexamples%2Fscheduledsession-split_example_1.json&version=2.x', name: 'scheduledsession' }, + ], + baseUrl: 'http://localhost:8080', + }, + lostPixelProjectId: 'clzitt4s52b6dlcoguswodrsj', + apiKey: process.env.LOST_PIXEL_API_KEY, +}; diff --git a/package.json b/package.json index a64c4fe..734ce12 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "jquery": "^3.3.1", "js-base64": "^3.3.3", "jsonpath": "^1.0.0", + "lost-pixel": "^3.18.2", "markdown-to-jsx": "^6.7.3", "npm": "^6.12.1", "popper.js": "^1.14.4", From 656a2b4d81ce20640442853beb73cab3a2b6da06 Mon Sep 17 00:00:00 2001 From: nickevansuk <2616208+nickevansuk@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:06:23 +0100 Subject: [PATCH 2/4] Move dev dependency to the right place --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 734ce12..88276e5 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "jquery": "^3.3.1", "js-base64": "^3.3.3", "jsonpath": "^1.0.0", - "lost-pixel": "^3.18.2", "markdown-to-jsx": "^6.7.3", "npm": "^6.12.1", "popper.js": "^1.14.4", @@ -105,6 +104,7 @@ "jasmine": "^3.2.0", "jasmine-enzyme": "^6.1.2", "jsdom": "^11.12.0", + "lost-pixel": "^3.18.2", "node-sass": "^4.9.3", "nodemon": "^1.18.4", "sass-loader": "^7.1.0", From 96270038342f800618000faa48bd83a7b77718b0 Mon Sep 17 00:00:00 2001 From: nickevansuk <2616208+nickevansuk@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:18:37 +0100 Subject: [PATCH 3/4] Try IP address in docs --- lostpixel.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lostpixel.config.js b/lostpixel.config.js index 08b855c..61078ae 100644 --- a/lostpixel.config.js +++ b/lostpixel.config.js @@ -6,7 +6,7 @@ module.exports = { { path: '/?url=https%3A%2F%2Fopenactive.io%2Fdata-models%2Fversions%2F2.x%2Fexamples%2Fsessionseries-split_example_1.json&version=2.x', name: 'sessionseries' }, { path: '/?url=https%3A%2F%2Fopenactive.io%2Fdata-models%2Fversions%2F2.x%2Fexamples%2Fscheduledsession-split_example_1.json&version=2.x', name: 'scheduledsession' }, ], - baseUrl: 'http://localhost:8080', + baseUrl: 'http://172.17.0.1:8080', }, lostPixelProjectId: 'clzitt4s52b6dlcoguswodrsj', apiKey: process.env.LOST_PIXEL_API_KEY, From 1c083955654bef5a62711a9a498a772198aa50ff Mon Sep 17 00:00:00 2001 From: nickevansuk <2616208+nickevansuk@users.noreply.github.com> Date: Wed, 7 Aug 2024 19:35:51 +0100 Subject: [PATCH 4/4] Fail on difference --- lostpixel.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lostpixel.config.js b/lostpixel.config.js index 61078ae..1f2942f 100644 --- a/lostpixel.config.js +++ b/lostpixel.config.js @@ -9,5 +9,6 @@ module.exports = { baseUrl: 'http://172.17.0.1:8080', }, lostPixelProjectId: 'clzitt4s52b6dlcoguswodrsj', + failOnDifference: true, apiKey: process.env.LOST_PIXEL_API_KEY, };