diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f31b7b0..244e6be 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,32 @@ on: pull_request: jobs: - test: + # test: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: Unit tests + # uses: actions/setup-node@v3 + # with: + # node-version: 18.x.x + # - run: yarn + # - run: yarn test + # - name: cypress + # uses: cypress-io/github-action@v5 + # with: + # start: npm run e2e + # command: npm run cy-ci + # - name: SonarCloud Scan + # uses: SonarSource/sonarcloud-github-action@master + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # - uses: actions/upload-artifact@v3 + # with: + # name: cypress-videos + # path: cypress/videos + # if-no-files-found: ignore + e2e: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -15,41 +40,39 @@ jobs: with: node-version: 20.x.x - run: yarn - - run: yarn test + - name: Build + run: yarn build - name: cypress - if: ${{ false }} uses: cypress-io/github-action@v5 with: - start: npm run e2e + start: npm run e2e,npm run preview + wait-on: http://localhost:8080 command: npm run cy-ci - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - uses: actions/upload-artifact@v3 + if: failure() with: name: cypress-videos path: cypress/videos if-no-files-found: ignore - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Lints - uses: actions/setup-node@v3 - with: - node-version: 20.x.x - - run: yarn - - run: yarn lint - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Lints - uses: actions/setup-node@v3 - with: - node-version: 20.x.x - - run: yarn - - run: yarn build + # lint: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: Lints + # uses: actions/setup-node@v3 + # with: + # node-version: 18.x.x + # - run: yarn + # - run: yarn lint + # build: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: Lints + # uses: actions/setup-node@v3 + # with: + # node-version: 18.x.x + # - run: yarn + # - run: yarn build + # diff --git a/.gitignore b/.gitignore index 457ce2f..413dcd8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ cypress/videos *.log dist build -public .idea test-report.xml diff --git a/.yarn/cache/@discoveryjs-json-ext-npm-0.5.7-fe04af1f31-2176d301cc.zip b/.yarn/cache/@discoveryjs-json-ext-npm-0.5.7-fe04af1f31-2176d301cc.zip deleted file mode 100644 index 9502ae7..0000000 Binary files a/.yarn/cache/@discoveryjs-json-ext-npm-0.5.7-fe04af1f31-2176d301cc.zip and /dev/null differ diff --git a/.yarn/cache/@esbuild-darwin-arm64-npm-0.21.5-62349c1520-8.zip b/.yarn/cache/@esbuild-darwin-arm64-npm-0.21.5-62349c1520-8.zip new file mode 100644 index 0000000..3fcd3ef Binary files /dev/null and b/.yarn/cache/@esbuild-darwin-arm64-npm-0.21.5-62349c1520-8.zip differ diff --git a/.yarn/cache/@esbuild-linux-x64-npm-0.21.5-88079726c4-8.zip b/.yarn/cache/@esbuild-linux-x64-npm-0.21.5-88079726c4-8.zip new file mode 100644 index 0000000..541a476 Binary files /dev/null and b/.yarn/cache/@esbuild-linux-x64-npm-0.21.5-88079726c4-8.zip differ diff --git a/.yarn/cache/@jridgewell-source-map-npm-0.3.2-6fd1f37b22-1b83f0eb94.zip b/.yarn/cache/@jridgewell-source-map-npm-0.3.2-6fd1f37b22-1b83f0eb94.zip deleted file mode 100644 index cdc4bd0..0000000 Binary files a/.yarn/cache/@jridgewell-source-map-npm-0.3.2-6fd1f37b22-1b83f0eb94.zip and /dev/null differ diff --git a/.yarn/cache/@rollup-rollup-darwin-arm64-npm-4.20.0-7383387ad5-8.zip b/.yarn/cache/@rollup-rollup-darwin-arm64-npm-4.20.0-7383387ad5-8.zip new file mode 100644 index 0000000..ab950ca Binary files /dev/null and b/.yarn/cache/@rollup-rollup-darwin-arm64-npm-4.20.0-7383387ad5-8.zip differ diff --git a/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.20.0-3a2f9a8c64-8.zip b/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.20.0-3a2f9a8c64-8.zip new file mode 100644 index 0000000..fb06378 Binary files /dev/null and b/.yarn/cache/@rollup-rollup-linux-x64-gnu-npm-4.20.0-3a2f9a8c64-8.zip differ diff --git a/.yarn/cache/@sveltejs-vite-plugin-svelte-inspector-npm-2.1.0-05740412e7-8ef577bb58.zip b/.yarn/cache/@sveltejs-vite-plugin-svelte-inspector-npm-2.1.0-05740412e7-8ef577bb58.zip new file mode 100644 index 0000000..1b9cf18 Binary files /dev/null and b/.yarn/cache/@sveltejs-vite-plugin-svelte-inspector-npm-2.1.0-05740412e7-8ef577bb58.zip differ diff --git a/.yarn/cache/@sveltejs-vite-plugin-svelte-npm-3.1.1-05afcfeb55-0871e13516.zip b/.yarn/cache/@sveltejs-vite-plugin-svelte-npm-3.1.1-05afcfeb55-0871e13516.zip new file mode 100644 index 0000000..4de1937 Binary files /dev/null and b/.yarn/cache/@sveltejs-vite-plugin-svelte-npm-3.1.1-05afcfeb55-0871e13516.zip differ diff --git a/.yarn/cache/@types-eslint-npm-8.4.10-9df5f4bc78-21e009ed9e.zip b/.yarn/cache/@types-eslint-npm-8.4.10-9df5f4bc78-21e009ed9e.zip deleted file mode 100644 index a60bf0d..0000000 Binary files a/.yarn/cache/@types-eslint-npm-8.4.10-9df5f4bc78-21e009ed9e.zip and /dev/null differ diff --git a/.yarn/cache/@types-eslint-scope-npm-3.7.4-c11d226d71-ea6a9363e9.zip b/.yarn/cache/@types-eslint-scope-npm-3.7.4-c11d226d71-ea6a9363e9.zip deleted file mode 100644 index 6ae839b..0000000 Binary files a/.yarn/cache/@types-eslint-scope-npm-3.7.4-c11d226d71-ea6a9363e9.zip and /dev/null differ diff --git a/.yarn/cache/@types-estree-npm-0.0.51-bc20719267-e56a3bcf75.zip b/.yarn/cache/@types-estree-npm-0.0.51-bc20719267-e56a3bcf75.zip deleted file mode 100644 index d142551..0000000 Binary files a/.yarn/cache/@types-estree-npm-0.0.51-bc20719267-e56a3bcf75.zip and /dev/null differ diff --git a/.yarn/cache/@types-html-minifier-terser-npm-6.1.0-707ea07fcb-eb843f6a8d.zip b/.yarn/cache/@types-html-minifier-terser-npm-6.1.0-707ea07fcb-eb843f6a8d.zip deleted file mode 100644 index 1b75b3d..0000000 Binary files a/.yarn/cache/@types-html-minifier-terser-npm-6.1.0-707ea07fcb-eb843f6a8d.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-ast-npm-1.11.1-623d3d973e-1eee1534ad.zip b/.yarn/cache/@webassemblyjs-ast-npm-1.11.1-623d3d973e-1eee1534ad.zip deleted file mode 100644 index 42dd17d..0000000 Binary files a/.yarn/cache/@webassemblyjs-ast-npm-1.11.1-623d3d973e-1eee1534ad.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-floating-point-hex-parser-npm-1.11.1-f8af5c0037-b8efc6fa08.zip b/.yarn/cache/@webassemblyjs-floating-point-hex-parser-npm-1.11.1-f8af5c0037-b8efc6fa08.zip deleted file mode 100644 index 9b03be9..0000000 Binary files a/.yarn/cache/@webassemblyjs-floating-point-hex-parser-npm-1.11.1-f8af5c0037-b8efc6fa08.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-helper-api-error-npm-1.11.1-b839d59053-0792813f0e.zip b/.yarn/cache/@webassemblyjs-helper-api-error-npm-1.11.1-b839d59053-0792813f0e.zip deleted file mode 100644 index 28665e7..0000000 Binary files a/.yarn/cache/@webassemblyjs-helper-api-error-npm-1.11.1-b839d59053-0792813f0e.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.11.1-6afb1ef4aa-a337ee44b4.zip b/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.11.1-6afb1ef4aa-a337ee44b4.zip deleted file mode 100644 index c4c06dd..0000000 Binary files a/.yarn/cache/@webassemblyjs-helper-buffer-npm-1.11.1-6afb1ef4aa-a337ee44b4.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-helper-numbers-npm-1.11.1-a41f7439eb-44d2905dac.zip b/.yarn/cache/@webassemblyjs-helper-numbers-npm-1.11.1-a41f7439eb-44d2905dac.zip deleted file mode 100644 index e62e0cc..0000000 Binary files a/.yarn/cache/@webassemblyjs-helper-numbers-npm-1.11.1-a41f7439eb-44d2905dac.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-helper-wasm-bytecode-npm-1.11.1-84f0ee4c30-eac4001131.zip b/.yarn/cache/@webassemblyjs-helper-wasm-bytecode-npm-1.11.1-84f0ee4c30-eac4001131.zip deleted file mode 100644 index eae9fa0..0000000 Binary files a/.yarn/cache/@webassemblyjs-helper-wasm-bytecode-npm-1.11.1-84f0ee4c30-eac4001131.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.11.1-e4e8450b9d-617696cfe8.zip b/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.11.1-e4e8450b9d-617696cfe8.zip deleted file mode 100644 index 77694dc..0000000 Binary files a/.yarn/cache/@webassemblyjs-helper-wasm-section-npm-1.11.1-e4e8450b9d-617696cfe8.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-ieee754-npm-1.11.1-897eb85879-23a0ac02a5.zip b/.yarn/cache/@webassemblyjs-ieee754-npm-1.11.1-897eb85879-23a0ac02a5.zip deleted file mode 100644 index fd9e4c5..0000000 Binary files a/.yarn/cache/@webassemblyjs-ieee754-npm-1.11.1-897eb85879-23a0ac02a5.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-leb128-npm-1.11.1-fd9f27673d-33ccc4ade2.zip b/.yarn/cache/@webassemblyjs-leb128-npm-1.11.1-fd9f27673d-33ccc4ade2.zip deleted file mode 100644 index e696baf..0000000 Binary files a/.yarn/cache/@webassemblyjs-leb128-npm-1.11.1-fd9f27673d-33ccc4ade2.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-utf8-npm-1.11.1-583036e767-972c5cfc76.zip b/.yarn/cache/@webassemblyjs-utf8-npm-1.11.1-583036e767-972c5cfc76.zip deleted file mode 100644 index 0559d78..0000000 Binary files a/.yarn/cache/@webassemblyjs-utf8-npm-1.11.1-583036e767-972c5cfc76.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.11.1-34565c1e92-6d7d9efaec.zip b/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.11.1-34565c1e92-6d7d9efaec.zip deleted file mode 100644 index 14dae41..0000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-edit-npm-1.11.1-34565c1e92-6d7d9efaec.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.11.1-a6d0b4d37d-1f6921e640.zip b/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.11.1-a6d0b4d37d-1f6921e640.zip deleted file mode 100644 index 419b6a3..0000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-gen-npm-1.11.1-a6d0b4d37d-1f6921e640.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.11.1-0bb73c20b9-21586883a2.zip b/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.11.1-0bb73c20b9-21586883a2.zip deleted file mode 100644 index 96100b1..0000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-opt-npm-1.11.1-0bb73c20b9-21586883a2.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.11.1-cd49c51fdc-1521644065.zip b/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.11.1-cd49c51fdc-1521644065.zip deleted file mode 100644 index 7003b8a..0000000 Binary files a/.yarn/cache/@webassemblyjs-wasm-parser-npm-1.11.1-cd49c51fdc-1521644065.zip and /dev/null differ diff --git a/.yarn/cache/@webassemblyjs-wast-printer-npm-1.11.1-f1213430d6-f15ae4c244.zip b/.yarn/cache/@webassemblyjs-wast-printer-npm-1.11.1-f1213430d6-f15ae4c244.zip deleted file mode 100644 index 366b7cb..0000000 Binary files a/.yarn/cache/@webassemblyjs-wast-printer-npm-1.11.1-f1213430d6-f15ae4c244.zip and /dev/null differ diff --git a/.yarn/cache/@webpack-cli-configtest-npm-1.2.0-728a6bf8bd-a2726cd9ec.zip b/.yarn/cache/@webpack-cli-configtest-npm-1.2.0-728a6bf8bd-a2726cd9ec.zip deleted file mode 100644 index ab6e74d..0000000 Binary files a/.yarn/cache/@webpack-cli-configtest-npm-1.2.0-728a6bf8bd-a2726cd9ec.zip and /dev/null differ diff --git a/.yarn/cache/@webpack-cli-info-npm-1.5.0-9d9627ae19-7f56fe037c.zip b/.yarn/cache/@webpack-cli-info-npm-1.5.0-9d9627ae19-7f56fe037c.zip deleted file mode 100644 index 64c90ae..0000000 Binary files a/.yarn/cache/@webpack-cli-info-npm-1.5.0-9d9627ae19-7f56fe037c.zip and /dev/null differ diff --git a/.yarn/cache/@webpack-cli-serve-npm-1.7.0-2869abfdb4-d475e8effa.zip b/.yarn/cache/@webpack-cli-serve-npm-1.7.0-2869abfdb4-d475e8effa.zip deleted file mode 100644 index a341014..0000000 Binary files a/.yarn/cache/@webpack-cli-serve-npm-1.7.0-2869abfdb4-d475e8effa.zip and /dev/null differ diff --git a/.yarn/cache/@xtuc-ieee754-npm-1.2.0-ec0ce4e025-ac56d4ca6e.zip b/.yarn/cache/@xtuc-ieee754-npm-1.2.0-ec0ce4e025-ac56d4ca6e.zip deleted file mode 100644 index be07597..0000000 Binary files a/.yarn/cache/@xtuc-ieee754-npm-1.2.0-ec0ce4e025-ac56d4ca6e.zip and /dev/null differ diff --git a/.yarn/cache/@xtuc-long-npm-4.2.2-37236e6d72-8ed0d477ce.zip b/.yarn/cache/@xtuc-long-npm-4.2.2-37236e6d72-8ed0d477ce.zip deleted file mode 100644 index 392ac46..0000000 Binary files a/.yarn/cache/@xtuc-long-npm-4.2.2-37236e6d72-8ed0d477ce.zip and /dev/null differ diff --git a/.yarn/cache/acorn-import-assertions-npm-1.8.0-e9a9d57e27-5c4cf7c850.zip b/.yarn/cache/acorn-import-assertions-npm-1.8.0-e9a9d57e27-5c4cf7c850.zip deleted file mode 100644 index 3322c65..0000000 Binary files a/.yarn/cache/acorn-import-assertions-npm-1.8.0-e9a9d57e27-5c4cf7c850.zip and /dev/null differ diff --git a/.yarn/cache/ajv-keywords-npm-3.5.2-0e391b70e2-7dc5e59316.zip b/.yarn/cache/ajv-keywords-npm-3.5.2-0e391b70e2-7dc5e59316.zip deleted file mode 100644 index cb1e995..0000000 Binary files a/.yarn/cache/ajv-keywords-npm-3.5.2-0e391b70e2-7dc5e59316.zip and /dev/null differ diff --git a/.yarn/cache/boolbase-npm-1.0.0-965fe9af6d-3e25c80ef6.zip b/.yarn/cache/boolbase-npm-1.0.0-965fe9af6d-3e25c80ef6.zip deleted file mode 100644 index 199099e..0000000 Binary files a/.yarn/cache/boolbase-npm-1.0.0-965fe9af6d-3e25c80ef6.zip and /dev/null differ diff --git a/.yarn/cache/buffer-from-npm-1.1.2-03d2f20d7e-0448524a56.zip b/.yarn/cache/buffer-from-npm-1.1.2-03d2f20d7e-0448524a56.zip deleted file mode 100644 index efe1b76..0000000 Binary files a/.yarn/cache/buffer-from-npm-1.1.2-03d2f20d7e-0448524a56.zip and /dev/null differ diff --git a/.yarn/cache/camel-case-npm-4.1.2-082bf67a9a-bcbd25cd25.zip b/.yarn/cache/camel-case-npm-4.1.2-082bf67a9a-bcbd25cd25.zip deleted file mode 100644 index 6bb1dd0..0000000 Binary files a/.yarn/cache/camel-case-npm-4.1.2-082bf67a9a-bcbd25cd25.zip and /dev/null differ diff --git a/.yarn/cache/chrome-trace-event-npm-1.0.3-e0ae3dcd60-cb8b1fc7e8.zip b/.yarn/cache/chrome-trace-event-npm-1.0.3-e0ae3dcd60-cb8b1fc7e8.zip deleted file mode 100644 index b1b2134..0000000 Binary files a/.yarn/cache/chrome-trace-event-npm-1.0.3-e0ae3dcd60-cb8b1fc7e8.zip and /dev/null differ diff --git a/.yarn/cache/clean-css-npm-5.3.1-e052e24a9f-860696c605.zip b/.yarn/cache/clean-css-npm-5.3.1-e052e24a9f-860696c605.zip deleted file mode 100644 index fc3fc48..0000000 Binary files a/.yarn/cache/clean-css-npm-5.3.1-e052e24a9f-860696c605.zip and /dev/null differ diff --git a/.yarn/cache/clone-deep-npm-4.0.1-70adab92c8-770f912fe4.zip b/.yarn/cache/clone-deep-npm-4.0.1-70adab92c8-770f912fe4.zip deleted file mode 100644 index 1017703..0000000 Binary files a/.yarn/cache/clone-deep-npm-4.0.1-70adab92c8-770f912fe4.zip and /dev/null differ diff --git a/.yarn/cache/colorette-npm-2.0.19-f73dfe6a4e-888cf5493f.zip b/.yarn/cache/colorette-npm-2.0.19-f73dfe6a4e-888cf5493f.zip deleted file mode 100644 index 89eb6f6..0000000 Binary files a/.yarn/cache/colorette-npm-2.0.19-f73dfe6a4e-888cf5493f.zip and /dev/null differ diff --git a/.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-ab8c07884e.zip b/.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-ab8c07884e.zip deleted file mode 100644 index 6a14adf..0000000 Binary files a/.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-ab8c07884e.zip and /dev/null differ diff --git a/.yarn/cache/commander-npm-7.2.0-19178180f8-53501cbeee.zip b/.yarn/cache/commander-npm-7.2.0-19178180f8-53501cbeee.zip deleted file mode 100644 index 1c86bf7..0000000 Binary files a/.yarn/cache/commander-npm-7.2.0-19178180f8-53501cbeee.zip and /dev/null differ diff --git a/.yarn/cache/commander-npm-8.3.0-c0d18c66d5-0f82321821.zip b/.yarn/cache/commander-npm-8.3.0-c0d18c66d5-0f82321821.zip deleted file mode 100644 index 4f07a5c..0000000 Binary files a/.yarn/cache/commander-npm-8.3.0-c0d18c66d5-0f82321821.zip and /dev/null differ diff --git a/.yarn/cache/copy-webpack-plugin-npm-11.0.0-9a07415855-df4f8743f0.zip b/.yarn/cache/copy-webpack-plugin-npm-11.0.0-9a07415855-df4f8743f0.zip deleted file mode 100644 index 556057b..0000000 Binary files a/.yarn/cache/copy-webpack-plugin-npm-11.0.0-9a07415855-df4f8743f0.zip and /dev/null differ diff --git a/.yarn/cache/css-select-npm-4.3.0-72f53028ec-d620273683.zip b/.yarn/cache/css-select-npm-4.3.0-72f53028ec-d620273683.zip deleted file mode 100644 index cc75afe..0000000 Binary files a/.yarn/cache/css-select-npm-4.3.0-72f53028ec-d620273683.zip and /dev/null differ diff --git a/.yarn/cache/css-what-npm-6.1.0-57f751efbb-b975e547e1.zip b/.yarn/cache/css-what-npm-6.1.0-57f751efbb-b975e547e1.zip deleted file mode 100644 index 7ae813a..0000000 Binary files a/.yarn/cache/css-what-npm-6.1.0-57f751efbb-b975e547e1.zip and /dev/null differ diff --git a/.yarn/cache/dom-converter-npm-0.2.0-902408f4a0-ea52fe303f.zip b/.yarn/cache/dom-converter-npm-0.2.0-902408f4a0-ea52fe303f.zip deleted file mode 100644 index 41fee7c..0000000 Binary files a/.yarn/cache/dom-converter-npm-0.2.0-902408f4a0-ea52fe303f.zip and /dev/null differ diff --git a/.yarn/cache/dom-serializer-npm-1.4.1-ebb24349c1-fbb0b01f87.zip b/.yarn/cache/dom-serializer-npm-1.4.1-ebb24349c1-fbb0b01f87.zip deleted file mode 100644 index d59f3d3..0000000 Binary files a/.yarn/cache/dom-serializer-npm-1.4.1-ebb24349c1-fbb0b01f87.zip and /dev/null differ diff --git a/.yarn/cache/domelementtype-npm-2.3.0-02de7cbfba-ee837a318f.zip b/.yarn/cache/domelementtype-npm-2.3.0-02de7cbfba-ee837a318f.zip deleted file mode 100644 index cab8bb7..0000000 Binary files a/.yarn/cache/domelementtype-npm-2.3.0-02de7cbfba-ee837a318f.zip and /dev/null differ diff --git a/.yarn/cache/domhandler-npm-4.3.1-493539c1ca-4c665ceed0.zip b/.yarn/cache/domhandler-npm-4.3.1-493539c1ca-4c665ceed0.zip deleted file mode 100644 index 6532c54..0000000 Binary files a/.yarn/cache/domhandler-npm-4.3.1-493539c1ca-4c665ceed0.zip and /dev/null differ diff --git a/.yarn/cache/domutils-npm-2.8.0-0325139e5c-abf7434315.zip b/.yarn/cache/domutils-npm-2.8.0-0325139e5c-abf7434315.zip deleted file mode 100644 index ff5aa73..0000000 Binary files a/.yarn/cache/domutils-npm-2.8.0-0325139e5c-abf7434315.zip and /dev/null differ diff --git a/.yarn/cache/dot-case-npm-3.0.4-09675b5521-a65e351941.zip b/.yarn/cache/dot-case-npm-3.0.4-09675b5521-a65e351941.zip deleted file mode 100644 index 67efd7f..0000000 Binary files a/.yarn/cache/dot-case-npm-3.0.4-09675b5521-a65e351941.zip and /dev/null differ diff --git a/.yarn/cache/enhanced-resolve-npm-5.12.0-c291ce4ee3-bf3f787fac.zip b/.yarn/cache/enhanced-resolve-npm-5.12.0-c291ce4ee3-bf3f787fac.zip deleted file mode 100644 index 2c4f4e4..0000000 Binary files a/.yarn/cache/enhanced-resolve-npm-5.12.0-c291ce4ee3-bf3f787fac.zip and /dev/null differ diff --git a/.yarn/cache/entities-npm-2.2.0-0fc8d5b2f7-19010dacaf.zip b/.yarn/cache/entities-npm-2.2.0-0fc8d5b2f7-19010dacaf.zip deleted file mode 100644 index b0c0f76..0000000 Binary files a/.yarn/cache/entities-npm-2.2.0-0fc8d5b2f7-19010dacaf.zip and /dev/null differ diff --git a/.yarn/cache/envinfo-npm-7.8.1-f320033691-de736c98d6.zip b/.yarn/cache/envinfo-npm-7.8.1-f320033691-de736c98d6.zip deleted file mode 100644 index 006bb8e..0000000 Binary files a/.yarn/cache/envinfo-npm-7.8.1-f320033691-de736c98d6.zip and /dev/null differ diff --git a/.yarn/cache/es-module-lexer-npm-0.9.3-ff6236dadb-84bbab23c3.zip b/.yarn/cache/es-module-lexer-npm-0.9.3-ff6236dadb-84bbab23c3.zip deleted file mode 100644 index d7a4a2e..0000000 Binary files a/.yarn/cache/es-module-lexer-npm-0.9.3-ff6236dadb-84bbab23c3.zip and /dev/null differ diff --git a/.yarn/cache/esbuild-npm-0.21.5-d85dfbc965-2911c7b50b.zip b/.yarn/cache/esbuild-npm-0.21.5-d85dfbc965-2911c7b50b.zip new file mode 100644 index 0000000..cf88c17 Binary files /dev/null and b/.yarn/cache/esbuild-npm-0.21.5-d85dfbc965-2911c7b50b.zip differ diff --git a/.yarn/cache/eslint-scope-npm-5.1.1-71fe59b18a-47e4b6a3f0.zip b/.yarn/cache/eslint-scope-npm-5.1.1-71fe59b18a-47e4b6a3f0.zip deleted file mode 100644 index cf013ed..0000000 Binary files a/.yarn/cache/eslint-scope-npm-5.1.1-71fe59b18a-47e4b6a3f0.zip and /dev/null differ diff --git a/.yarn/cache/events-npm-3.3.0-c280bc7e48-f6f487ad21.zip b/.yarn/cache/events-npm-3.3.0-c280bc7e48-f6f487ad21.zip deleted file mode 100644 index 6f64348..0000000 Binary files a/.yarn/cache/events-npm-3.3.0-c280bc7e48-f6f487ad21.zip and /dev/null differ diff --git a/.yarn/cache/fastest-levenshtein-npm-1.0.16-192d328856-a78d44285c.zip b/.yarn/cache/fastest-levenshtein-npm-1.0.16-192d328856-a78d44285c.zip deleted file mode 100644 index 26d734f..0000000 Binary files a/.yarn/cache/fastest-levenshtein-npm-1.0.16-192d328856-a78d44285c.zip and /dev/null differ diff --git a/.yarn/cache/fsevents-npm-2.3.3-ce9fb0ffae-11e6ea6fea.zip b/.yarn/cache/fsevents-npm-2.3.3-ce9fb0ffae-11e6ea6fea.zip new file mode 100644 index 0000000..044eb1b Binary files /dev/null and b/.yarn/cache/fsevents-npm-2.3.3-ce9fb0ffae-11e6ea6fea.zip differ diff --git a/.yarn/cache/fsevents-patch-7934e3c202-8.zip b/.yarn/cache/fsevents-patch-7934e3c202-8.zip new file mode 100644 index 0000000..c6a96df Binary files /dev/null and b/.yarn/cache/fsevents-patch-7934e3c202-8.zip differ diff --git a/.yarn/cache/glob-to-regexp-npm-0.4.1-cd697e0fc7-e795f4e8f0.zip b/.yarn/cache/glob-to-regexp-npm-0.4.1-cd697e0fc7-e795f4e8f0.zip deleted file mode 100644 index 2276b3f..0000000 Binary files a/.yarn/cache/glob-to-regexp-npm-0.4.1-cd697e0fc7-e795f4e8f0.zip and /dev/null differ diff --git a/.yarn/cache/he-npm-1.2.0-3b73a2ff07-3d4d6babcc.zip b/.yarn/cache/he-npm-1.2.0-3b73a2ff07-3d4d6babcc.zip deleted file mode 100644 index fe1d45f..0000000 Binary files a/.yarn/cache/he-npm-1.2.0-3b73a2ff07-3d4d6babcc.zip and /dev/null differ diff --git a/.yarn/cache/html-minifier-terser-npm-6.1.0-49a405eebd-ac52c14006.zip b/.yarn/cache/html-minifier-terser-npm-6.1.0-49a405eebd-ac52c14006.zip deleted file mode 100644 index aed55fa..0000000 Binary files a/.yarn/cache/html-minifier-terser-npm-6.1.0-49a405eebd-ac52c14006.zip and /dev/null differ diff --git a/.yarn/cache/html-webpack-plugin-npm-5.5.0-75c5a14e55-f3d84d0df7.zip b/.yarn/cache/html-webpack-plugin-npm-5.5.0-75c5a14e55-f3d84d0df7.zip deleted file mode 100644 index 660056e..0000000 Binary files a/.yarn/cache/html-webpack-plugin-npm-5.5.0-75c5a14e55-f3d84d0df7.zip and /dev/null differ diff --git a/.yarn/cache/htmlparser2-npm-6.1.0-4ef89ab31e-81a7b3d9c3.zip b/.yarn/cache/htmlparser2-npm-6.1.0-4ef89ab31e-81a7b3d9c3.zip deleted file mode 100644 index 5e9e3b4..0000000 Binary files a/.yarn/cache/htmlparser2-npm-6.1.0-4ef89ab31e-81a7b3d9c3.zip and /dev/null differ diff --git a/.yarn/cache/import-local-npm-3.1.0-8960af5e51-bfcdb63b5e.zip b/.yarn/cache/import-local-npm-3.1.0-8960af5e51-bfcdb63b5e.zip deleted file mode 100644 index e041145..0000000 Binary files a/.yarn/cache/import-local-npm-3.1.0-8960af5e51-bfcdb63b5e.zip and /dev/null differ diff --git a/.yarn/cache/interpret-npm-2.2.0-3603a544e1-f51efef7cb.zip b/.yarn/cache/interpret-npm-2.2.0-3603a544e1-f51efef7cb.zip deleted file mode 100644 index 20392ae..0000000 Binary files a/.yarn/cache/interpret-npm-2.2.0-3603a544e1-f51efef7cb.zip and /dev/null differ diff --git a/.yarn/cache/is-plain-object-npm-2.0.4-da3265d804-2a401140cf.zip b/.yarn/cache/is-plain-object-npm-2.0.4-da3265d804-2a401140cf.zip deleted file mode 100644 index 8b68965..0000000 Binary files a/.yarn/cache/is-plain-object-npm-2.0.4-da3265d804-2a401140cf.zip and /dev/null differ diff --git a/.yarn/cache/isobject-npm-3.0.1-8145901fd2-db85c4c970.zip b/.yarn/cache/isobject-npm-3.0.1-8145901fd2-db85c4c970.zip deleted file mode 100644 index 214104c..0000000 Binary files a/.yarn/cache/isobject-npm-3.0.1-8145901fd2-db85c4c970.zip and /dev/null differ diff --git a/.yarn/cache/jest-worker-npm-27.5.1-1c110b5894-98cd68b696.zip b/.yarn/cache/jest-worker-npm-27.5.1-1c110b5894-98cd68b696.zip deleted file mode 100644 index 10e0b5b..0000000 Binary files a/.yarn/cache/jest-worker-npm-27.5.1-1c110b5894-98cd68b696.zip and /dev/null differ diff --git a/.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip b/.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip deleted file mode 100644 index 96a83fe..0000000 Binary files a/.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip and /dev/null differ diff --git a/.yarn/cache/kind-of-npm-6.0.3-ab15f36220-3ab01e7b1d.zip b/.yarn/cache/kind-of-npm-6.0.3-ab15f36220-3ab01e7b1d.zip deleted file mode 100644 index 90b2647..0000000 Binary files a/.yarn/cache/kind-of-npm-6.0.3-ab15f36220-3ab01e7b1d.zip and /dev/null differ diff --git a/.yarn/cache/kleur-npm-4.1.5-46b6135f41-1dc476e327.zip b/.yarn/cache/kleur-npm-4.1.5-46b6135f41-1dc476e327.zip new file mode 100644 index 0000000..f05e8e3 Binary files /dev/null and b/.yarn/cache/kleur-npm-4.1.5-46b6135f41-1dc476e327.zip differ diff --git a/.yarn/cache/loader-runner-npm-4.3.0-9ca67df372-a90e00dee9.zip b/.yarn/cache/loader-runner-npm-4.3.0-9ca67df372-a90e00dee9.zip deleted file mode 100644 index aa29ccc..0000000 Binary files a/.yarn/cache/loader-runner-npm-4.3.0-9ca67df372-a90e00dee9.zip and /dev/null differ diff --git a/.yarn/cache/lower-case-npm-2.0.2-151055f1c2-83a0a5f159.zip b/.yarn/cache/lower-case-npm-2.0.2-151055f1c2-83a0a5f159.zip deleted file mode 100644 index 0f0a86e..0000000 Binary files a/.yarn/cache/lower-case-npm-2.0.2-151055f1c2-83a0a5f159.zip and /dev/null differ diff --git a/.yarn/cache/nanoid-npm-3.3.7-98824ba130-d36c427e53.zip b/.yarn/cache/nanoid-npm-3.3.7-98824ba130-d36c427e53.zip new file mode 100644 index 0000000..7b2fd6e Binary files /dev/null and b/.yarn/cache/nanoid-npm-3.3.7-98824ba130-d36c427e53.zip differ diff --git a/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip b/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip deleted file mode 100644 index cbf9a76..0000000 Binary files a/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip and /dev/null differ diff --git a/.yarn/cache/no-case-npm-3.0.4-12884c3d98-0b2ebc113d.zip b/.yarn/cache/no-case-npm-3.0.4-12884c3d98-0b2ebc113d.zip deleted file mode 100644 index 1e5347b..0000000 Binary files a/.yarn/cache/no-case-npm-3.0.4-12884c3d98-0b2ebc113d.zip and /dev/null differ diff --git a/.yarn/cache/nth-check-npm-2.1.1-f97afc8169-5afc3dafcd.zip b/.yarn/cache/nth-check-npm-2.1.1-f97afc8169-5afc3dafcd.zip deleted file mode 100644 index dc825e5..0000000 Binary files a/.yarn/cache/nth-check-npm-2.1.1-f97afc8169-5afc3dafcd.zip and /dev/null differ diff --git a/.yarn/cache/param-case-npm-3.0.4-cfb242ad97-b34227fd0f.zip b/.yarn/cache/param-case-npm-3.0.4-cfb242ad97-b34227fd0f.zip deleted file mode 100644 index 8da8250..0000000 Binary files a/.yarn/cache/param-case-npm-3.0.4-cfb242ad97-b34227fd0f.zip and /dev/null differ diff --git a/.yarn/cache/pascal-case-npm-3.1.2-35f5b9bff6-ba98bfd595.zip b/.yarn/cache/pascal-case-npm-3.1.2-35f5b9bff6-ba98bfd595.zip deleted file mode 100644 index fc44c75..0000000 Binary files a/.yarn/cache/pascal-case-npm-3.1.2-35f5b9bff6-ba98bfd595.zip and /dev/null differ diff --git a/.yarn/cache/picocolors-npm-1.0.1-39442f3da8-fa68166d1f.zip b/.yarn/cache/picocolors-npm-1.0.1-39442f3da8-fa68166d1f.zip new file mode 100644 index 0000000..21041b3 Binary files /dev/null and b/.yarn/cache/picocolors-npm-1.0.1-39442f3da8-fa68166d1f.zip differ diff --git a/.yarn/cache/postcss-npm-8.4.41-1607021b28-f865894929.zip b/.yarn/cache/postcss-npm-8.4.41-1607021b28-f865894929.zip new file mode 100644 index 0000000..7da8950 Binary files /dev/null and b/.yarn/cache/postcss-npm-8.4.41-1607021b28-f865894929.zip differ diff --git a/.yarn/cache/pretty-error-npm-4.0.0-7cca1fe4ad-a5b9137365.zip b/.yarn/cache/pretty-error-npm-4.0.0-7cca1fe4ad-a5b9137365.zip deleted file mode 100644 index 0631c5e..0000000 Binary files a/.yarn/cache/pretty-error-npm-4.0.0-7cca1fe4ad-a5b9137365.zip and /dev/null differ diff --git a/.yarn/cache/randombytes-npm-2.1.0-e3da76bccf-d779499376.zip b/.yarn/cache/randombytes-npm-2.1.0-e3da76bccf-d779499376.zip deleted file mode 100644 index cfc1143..0000000 Binary files a/.yarn/cache/randombytes-npm-2.1.0-e3da76bccf-d779499376.zip and /dev/null differ diff --git a/.yarn/cache/rechoir-npm-0.7.1-0c7e5c1201-2a04aab4e2.zip b/.yarn/cache/rechoir-npm-0.7.1-0c7e5c1201-2a04aab4e2.zip deleted file mode 100644 index 24cb0af..0000000 Binary files a/.yarn/cache/rechoir-npm-0.7.1-0c7e5c1201-2a04aab4e2.zip and /dev/null differ diff --git a/.yarn/cache/relateurl-npm-0.2.7-7687cc0a2a-5891e792ea.zip b/.yarn/cache/relateurl-npm-0.2.7-7687cc0a2a-5891e792ea.zip deleted file mode 100644 index f8f3ef3..0000000 Binary files a/.yarn/cache/relateurl-npm-0.2.7-7687cc0a2a-5891e792ea.zip and /dev/null differ diff --git a/.yarn/cache/renderkid-npm-3.0.0-acb028643f-77162b62d6.zip b/.yarn/cache/renderkid-npm-3.0.0-acb028643f-77162b62d6.zip deleted file mode 100644 index 96d7a31..0000000 Binary files a/.yarn/cache/renderkid-npm-3.0.0-acb028643f-77162b62d6.zip and /dev/null differ diff --git a/.yarn/cache/rollup-npm-4.20.0-4fe360ee74-92c6c68a93.zip b/.yarn/cache/rollup-npm-4.20.0-4fe360ee74-92c6c68a93.zip new file mode 100644 index 0000000..3048a08 Binary files /dev/null and b/.yarn/cache/rollup-npm-4.20.0-4fe360ee74-92c6c68a93.zip differ diff --git a/.yarn/cache/schema-utils-npm-3.1.1-8704647575-fb73f3d759.zip b/.yarn/cache/schema-utils-npm-3.1.1-8704647575-fb73f3d759.zip deleted file mode 100644 index 696037a..0000000 Binary files a/.yarn/cache/schema-utils-npm-3.1.1-8704647575-fb73f3d759.zip and /dev/null differ diff --git a/.yarn/cache/serialize-javascript-npm-6.0.0-0bb8a3c88d-56f90b562a.zip b/.yarn/cache/serialize-javascript-npm-6.0.0-0bb8a3c88d-56f90b562a.zip deleted file mode 100644 index 46090b6..0000000 Binary files a/.yarn/cache/serialize-javascript-npm-6.0.0-0bb8a3c88d-56f90b562a.zip and /dev/null differ diff --git a/.yarn/cache/shallow-clone-npm-3.0.1-dab5873d0d-39b3dd9630.zip b/.yarn/cache/shallow-clone-npm-3.0.1-dab5873d0d-39b3dd9630.zip deleted file mode 100644 index 64ce2a1..0000000 Binary files a/.yarn/cache/shallow-clone-npm-3.0.1-dab5873d0d-39b3dd9630.zip and /dev/null differ diff --git a/.yarn/cache/source-map-support-npm-0.5.21-09ca99e250-43e98d700d.zip b/.yarn/cache/source-map-support-npm-0.5.21-09ca99e250-43e98d700d.zip deleted file mode 100644 index 5fc27c8..0000000 Binary files a/.yarn/cache/source-map-support-npm-0.5.21-09ca99e250-43e98d700d.zip and /dev/null differ diff --git a/.yarn/cache/svelte-hmr-npm-0.16.0-9716494a72-c99a48df97.zip b/.yarn/cache/svelte-hmr-npm-0.16.0-9716494a72-c99a48df97.zip new file mode 100644 index 0000000..adddd07 Binary files /dev/null and b/.yarn/cache/svelte-hmr-npm-0.16.0-9716494a72-c99a48df97.zip differ diff --git a/.yarn/cache/tapable-npm-2.2.1-8cf5ff3039-3b7a1b4d86.zip b/.yarn/cache/tapable-npm-2.2.1-8cf5ff3039-3b7a1b4d86.zip deleted file mode 100644 index 279942d..0000000 Binary files a/.yarn/cache/tapable-npm-2.2.1-8cf5ff3039-3b7a1b4d86.zip and /dev/null differ diff --git a/.yarn/cache/terser-npm-5.16.1-d407c2c364-cb52412350.zip b/.yarn/cache/terser-npm-5.16.1-d407c2c364-cb52412350.zip deleted file mode 100644 index 83fcc13..0000000 Binary files a/.yarn/cache/terser-npm-5.16.1-d407c2c364-cb52412350.zip and /dev/null differ diff --git a/.yarn/cache/terser-webpack-plugin-npm-5.3.6-27ed5132ff-8f3448d7fd.zip b/.yarn/cache/terser-webpack-plugin-npm-5.3.6-27ed5132ff-8f3448d7fd.zip deleted file mode 100644 index 78440e2..0000000 Binary files a/.yarn/cache/terser-webpack-plugin-npm-5.3.6-27ed5132ff-8f3448d7fd.zip and /dev/null differ diff --git a/.yarn/cache/utila-npm-0.4.0-27b344403b-97ffd3bd2b.zip b/.yarn/cache/utila-npm-0.4.0-27b344403b-97ffd3bd2b.zip deleted file mode 100644 index a276f30..0000000 Binary files a/.yarn/cache/utila-npm-0.4.0-27b344403b-97ffd3bd2b.zip and /dev/null differ diff --git a/.yarn/cache/vite-npm-5.4.0-6fbda5653e-e2a7d37b9c.zip b/.yarn/cache/vite-npm-5.4.0-6fbda5653e-e2a7d37b9c.zip new file mode 100644 index 0000000..7965c3b Binary files /dev/null and b/.yarn/cache/vite-npm-5.4.0-6fbda5653e-e2a7d37b9c.zip differ diff --git a/.yarn/cache/vitefu-npm-0.2.5-df1798d310-1a58f3f8b2.zip b/.yarn/cache/vitefu-npm-0.2.5-df1798d310-1a58f3f8b2.zip new file mode 100644 index 0000000..71a0567 Binary files /dev/null and b/.yarn/cache/vitefu-npm-0.2.5-df1798d310-1a58f3f8b2.zip differ diff --git a/.yarn/cache/watchpack-npm-2.4.0-7ec4b9cc65-23d4bc5863.zip b/.yarn/cache/watchpack-npm-2.4.0-7ec4b9cc65-23d4bc5863.zip deleted file mode 100644 index ed21e48..0000000 Binary files a/.yarn/cache/watchpack-npm-2.4.0-7ec4b9cc65-23d4bc5863.zip and /dev/null differ diff --git a/.yarn/cache/webpack-cli-npm-4.10.0-09cee8c457-2ff5355ac3.zip b/.yarn/cache/webpack-cli-npm-4.10.0-09cee8c457-2ff5355ac3.zip deleted file mode 100644 index 8919e5b..0000000 Binary files a/.yarn/cache/webpack-cli-npm-4.10.0-09cee8c457-2ff5355ac3.zip and /dev/null differ diff --git a/.yarn/cache/webpack-merge-npm-5.8.0-e3c95fdc3c-88786ab910.zip b/.yarn/cache/webpack-merge-npm-5.8.0-e3c95fdc3c-88786ab910.zip deleted file mode 100644 index f26a4cd..0000000 Binary files a/.yarn/cache/webpack-merge-npm-5.8.0-e3c95fdc3c-88786ab910.zip and /dev/null differ diff --git a/.yarn/cache/webpack-npm-5.75.0-ebca50e2e7-2bcc5f3c19.zip b/.yarn/cache/webpack-npm-5.75.0-ebca50e2e7-2bcc5f3c19.zip deleted file mode 100644 index ec1021a..0000000 Binary files a/.yarn/cache/webpack-npm-5.75.0-ebca50e2e7-2bcc5f3c19.zip and /dev/null differ diff --git a/.yarn/cache/webpack-sources-npm-3.2.3-6bfb5d9563-989e401b9f.zip b/.yarn/cache/webpack-sources-npm-3.2.3-6bfb5d9563-989e401b9f.zip deleted file mode 100644 index 8412c75..0000000 Binary files a/.yarn/cache/webpack-sources-npm-3.2.3-6bfb5d9563-989e401b9f.zip and /dev/null differ diff --git a/.yarn/cache/wildcard-npm-2.0.0-baedca033a-1f4fe4c03d.zip b/.yarn/cache/wildcard-npm-2.0.0-baedca033a-1f4fe4c03d.zip deleted file mode 100644 index b2f396e..0000000 Binary files a/.yarn/cache/wildcard-npm-2.0.0-baedca033a-1f4fe4c03d.zip and /dev/null differ diff --git a/cypress.config.js b/cypress.config.js index 9481060..0c743f1 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,6 +1,5 @@ const fetch = require('node-fetch'); const { defineConfig } = require('cypress'); -const webpackConfig = require('./webpack.config.js'); module.exports = defineConfig({ viewportHeight: 720, @@ -11,12 +10,25 @@ module.exports = defineConfig({ specPattern: 'ext/**/*.cy.js', devServer: { framework: 'svelte', - bundler: 'webpack', - webpackConfig, + bundler: 'vite', }, setupNodeEvents(on, config) { require('./cypress-node-events')(on); + // Shutdown the server after `yarn cypress run --component completes + // This ensures that c8 outputs the lcov.info file properly + on('after:run', () => { + return fetch('http://localhost:9000/shutdown'); + }); + return config; + }, + }, + e2e: { + video: true, + baseUrl: 'http://localhost:8080', + setupNodeEvents(on, config) { + require('./cypress-node-events')(on); + // Shutdown the server after `yarn cypress run --component completes // This ensures that c8 outputs the lcov.info file properly on('after:run', () => { diff --git a/cypress/e2e/App.cy.js b/cypress/e2e/App.cy.js new file mode 100644 index 0000000..4ca1f2e --- /dev/null +++ b/cypress/e2e/App.cy.js @@ -0,0 +1,69 @@ +describe('Web Extension', () => { + it('can display seen requests', () => { + // Jambox should generate a static hash for the URL below + const HASH = '2be35430d93be811753ecfd6ba828878'; + const STUB_HASH = 'cd4482b36a608021cd943786ecb54c5d'; + const testURL = 'http://jambox-test.com/returnThisAsJson'; + cy.visit('/'); + cy.task('jambox.reset'); + + cy.request(testURL); + + // Additional requests to fill up the cache + cy.request('http://jambox-test.com/pathA'); + cy.request('http://jambox-test.com/pathB'); + cy.request('http://jambox-test.com/pathC'); + + cy.get(`[data-cy-id="${testURL}"]`).as('request'); + + cy.get('@request').contains('200'); + cy.get('@request').contains('fetch'); + + cy.get('@request').click({ force: true }); + + cy.get('[data-cy-id="request-info"]').as('modal'); + + cy.get('@modal').contains(testURL); + cy.get('[data-cy-id="select-response-tab"]').click(); + cy.get('@modal').contains('path'); + cy.get('@modal').contains('/returnThisAsJson'); + + cy.get('[data-cy-id="back-to-waterfall"]').click(); + + cy.get('@modal').should('not.exist'); + + // When network requests are blocked no caching happens, so disable blocking + cy.get(`[data-cy-id="block-network"]`).as('block-network').uncheck(); + cy.get('@block-network').should('have.prop', 'indeterminate'); + + cy.wait(50); + cy.request(testURL); + + cy.get('[data-cy-id="cache-link"]').click(); + + cy.get(`[data-cy-id="cache-cell-edit-${HASH}"]`).as('test-edit'); + cy.get('@test-edit').click(); + cy.get('[data-cy-id="select-request-tab"]').click(); + cy.get('[data-cy-id="cache-detail"]').contains(testURL); + + cy.get('[data-cy-id="cache-detail"]').contains('path'); + cy.get('[data-cy-id="cache-detail"]').contains('/returnThisAsJson'); + + cy.get('[data-cy-id="back-to-cache"]').click(); + + cy.get('[data-cy-id="cache-detail"]').should('not.exist'); + + // clear cache + cy.get('@test-edit').click(); + cy.get('[data-cy-id="cache-delete"]').click(); + cy.get('[data-cy-id="cache-detail"]').should('not.exist'); + + cy.get(`[data-cy-id="cache-cell-edit-${STUB_HASH}"]`).as('stub'); + cy.get('@stub').click(); + cy.get('[data-cy-id="select-response-tab"]').click(); + cy.get('[data-cy-id="cache-detail"]').contains('test-stub'); + + // all of the seen requests will only persist in-memory + // next cy.task('jambox-reset') will clear them + }); +}); diff --git a/cypress/e2e/Cache.cy.js b/cypress/e2e/Cache.cy.js new file mode 100644 index 0000000..8626ff1 --- /dev/null +++ b/cypress/e2e/Cache.cy.js @@ -0,0 +1,109 @@ +// static hashes for requests used below +const A = 'ba20ccbb470042f3200692cad1926c1c'; +const B = 'f4c55ab257c689845921746061bfeb73'; +const C = 'cd4482b36a608021cd943786ecb54c5d'; + +describe('Cache UI', () => { + it('can edit response objects', () => { + // load jambox config from cwd + cy.visit('/'); + cy.task('jambox.reset'); + + // Additional requests to fill up the cache + cy.request('http://jambox-test.com/pathA'); + cy.request('http://jambox-test.com/pathB'); + cy.request('http://jambox-test.com/pathC'); + + cy.get('[data-cy-id="cache-link"]').click(); + cy.get(`[data-cy-id="cache-cell-edit-${A}"]`).as('test-edit'); + cy.get('@test-edit').click(); + cy.get('[data-cy-id="select-response-tab"]').click(); + + // Edit body + cy.get('[data-cy-id="select-response-tab"]').click(); + cy.get( + '[data-path="%2Fbody"] > .jse-props > .jse-json-node > .jse-contents-outer > .jse-contents > .jse-value' + ).dblclick(); + cy.get('.jse-editable-div').clear(); + cy.get('.jse-editable-div').type('foobar{enter}'); + cy.get('[data-cy-id="update-response-btn"]').click(); + + // Close + cy.get('[data-cy-id="back-to-cache"]').click({ force: true }); + + // Open modal + cy.get('@test-edit').click(); + cy.get('[data-cy-id="select-response-tab"]').click(); + cy.get('[data-cy-id="cache-detail"]').contains('foobar'); + + // clear cache + cy.get('[data-cy-id="select-details-tab"]').click(); + cy.get('[data-cy-id="cache-delete"]').click(); + cy.get('[data-cy-id="cache-detail"]').should('not.exist'); + }); + + it('can persist records and delete them after', () => { + cy.visit('/'); + // load jambox config from cwd + cy.task('jambox.reset'); + + cy.request('http://jambox-test.com/pathA'); + cy.request('http://jambox-test.com/pathB'); + cy.request('http://jambox-test.com/pathC'); + + cy.get('[data-cy-id="cache-link"]').click(); + cy.get(`[data-cy-id="cache-cell-edit-${A}"]`).as('test-persist-A'); + cy.get(`[data-cy-id="cache-cell-edit-${B}"]`).as('test-persist'); + cy.get(`[data-cy-id="select-row-${B}"]`).as('test-persist-select'); + cy.get(`[data-cy-id="select-row-${A}"]`).as('test-persist-select-A'); + cy.get(`[data-cy-id="cache-cell-edit-${C}"]`).as('test-in-memory-cache'); + + // Persist should be click-able + cy.get('@test-persist-select').click(); + cy.get('@test-persist-select-A').click(); + cy.get('[data-cy-id="cache-persist"]').click(); + cy.get(`[data-cy-id="cache-cell-persisted-true-${B}"]`).should('exist'); + + // Edit persisted record + cy.get('@test-persist').click(); + cy.get('[data-cy-id="select-response-tab"]').click(); + + // Edit body + cy.get('[data-cy-id="select-response-tab"]').click(); + cy.get( + '[data-path="%2Fbody"] > .jse-props > .jse-json-node > .jse-contents-outer > .jse-contents > .jse-value' + ).dblclick(); + cy.get('.jse-editable-div').clear(); + cy.get('.jse-editable-div').type('foobar{enter}'); + cy.get('[data-cy-id="update-response-btn"]').click(); + // Close + cy.get('[data-cy-id="back-to-cache"]').click(); + + // Back to Waterfall + cy.get('[data-cy-id="waterfall-link"]').click(); + + // Reset jambox. This deletes in-memory cache + cy.task('jambox.reset'); + + // Back to cache + cy.get('[data-cy-id="cache-link"]').click(); + + // Cache should be loaded from a tape and contain the edited + cy.get('@test-persist').click(); + cy.get('[data-cy-id="select-response-tab"]').click(); + cy.get('[data-cy-id="cache-detail"]').contains('foobar'); + + // Back to cache + cy.get('[data-cy-id="cache-link"]').click(); + + // The pathC cached value was not persisted and should no longer exist in UI + cy.get('@test-in-memory-cache').should('not.exist'); + + cy.get('@test-persist-select').click(); + cy.get('@test-persist-select-A').click(); + cy.get('[data-cy-id="cache-delete"]').click(); + + cy.get('@test-persist').should('not.exist'); + cy.get('@test-persist-A').should('not.exist'); + }); +}); diff --git a/cypress/support/component.js b/cypress/support/component.js index 7996af1..a1556b5 100644 --- a/cypress/support/component.js +++ b/cypress/support/component.js @@ -20,8 +20,8 @@ // require('./commands') // import { mount } from 'cypress/svelte/dist/cypress-svelte.esm-bundler.js'; -require('./commands'); -const { mount } = require('cypress/svelte'); +import './commands'; +import { mount } from 'cypress/svelte'; Cypress.Commands.add('mount', mount); // Example use: diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js new file mode 100644 index 0000000..e69de29 diff --git a/ext/App.svelte b/ext/App.svelte index 8a630c3..e15c9c9 100644 --- a/ext/App.svelte +++ b/ext/App.svelte @@ -5,14 +5,13 @@ createMemorySource, } from 'svelte-routing/src/history'; import { store, reducer } from './store.js'; - import Cache from './Cache'; + import Cache from './Cache/index.svelte'; import Checkbox from './Checkbox.svelte'; import Waterfall from './Waterfall.svelte'; - import RequestInfo from './RequestInfo'; + import RequestInfo from './RequestInfo/index.svelte'; import CacheEntry from './CacheEntry.svelte'; export let api; - let search = $store.search; const history = createHistory(createMemorySource()); const chrome = window.chrome; @@ -144,7 +143,7 @@ diff --git a/ext/devtool.html b/ext/devtool.html deleted file mode 100644 index 1f93245..0000000 --- a/ext/devtool.html +++ /dev/null @@ -1,4 +0,0 @@ - - -
- diff --git a/ext/devtool.js b/ext/devtool.js deleted file mode 100644 index 7ca8247..0000000 --- a/ext/devtool.js +++ /dev/null @@ -1,5 +0,0 @@ -import browser from 'webextension-polyfill'; - -(async function main() { - await browser.devtools.panels.create('Jambox', null, 'panel.html'); -})(); diff --git a/ext/manifest.js b/ext/manifest.js deleted file mode 100644 index 6052bdd..0000000 --- a/ext/manifest.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - name: 'Jambox', - description: 'Examine and edit proxied requests', - version: '0.0.2', - manifest_version: 3, - permissions: [ - 'scripting', - 'proxy', - 'debugger', - 'notifications', - 'webNavigation', - ], - devtools_page: 'devtool.html', - host_permissions: ['