diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 0000000..6b3988f --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,52 @@ +name: Playwright tests +on: + pull_request: + branches: [ staging, main, master ] + types: + - opened + - synchronize + paths: + - '.github/workflows/playwright.yml' + - 'src/**' + - 'tests/playwright/**' + - 'package.json' + + schedule: + - cron: '0 6 1,11,21 * *' + + workflow_dispatch: + +jobs: + test: + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Publish extension to dist folder + run: | + npm ci + npm i grunt -g + grunt playwright + + - name: Install test dependencies + run: npm ci + working-directory: tests/playwright + + - name: Install playwright browser (chromium) + run: npx playwright install --with-deps chromium + working-directory: tests/playwright + + - name: Run playwright tests + run: npx playwright test + working-directory: tests/playwright + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: tests/playwright/playwright-report/ + retention-days: 30 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c10572..37f2817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## 2.8.8 + +### Added + +- Add playwright tests for site integrations. + +### Fixed + +- Fix Trakt sonarr link. + ## 2.8.7 ### Fixed diff --git a/Gruntfile.js b/Gruntfile.js index b8eeee0..62fb0a9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -112,6 +112,7 @@ module.exports = function (grunt) { // debug group task grunt.registerTask('debug', ['jshint', 'clean:debug', 'sass', 'copy']); + grunt.registerTask('playwright', ['clean:debug', 'sass', 'copy:release']); if (process.platform === "win32") { // release group task diff --git a/README.md b/README.md index 08e3904..b78c23a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ [![Chrome Web Store](https://img.shields.io/chrome-web-store/v/jmmjjcddjldjdjgckdiokhfokccdnekc?label=Chrome%20web%20store&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADdYAAA3WAZBveZwAAAIISURBVDhPdVLPaxNBFP52tyVpTGPbIImlLVEDtvVWwRZPooJUiLd6WBQFETTtRelV%2FAc8it6s6V0r%2BOsaBD14UwtCwEp%2FYNAejLvZNLuzM9M3s5tgC%2F3g7Xvvm%2Fn2vTczBv7D%2BrydI3eXrEQ2LqS0uJTf%2FZC%2Faof8yemll9tqn0JXSCKb3FOyjCb2gYR%2FPRbemnr2YkXlWkii6%2BQqnfwg%2BJxz12dzVHnFWHx9Lnd%2BdaB2aiu1p5KZOkS%2FkQDbiZkITcYaPCUneiie%2F3TSyZz4nUSSmbAOD6Ln6m186B2GCYlLuS2kt5cB7mmhlH0D3g67Z1J8pd0r8Lno6gXDLsP%2BYuJhdQMPqpuYe2%2BheeSGXlMwaBjLNEpKOK6Ib2MenGNZvPOHUG8GitJYd0K8%2FZWn3emYUWKjqIT6QAR9P056CATNtQ%2BME2eorV1Ila1FMfCD%2F8T0sItMwooZIJs0MTvSAEInZtScsmadtQtFimciCvjjfsXCzEXk00P0kzTuTDGMNpZhiuh0JRX3A76kruM45atkfXqFYFBb%2Bf4ChBSYtP7h8mA2XgECJloknDAflaqq1TJZdzhJgrqzhlZrExfoejrg9P4CxsuZ6cqGnpjEz8ndJGupvINZqpQwo0MJuXDbAb%2FWf6aiXtjeJ0Ztj5G7T1YaTSQKC0dHApqpFobiDbX4mCrV9UYAu%2FF1yscRLQLJAAAAAElFTkSuQmCC&style=plastic&color=brightgreen)](https://chrome.google.com/webstore/detail/sonarrradarrlidarr-autose/jmmjjcddjldjdjgckdiokhfokccdnekc) [![Chrome Web Store](https://img.shields.io/chrome-web-store/users/jmmjjcddjldjdjgckdiokhfokccdnekc?label=users&style=plastic&color=brightgreen)](https://chrome.google.com/webstore/detail/sonarrradarrlidarr-autose/jmmjjcddjldjdjgckdiokhfokccdnekc) [![Chrome Web Store](https://img.shields.io/chrome-web-store/stars/jmmjjcddjldjdjgckdiokhfokccdnekc?label=rating&style=plastic&color=brightgreen)](https://chrome.google.com/webstore/detail/sonarrradarrlidarr-autose/jmmjjcddjldjdjgckdiokhfokccdnekc)
[![Mozilla Add-on](https://img.shields.io/amo/v/sonarr-radarr-lidarr-search?label=Firefox%20add-ons&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9%2FAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI6SURBVChTfVJNSFRRGD33vjdv3nvOmx9%2FygQRs5yoHAiMyGUGgdlGym2LNjW0SGhjtNB9hJvauAmiMGjTSmhTRBpWi1AzwkZTR0mdmeffzJt5z3e%2F7gyTtIgOXD74OOfcw%2BHD%2F0DZHo3syy%2FkvFBdHYBX579R8obg%2Bf3Y959Q%2BuLh6rYCVp2g0YYkQuoUlNYa1j%2F5jj6e0RE2NxAMWFAVQOAzhNbLWsfXy3y5kaJ7LZdA%2FnN46mm4wevx9Pjb9Iee%2B%2B5mpEvleRiRbJnaBJ8lhu7G2fDI%2FHTlR7od%2F4So04loEaglzKeu0tzUINPcIMzGBZzsG0XDsSVA04hMf4H5XjsXfefqsKN3ggWAozpwKIzjXa%2FZ%2BRuD2LJM5Ow2MIOAXQFkOIPH2mTkE6q3EWuW1QHSEORgtrYD418GUGQJWGEdoV1g%2Fv1Z1Hd%2Fg9i2wMIylTAaee5rW1bYIWDbABZrMDGZwFyGY5k2kVZtZCgPUcxBrMhEfBf0SwGtqzb3PXMlv1aXwo4Ubpm4wiZhFBaxl1mGbf%2BEcGaQCLwB3y6BF6RJyshShs1WyklHksna5rVHRmQP0D0UNAXTogUKJ3SYP6CXS4txeCIGErGh4MjYcEW4GhrgQnVeWQ25XiuaBw%2B4QMAHVPkUWYo8E6cYhqD6CfWI6NbHnpYODmA1dCfoM%2Fch052besjhWtAF5wL%2BvorSjkXMNZ9pFt2KLj2Wsf66nD%2BQBu2Sfg2MToEY56R8Z6S%2BbCo8mKlSJIDf81Pn%2Bw9CHy8AAAAASUVORK5CYII%3D&style=plastic&color=orange)](https://addons.mozilla.org/en-GB/firefox/addon/sonarr-radarr-lidarr-search/) [![Mozilla Add-on](https://img.shields.io/amo/users/sonarr-radarr-lidarr-search?label=users&style=plastic&color=orange)](https://addons.mozilla.org/en-GB/firefox/addon/sonarr-radarr-lidarr-search/) [![Mozilla Add-on](https://img.shields.io/amo/stars/sonarr-radarr-lidarr-search?label=rating&style=plastic&color=orange)](https://addons.mozilla.org/en-GB/firefox/addon/sonarr-radarr-lidarr-search/)
-[![](https://img.shields.io/static/v1?label=Edge%20add-ons&message=v2.8.7.0&color=blue&style=plastic&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJdSURBVDhPVVLPaxNBFP7eZJPNNomCqGj1aBGkB8WKF4/iyR4sQqGm4M1TKyoI1T+gf0BBqHhRoQW9CO1BEcUKIhSlh4rx18FKm1q7aZJustmdnZ3xTSj+ePDNDPPeN9+bb4bwT5x4vdqrocYN5HlNsg/oEFF7haj1Ku/UpxdPj77bKcUf4sBCbcQgnTZQRU0KGgk0xTDoIOf4KLjrxsvV77rZcHz+6G3ZJZ5aaFwCzEMDQ0xkApMsEZJ3IuRz6yjl11DIb8LNth45IhmmgQX/EGc/BVW/GPoNmFTB8TLwDvTA2eN2iT3uKnZ5qyh5m7wO4GSSYRF1grHvbz4Wq5VNBIGDUBbQambgL9fQrFS5n5ARMxQjhRAM0lfF2lJ10BajsA/G3c0owThF7mtvOdowZelvVY0OkWoJlWrECSGSOOmEbe8IuT3gC3GbGqZZg1x+e7P95PoMS2D/8wc61cGMUiFkItlNxaoqFqnIa50adKHY18oSiNy2JdnIFVbYwF+QqsFqATqyxYrtx8JofNV6h7i9BUpSUNYb2uFBYGNEoAqtfyKWPmP7hUyiG0w08wxO8GNEEZDJcs8Y3XXx3oglEtUvCKqfIbSH+J4DcaLOvjw+2ySa+HCQs5+FQEnELbjf3oOcPMieZtL7pPUdGL1EacIG6D4k0bnGs1tTwkz2rxtjrmi7nStCW6NY0orxdJnXizAm5sPtm1R4rtmksAMm+2dZoMwagTx8DNqkXM82/w1b12GUG08num7/98m57V4+cUyoaDDn/+jLhA0ScecLpWqOTDrVmLtmfwQH8BseJ1GMK7TIYwAAAABJRU5ErkJggg==)](https://microsoftedge.microsoft.com/addons/detail/sonarrradarrlidarr-auto/aclgfcjonnhgdkinhmmafdbkpegfcnal) ![Edge](https://img.shields.io/static/v1?label=users&message=487&color=blue&style=plastic) +[![](https://img.shields.io/static/v1?label=Edge%20add-ons&message=v2.8.8.0&color=blue&style=plastic&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJdSURBVDhPVVLPaxNBFP7eZJPNNomCqGj1aBGkB8WKF4/iyR4sQqGm4M1TKyoI1T+gf0BBqHhRoQW9CO1BEcUKIhSlh4rx18FKm1q7aZJustmdnZ3xTSj+ePDNDPPeN9+bb4bwT5x4vdqrocYN5HlNsg/oEFF7haj1Ku/UpxdPj77bKcUf4sBCbcQgnTZQRU0KGgk0xTDoIOf4KLjrxsvV77rZcHz+6G3ZJZ5aaFwCzEMDQ0xkApMsEZJ3IuRz6yjl11DIb8LNth45IhmmgQX/EGc/BVW/GPoNmFTB8TLwDvTA2eN2iT3uKnZ5qyh5m7wO4GSSYRF1grHvbz4Wq5VNBIGDUBbQambgL9fQrFS5n5ARMxQjhRAM0lfF2lJ10BajsA/G3c0owThF7mtvOdowZelvVY0OkWoJlWrECSGSOOmEbe8IuT3gC3GbGqZZg1x+e7P95PoMS2D/8wc61cGMUiFkItlNxaoqFqnIa50adKHY18oSiNy2JdnIFVbYwF+QqsFqATqyxYrtx8JofNV6h7i9BUpSUNYb2uFBYGNEoAqtfyKWPmP7hUyiG0w08wxO8GNEEZDJcs8Y3XXx3oglEtUvCKqfIbSH+J4DcaLOvjw+2ySa+HCQs5+FQEnELbjf3oOcPMieZtL7pPUdGL1EacIG6D4k0bnGs1tTwkz2rxtjrmi7nStCW6NY0orxdJnXizAm5sPtm1R4rtmksAMm+2dZoMwagTx8DNqkXM82/w1b12GUG08num7/98m57V4+cUyoaDDn/+jLhA0ScecLpWqOTDrVmLtmfwQH8BseJ1GMK7TIYwAAAABJRU5ErkJggg==)](https://microsoftedge.microsoft.com/addons/detail/sonarrradarrlidarr-auto/aclgfcjonnhgdkinhmmafdbkpegfcnal) ![Edge](https://img.shields.io/static/v1?label=users&message=487&color=blue&style=plastic) + +[![Playwright tests](https://github.com/trossr32/sonarr-radarr-lidarr-autosearch-browser-extension/actions/workflows/playwright.yml/badge.svg)](https://github.com/trossr32/sonarr-radarr-lidarr-autosearch-browser-extension/actions/workflows/playwright.yml) ## Overview @@ -26,7 +28,7 @@ Leave a review: [![Chrome Web Store](https://img.shields.io/chrome-web-store/v/jmmjjcddjldjdjgckdiokhfokccdnekc?label=Chrome%20web%20store&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADdYAAA3WAZBveZwAAAIISURBVDhPdVLPaxNBFP52tyVpTGPbIImlLVEDtvVWwRZPooJUiLd6WBQFETTtRelV%2FAc8it6s6V0r%2BOsaBD14UwtCwEp%2FYNAejLvZNLuzM9M3s5tgC%2F3g7Xvvm%2Fn2vTczBv7D%2BrydI3eXrEQ2LqS0uJTf%2FZC%2Faof8yemll9tqn0JXSCKb3FOyjCb2gYR%2FPRbemnr2YkXlWkii6%2BQqnfwg%2BJxz12dzVHnFWHx9Lnd%2BdaB2aiu1p5KZOkS%2FkQDbiZkITcYaPCUneiie%2F3TSyZz4nUSSmbAOD6Ln6m186B2GCYlLuS2kt5cB7mmhlH0D3g67Z1J8pd0r8Lno6gXDLsP%2BYuJhdQMPqpuYe2%2BheeSGXlMwaBjLNEpKOK6Ib2MenGNZvPOHUG8GitJYd0K8%2FZWn3emYUWKjqIT6QAR9P056CATNtQ%2BME2eorV1Ila1FMfCD%2F8T0sItMwooZIJs0MTvSAEInZtScsmadtQtFimciCvjjfsXCzEXk00P0kzTuTDGMNpZhiuh0JRX3A76kruM45atkfXqFYFBb%2Bf4ChBSYtP7h8mA2XgECJloknDAflaqq1TJZdzhJgrqzhlZrExfoejrg9P4CxsuZ6cqGnpjEz8ndJGupvINZqpQwo0MJuXDbAb%2FWf6aiXtjeJ0Ztj5G7T1YaTSQKC0dHApqpFobiDbX4mCrV9UYAu%2FF1yscRLQLJAAAAAElFTkSuQmCC&style=plastic&color=brightgreen)](https://chrome.google.com/webstore/detail/sonarrradarrlidarr-autose/jmmjjcddjldjdjgckdiokhfokccdnekc)
[![Mozilla Add-on](https://img.shields.io/amo/v/sonarr-radarr-lidarr-search?label=Firefox%20add-ons&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9%2FAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI6SURBVChTfVJNSFRRGD33vjdv3nvOmx9%2FygQRs5yoHAiMyGUGgdlGym2LNjW0SGhjtNB9hJvauAmiMGjTSmhTRBpWi1AzwkZTR0mdmeffzJt5z3e%2F7gyTtIgOXD74OOfcw%2BHD%2F0DZHo3syy%2FkvFBdHYBX579R8obg%2Bf3Y959Q%2BuLh6rYCVp2g0YYkQuoUlNYa1j%2F5jj6e0RE2NxAMWFAVQOAzhNbLWsfXy3y5kaJ7LZdA%2FnN46mm4wevx9Pjb9Iee%2B%2B5mpEvleRiRbJnaBJ8lhu7G2fDI%2FHTlR7od%2F4So04loEaglzKeu0tzUINPcIMzGBZzsG0XDsSVA04hMf4H5XjsXfefqsKN3ggWAozpwKIzjXa%2FZ%2BRuD2LJM5Ow2MIOAXQFkOIPH2mTkE6q3EWuW1QHSEORgtrYD418GUGQJWGEdoV1g%2Fv1Z1Hd%2Fg9i2wMIylTAaee5rW1bYIWDbABZrMDGZwFyGY5k2kVZtZCgPUcxBrMhEfBf0SwGtqzb3PXMlv1aXwo4Ubpm4wiZhFBaxl1mGbf%2BEcGaQCLwB3y6BF6RJyshShs1WyklHksna5rVHRmQP0D0UNAXTogUKJ3SYP6CXS4txeCIGErGh4MjYcEW4GhrgQnVeWQ25XiuaBw%2B4QMAHVPkUWYo8E6cYhqD6CfWI6NbHnpYODmA1dCfoM%2Fch052besjhWtAF5wL%2BvorSjkXMNZ9pFt2KLj2Wsf66nD%2BQBu2Sfg2MToEY56R8Z6S%2BbCo8mKlSJIDf81Pn%2Bw9CHy8AAAAASUVORK5CYII%3D&style=plastic&color=orange)](https://addons.mozilla.org/en-GB/firefox/addon/sonarr-radarr-lidarr-search/)
-[![](https://img.shields.io/static/v1?label=Edge%20add-ons&message=v2.8.7.0&color=blue&style=plastic&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJdSURBVDhPVVLPaxNBFP7eZJPNNomCqGj1aBGkB8WKF4/iyR4sQqGm4M1TKyoI1T+gf0BBqHhRoQW9CO1BEcUKIhSlh4rx18FKm1q7aZJustmdnZ3xTSj+ePDNDPPeN9+bb4bwT5x4vdqrocYN5HlNsg/oEFF7haj1Ku/UpxdPj77bKcUf4sBCbcQgnTZQRU0KGgk0xTDoIOf4KLjrxsvV77rZcHz+6G3ZJZ5aaFwCzEMDQ0xkApMsEZJ3IuRz6yjl11DIb8LNth45IhmmgQX/EGc/BVW/GPoNmFTB8TLwDvTA2eN2iT3uKnZ5qyh5m7wO4GSSYRF1grHvbz4Wq5VNBIGDUBbQambgL9fQrFS5n5ARMxQjhRAM0lfF2lJ10BajsA/G3c0owThF7mtvOdowZelvVY0OkWoJlWrECSGSOOmEbe8IuT3gC3GbGqZZg1x+e7P95PoMS2D/8wc61cGMUiFkItlNxaoqFqnIa50adKHY18oSiNy2JdnIFVbYwF+QqsFqATqyxYrtx8JofNV6h7i9BUpSUNYb2uFBYGNEoAqtfyKWPmP7hUyiG0w08wxO8GNEEZDJcs8Y3XXx3oglEtUvCKqfIbSH+J4DcaLOvjw+2ySa+HCQs5+FQEnELbjf3oOcPMieZtL7pPUdGL1EacIG6D4k0bnGs1tTwkz2rxtjrmi7nStCW6NY0orxdJnXizAm5sPtm1R4rtmksAMm+2dZoMwagTx8DNqkXM82/w1b12GUG08num7/98m57V4+cUyoaDDn/+jLhA0ScecLpWqOTDrVmLtmfwQH8BseJ1GMK7TIYwAAAABJRU5ErkJggg==)](https://microsoftedge.microsoft.com/addons/detail/sonarrradarrlidarr-auto/aclgfcjonnhgdkinhmmafdbkpegfcnal) +[![](https://img.shields.io/static/v1?label=Edge%20add-ons&message=v2.8.8.0&color=blue&style=plastic&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJdSURBVDhPVVLPaxNBFP7eZJPNNomCqGj1aBGkB8WKF4/iyR4sQqGm4M1TKyoI1T+gf0BBqHhRoQW9CO1BEcUKIhSlh4rx18FKm1q7aZJustmdnZ3xTSj+ePDNDPPeN9+bb4bwT5x4vdqrocYN5HlNsg/oEFF7haj1Ku/UpxdPj77bKcUf4sBCbcQgnTZQRU0KGgk0xTDoIOf4KLjrxsvV77rZcHz+6G3ZJZ5aaFwCzEMDQ0xkApMsEZJ3IuRz6yjl11DIb8LNth45IhmmgQX/EGc/BVW/GPoNmFTB8TLwDvTA2eN2iT3uKnZ5qyh5m7wO4GSSYRF1grHvbz4Wq5VNBIGDUBbQambgL9fQrFS5n5ARMxQjhRAM0lfF2lJ10BajsA/G3c0owThF7mtvOdowZelvVY0OkWoJlWrECSGSOOmEbe8IuT3gC3GbGqZZg1x+e7P95PoMS2D/8wc61cGMUiFkItlNxaoqFqnIa50adKHY18oSiNy2JdnIFVbYwF+QqsFqATqyxYrtx8JofNV6h7i9BUpSUNYb2uFBYGNEoAqtfyKWPmP7hUyiG0w08wxO8GNEEZDJcs8Y3XXx3oglEtUvCKqfIbSH+J4DcaLOvjw+2ySa+HCQs5+FQEnELbjf3oOcPMieZtL7pPUdGL1EacIG6D4k0bnGs1tTwkz2rxtjrmi7nStCW6NY0orxdJnXizAm5sPtm1R4rtmksAMm+2dZoMwagTx8DNqkXM82/w1b12GUG08num7/98m57V4+cUyoaDDn/+jLhA0ScecLpWqOTDrVmLtmfwQH8BseJ1GMK7TIYwAAAABJRU5ErkJggg==)](https://microsoftedge.microsoft.com/addons/detail/sonarrradarrlidarr-auto/aclgfcjonnhgdkinhmmafdbkpegfcnal) [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/K3K22CEIT) @@ -66,7 +68,7 @@ If any of the sites on this tab are set as enabled then this extension will atte ## Create package Uses grunt as a task runner, run the following from the root directory to build: -``` +```powershell npm i grunt release ``` @@ -75,9 +77,23 @@ The grunt release config executes a Powershell script to run web-ext, this can b ## Tests -Next to no test coverage at the moment and is currently just a development tool to assert code changes, but uses Jest for any available: - +### Playwright +Site integration tests can be found in the tests/playwright directory. The tests expect the dist directory to be populated with the latest build. The tests can be run using the following from the root directory: + +```powershell +npm i +# npm i grunt -g # if grunt isn't already installed uncomment +grunt playwright +cd tests/playwright +npm i +npx playwright install --with-deps chromium +npx playwright test ``` + +### Unit tests +Next to no unit test coverage at the moment and is currently just a development tool to assert code changes, but uses Jest for any available: + +```powershell npm i npm run test ``` diff --git a/src/content/js/content_script.js b/src/content/js/content_script.js index dba50d9..c6172ce 100644 --- a/src/content/js/content_script.js +++ b/src/content/js/content_script.js @@ -17,7 +17,7 @@ } ], integrations = [ - /* sonarr version which doesn't work with id search */ + /* sonarr imdb */ { id: 'imdb', rules: [ @@ -53,7 +53,7 @@ imgStyles: 'width: 35px; margin: -8px 10px 0 0;' } }, - /* radarr version which works with id search */ + /* radarr imdb */ { id: 'imdb', rules: [ @@ -229,15 +229,15 @@ } ], search: { - containerSelector: '.external > li > a[id="external-link-tvdb"]', + containerSelector: '.external > li > a[id="external-link-imdb"]', selectorType: 'href', modifiers: [ { type: 'regex-match', - pattern: /\/(?\d{2,10})/i + pattern: /(?tt\d{5,10})/i }, { type: 'prepend', - var: 'tvdb:' + var: 'imdb:' } ] }, diff --git a/src/content/js/core.js b/src/content/js/core.js index 3d6f28d..cd743d0 100644 --- a/src/content/js/core.js +++ b/src/content/js/core.js @@ -127,7 +127,7 @@ let sessionId, }, { id: 'lidarr', domain: 'http://my.lidarr-url.domain:8686', - enabled: false, + enabled: true, searchPath: '/add/search/', searchInputSelector: 'input[name="searchBox"]', menuText: 'Search Lidarr', diff --git a/src/manifest.json b/src/manifest.json index 70a357a..865694c 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Sonarr/Radarr/Lidarr autosearch", "description": "Exposes a context menu that enables direct searching for tv shows, movies and other text in Sonarr, Radarr, Lidarr and Readarr.", - "version": "2.8.7.0", + "version": "2.8.8.0", "browser_action": { "default_icon": "content/assets/images/SonarrRadarrLidarr128.png", "default_popup": "popup.html" diff --git a/src/options.html b/src/options.html index 0f1787a..99862a3 100644 --- a/src/options.html +++ b/src/options.html @@ -193,7 +193,7 @@
- Version 2.8.7 + Version 2.8.8
diff --git a/src/popup.html b/src/popup.html index da2cf29..fbb7193 100644 --- a/src/popup.html +++ b/src/popup.html @@ -38,7 +38,7 @@
- Version 2.8.7 + Version 2.8.8
diff --git a/tests/playwright/.gitignore b/tests/playwright/.gitignore new file mode 100644 index 0000000..68c5d18 --- /dev/null +++ b/tests/playwright/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/tests/playwright/constants.ts b/tests/playwright/constants.ts new file mode 100644 index 0000000..bc3aad6 --- /dev/null +++ b/tests/playwright/constants.ts @@ -0,0 +1 @@ +export const iconDataLocator = 'a[data-servarr-icon="true"]'; \ No newline at end of file diff --git a/tests/playwright/fixtures.ts b/tests/playwright/fixtures.ts new file mode 100644 index 0000000..85d56f3 --- /dev/null +++ b/tests/playwright/fixtures.ts @@ -0,0 +1,39 @@ +import { test as base, chromium, type BrowserContext } from '@playwright/test'; +import path from 'path'; + +export const test = base.extend<{ + context: BrowserContext; + extensionId: string; +}>({ + context: async ({ }, use) => { + const pathToExtension = path.resolve(__dirname, '../../dist'); + console.log('Loading extension from', pathToExtension); + const context = await chromium.launchPersistentContext('', { + headless: false, + args: [ + `--headless=new`, + `--disable-extensions-except=${pathToExtension}`, + `--load-extension=${pathToExtension}`, + ], + }); + await use(context); + await context.close(); + }, + extensionId: async ({ context }, use) => { + // for manifest v2: + let [background] = context.backgroundPages() + if (!background) + background = await context.waitForEvent('backgroundpage') + + // for manifest v3: + /* + let [background] = context.serviceWorkers(); + if (!background) + background = await context.waitForEvent('serviceworker'); + */ + + const extensionId = background.url().split('/')[2]; + await use(extensionId); + }, +}); +export const expect = test.expect; \ No newline at end of file diff --git a/tests/playwright/helpers.ts b/tests/playwright/helpers.ts new file mode 100644 index 0000000..1fd13d2 --- /dev/null +++ b/tests/playwright/helpers.ts @@ -0,0 +1,20 @@ +/** + * Get the expected Sonarr URL for a given add new path query + * @param query + * @returns expected Sonarr URL + */ +export const getExpectedSonarrUrl = (query: string): string => `http://my.sonarr-url.domain:8989/add/new/${query}`; + +/** + * Get the expected Radarr URL for a given add new path query + * @param query + * @returns expected Radarr URL + */ +export const getExpectedRadarrUrl = (query: string): string => `http://my.radarr-url.domain:7878/add/new/${query}`; + +/** + * Get the expected Lidarr URL for a given search query + * @param query + * @returns expected Lidarr URL + */ +export const getExpectedLidarrUrl = (query: string): string => `http://my.lidarr-url.domain:8686/add/search/${query}`; \ No newline at end of file diff --git a/tests/playwright/package-lock.json b/tests/playwright/package-lock.json new file mode 100644 index 0000000..1aadbf1 --- /dev/null +++ b/tests/playwright/package-lock.json @@ -0,0 +1,1168 @@ +{ + "name": "integration-tests", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "integration-tests", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "@playwright/test": "^1.43.1", + "@types/node": "^20.12.7", + "testcontainers": "^10.9.0" + } + }, + "node_modules/@balena/dockerignore": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz", + "integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==", + "dev": true + }, + "node_modules/@playwright/test": { + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.43.1.tgz", + "integrity": "sha512-HgtQzFgNEEo4TE22K/X7sYTYNqEMMTZmFS8kTq6m8hXj+m1D8TgwgIbumHddJa9h4yl4GkKb8/bgAl2+g7eDgA==", + "dev": true, + "dependencies": { + "playwright": "1.43.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@types/docker-modem": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", + "integrity": "sha512-yKpAGEuKRSS8wwx0joknWxsmLha78wNMe9R2S3UNsVOkZded8UqOrV8KoeDXoXsjndxwyF3eIhyClGbO1SEhEg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/ssh2": "*" + } + }, + "node_modules/@types/dockerode": { + "version": "3.3.28", + "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.28.tgz", + "integrity": "sha512-RjY96chW88t2QvSebCsec+mQYo3/nyOr+/tVcE+0ynlOg2m/i9wPE52DhptzF75QDlhv2uDYVPqKfHKeGTn6Fg==", + "dev": true, + "dependencies": { + "@types/docker-modem": "*", + "@types/node": "*", + "@types/ssh2": "*" + } + }, + "node_modules/@types/node": { + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/ssh2": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.15.0.tgz", + "integrity": "sha512-YcT8jP5F8NzWeevWvcyrrLB3zcneVjzYY9ZDSMAMboI+2zR1qYWFhwsyOFVzT7Jorn67vqxC0FRiw8YyG9P1ww==", + "dev": true, + "dependencies": { + "@types/node": "^18.11.18" + } + }, + "node_modules/@types/ssh2-streams": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@types/ssh2-streams/-/ssh2-streams-0.1.12.tgz", + "integrity": "sha512-Sy8tpEmCce4Tq0oSOYdfqaBpA3hDM8SoxoFh5vzFsu2oL+znzGz8oVWW7xb4K920yYMUY+PIG31qZnFMfPWNCg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ssh2/node_modules/@types/node": { + "version": "18.19.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", + "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/archiver": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", + "dev": true, + "dependencies": { + "archiver-utils": "^2.1.0", + "async": "^3.2.4", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dev": true, + "dependencies": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/archiver-utils/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/archiver-utils/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/archiver-utils/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true + }, + "node_modules/async-lock": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "dev": true + }, + "node_modules/b4a": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", + "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/bare-events": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.2.tgz", + "integrity": "sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==", + "dev": true, + "optional": true + }, + "node_modules/bare-fs": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.0.tgz", + "integrity": "sha512-TNFqa1B4N99pds2a5NYHR15o0ZpdNKbAeKTE/+G6ED/UeOavv8RY3dr/Fu99HW3zU3pXpo2kDNO8Sjsm2esfOw==", + "dev": true, + "optional": true, + "dependencies": { + "bare-events": "^2.0.0", + "bare-path": "^2.0.0", + "bare-stream": "^1.0.0" + } + }, + "node_modules/bare-os": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.3.0.tgz", + "integrity": "sha512-oPb8oMM1xZbhRQBngTgpcQ5gXw6kjOaRsSWsIeNyRxGed2w/ARyP7ScBYpWR1qfX2E5rS3gBw6OWcSQo+s+kUg==", + "dev": true, + "optional": true + }, + "node_modules/bare-path": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.2.tgz", + "integrity": "sha512-o7KSt4prEphWUHa3QUwCxUI00R86VdjiuxmJK0iNVDHYPGo+HsDaVCnqCmPbf/MiW1ok8F4p3m8RTHlWk8K2ig==", + "dev": true, + "optional": true, + "dependencies": { + "bare-os": "^2.1.0" + } + }, + "node_modules/bare-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-1.0.0.tgz", + "integrity": "sha512-KhNUoDL40iP4gFaLSsoGE479t0jHijfYdIcxRn/XtezA2BaUD0NRf/JGRpsMq6dMNM+SrCrB0YSSo/5wBY4rOQ==", + "dev": true, + "optional": true, + "dependencies": { + "streamx": "^2.16.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buildcheck": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz", + "integrity": "sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==", + "dev": true, + "optional": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha512-s6webAy+R4SR8XVuJWt2V2rGvhnrhxN+9S15GNuTK3wKPOXFF6RNc+8ug2XhH+2s4f+uudG4kUVYmYOQWL2g0Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/compress-commons": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", + "dev": true, + "dependencies": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cpu-features": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", + "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "buildcheck": "~0.0.6", + "nan": "^2.17.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true, + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", + "dev": true, + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/docker-compose": { + "version": "0.24.8", + "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.24.8.tgz", + "integrity": "sha512-plizRs/Vf15H+GCVxq2EUvyPK7ei9b/cVesHvjnX4xaXjM9spHe2Ytq0BitndFgvTJ3E3NljPNUEl7BAN43iZw==", + "dev": true, + "dependencies": { + "yaml": "^2.2.2" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/docker-modem": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz", + "integrity": "sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "readable-stream": "^3.5.0", + "split-ca": "^1.0.1", + "ssh2": "^1.11.0" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/dockerode": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-3.3.5.tgz", + "integrity": "sha512-/0YNa3ZDNeLr/tSckmD69+Gq+qVNhvKfAHNeZJBnp7EOP6RGKV8ORrJHkUn20So5wU+xxT7+1n5u8PjHbfjbSA==", + "dev": true, + "dependencies": { + "@balena/dockerignore": "^1.0.2", + "docker-modem": "^3.0.0", + "tar-fs": "~2.0.1" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/dockerode/node_modules/tar-fs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz", + "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "dev": true + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-port": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", + "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/lazystream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/lazystream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", + "dev": true + }, + "node_modules/lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==", + "dev": true + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, + "node_modules/lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nan": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", + "dev": true, + "optional": true + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/playwright": { + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.43.1.tgz", + "integrity": "sha512-V7SoH0ai2kNt1Md9E3Gwas5B9m8KR2GVvwZnAI6Pg0m3sh7UvgiYhRrhsziCmqMJNouPckiOhk8T+9bSAK0VIA==", + "dev": true, + "dependencies": { + "playwright-core": "1.43.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.43.1.tgz", + "integrity": "sha512-EI36Mto2Vrx6VF7rm708qSnesVQKbxEWvPrfA1IPY6HgczBplDx7ENtx+K2n4kJ41sLLkuGfmb0ZLSSXlDhqPg==", + "dev": true, + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/properties-reader": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/properties-reader/-/properties-reader-2.3.0.tgz", + "integrity": "sha512-z597WicA7nDZxK12kZqHr2TcvwNU1GCfA5UwfDY/HDp3hXPoPlb5rlEx9bwGTiJnc0OqbBTkU975jDToth8Gxw==", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/steveukx/properties?sponsor=1" + } + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dev": true, + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/split-ca": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz", + "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==", + "dev": true + }, + "node_modules/ssh-remote-port-forward": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/ssh-remote-port-forward/-/ssh-remote-port-forward-1.0.4.tgz", + "integrity": "sha512-x0LV1eVDwjf1gmG7TTnfqIzf+3VPRz7vrNIjX6oYLbeCrf/PeVY6hkT68Mg+q02qXxQhrLjB0jfgvhevoCRmLQ==", + "dev": true, + "dependencies": { + "@types/ssh2": "^0.5.48", + "ssh2": "^1.4.0" + } + }, + "node_modules/ssh-remote-port-forward/node_modules/@types/ssh2": { + "version": "0.5.52", + "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-0.5.52.tgz", + "integrity": "sha512-lbLLlXxdCZOSJMCInKH2+9V/77ET2J6NPQHpFI0kda61Dd1KglJs+fPQBchizmzYSOJBgdTajhPqBO1xxLywvg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/ssh2-streams": "*" + } + }, + "node_modules/ssh2": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", + "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "asn1": "^0.2.6", + "bcrypt-pbkdf": "^1.0.2" + }, + "engines": { + "node": ">=10.16.0" + }, + "optionalDependencies": { + "cpu-features": "~0.0.9", + "nan": "^2.18.0" + } + }, + "node_modules/streamx": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz", + "integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==", + "dev": true, + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-fs": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" + } + }, + "node_modules/tar-fs/node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/testcontainers": { + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/testcontainers/-/testcontainers-10.9.0.tgz", + "integrity": "sha512-LN+cKAOd61Up9SVMJW+3VFVGeVQG8JBqZhEQo2U0HBfIsAynyAXcsLBSo+KZrOfy9SBz7pGHctWN/KabLDbNFA==", + "dev": true, + "dependencies": { + "@balena/dockerignore": "^1.0.2", + "@types/dockerode": "^3.3.24", + "archiver": "^5.3.2", + "async-lock": "^1.4.1", + "byline": "^5.0.0", + "debug": "^4.3.4", + "docker-compose": "^0.24.6", + "dockerode": "^3.3.5", + "get-port": "^5.1.1", + "node-fetch": "^2.7.0", + "proper-lockfile": "^4.1.2", + "properties-reader": "^2.3.0", + "ssh-remote-port-forward": "^1.0.4", + "tar-fs": "^3.0.5", + "tmp": "^0.2.1" + } + }, + "node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz", + "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/zip-stream": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", + "dev": true, + "dependencies": { + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/node_modules/archiver-utils": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "dev": true, + "dependencies": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + } + } +} diff --git a/tests/playwright/package.json b/tests/playwright/package.json new file mode 100644 index 0000000..da59583 --- /dev/null +++ b/tests/playwright/package.json @@ -0,0 +1,15 @@ +{ + "name": "integration-tests", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": {}, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@playwright/test": "^1.43.1", + "@types/node": "^20.12.7", + "testcontainers": "^10.9.0" + } +} diff --git a/tests/playwright/playwright.config.ts b/tests/playwright/playwright.config.ts new file mode 100644 index 0000000..317f9d3 --- /dev/null +++ b/tests/playwright/playwright.config.ts @@ -0,0 +1,80 @@ +import { defineConfig, devices } from '@playwright/test'; + +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ +// require('dotenv').config(); + +/** + * See https://playwright.dev/docs/test-configuration. + */ +export default defineConfig({ + testDir: './site.integrations.tests', + expect: { + timeout: 10000, + }, + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 1, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : 2, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: 'html', + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + // baseURL: 'http://127.0.0.1:3000', + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + }, + + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] }, + }, + + // { + // name: 'firefox', + // use: { ...devices['Desktop Firefox'] }, + // }, + + // { + // name: 'webkit', + // use: { ...devices['Desktop Safari'] }, + // }, + + /* Test against mobile viewports. */ + // { + // name: 'Mobile Chrome', + // use: { ...devices['Pixel 5'] }, + // }, + // { + // name: 'Mobile Safari', + // use: { ...devices['iPhone 12'] }, + // }, + + /* Test against branded browsers. */ + // { + // name: 'Microsoft Edge', + // use: { ...devices['Desktop Edge'], channel: 'msedge' }, + // }, + // { + // name: 'Google Chrome', + // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, + // }, + ], + + /* Run your local dev server before starting the tests */ + // webServer: { + // command: 'npm run start', + // url: 'http://127.0.0.1:3000', + // reuseExistingServer: !process.env.CI, + // }, +}); \ No newline at end of file diff --git a/tests/playwright/site.integrations.tests/allocine.spec.ts b/tests/playwright/site.integrations.tests/allocine.spec.ts new file mode 100644 index 0000000..7c4e283 --- /dev/null +++ b/tests/playwright/site.integrations.tests/allocine.spec.ts @@ -0,0 +1,15 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +test('allocine tv has sonarr icon', async ({ page }) => { + await page.goto('https://www.allocine.fr/series/ficheserie_gen_cserie=3584.html', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('fringe')); +}); + +test('allocine movie has radarr icon', async ({ page }) => { + await page.goto('https://www.allocine.fr/film/fichefilm_gen_cfilm=115362.html', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('the%20dark%20knight%2C%20le%20chevalier%20noir')); +}); diff --git a/tests/playwright/site.integrations.tests/betaseries.spec.ts b/tests/playwright/site.integrations.tests/betaseries.spec.ts new file mode 100644 index 0000000..39775f3 --- /dev/null +++ b/tests/playwright/site.integrations.tests/betaseries.spec.ts @@ -0,0 +1,23 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +const tvShowUrls = ['https://www.betaseries.com/en/show/', 'https://www.betaseries.com/serie/'] + +tvShowUrls.forEach(async (url) => { + test(`betaseries tv has sonarr icon at link: ${url}`, async ({ page }) => { + await page.goto(`${url}fringe`, { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('Fringe')); + }); +}); + +const movieUrls = ['https://www.betaseries.com/en/movie/', 'https://www.betaseries.com/film/'] + +movieUrls.forEach(async (url) => { + test(`betaseries movie has radarr icon at link: ${url}`, async ({ page }) => { + await page.goto(`${url}139-the-dark-knight`, { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('The%20Dark%20Knight')); + }); +}); diff --git a/tests/playwright/site.integrations.tests/imdb.spec.ts b/tests/playwright/site.integrations.tests/imdb.spec.ts new file mode 100644 index 0000000..6281ede --- /dev/null +++ b/tests/playwright/site.integrations.tests/imdb.spec.ts @@ -0,0 +1,38 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +const imdbUrl = (imdbId: string): string => `https://www.imdb.com/title/${imdbId}/`; +const servarrQueryId = (imdbId: string): string => `imdb%3A${imdbId}`; + +test('imdb tv has sonarr icon', async ({ page }) => { + const imdbId = 'tt1119644'; + await page.goto(imdbUrl(imdbId), { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl(servarrQueryId(imdbId))); +}); + +test('imdb movie has radarr icon', async ({ page }) => { + const imdbId = 'tt0468569'; + await page.goto(imdbUrl(imdbId), { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl(servarrQueryId(imdbId))); +}); + +test('imdb other video has radarr and sonarr icons', async ({ page }) => { + const imdbId = 'tt1080585'; + await page.goto(imdbUrl(imdbId), { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(2); + + // for each icon put the href value in an array and check if it contains the expected values + const icons = await page.locator(iconDataLocator).all(); + + let hrefs = Array(); + for (const icon of icons) { + let href = await icon.getAttribute('href'); + hrefs.push(href); + } + + expect(hrefs).toEqual(expect.arrayContaining([getExpectedSonarrUrl(servarrQueryId(imdbId)), getExpectedRadarrUrl(servarrQueryId(imdbId))])); +}); + diff --git a/tests/playwright/site.integrations.tests/iptorrents.spec.ts b/tests/playwright/site.integrations.tests/iptorrents.spec.ts new file mode 100644 index 0000000..d000719 --- /dev/null +++ b/tests/playwright/site.integrations.tests/iptorrents.spec.ts @@ -0,0 +1,19 @@ +/** + * TODO: Add integration tests for iptorrents. Need a logon so not sure if this is going to be possible. + */ + +// import { iconDataLocator } from '../constants'; +// import { test, expect } from '../fixtures'; +// import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +// test('iptorrents tv has sonarr icon', async ({ page }) => { +// await page.goto('https://www.iptorrents.com/tv/fringe', { waitUntil: 'commit' }); +// await expect(page.locator(iconDataLocator)).toHaveCount(1); +// await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('fringe')); +// }); + +// test('iptorrents movie has radarr icon', async ({ page }) => { +// await page.goto('https://www.iptorrents.com/m/the_dark_knight', { waitUntil: 'commit' }); +// await expect(page.locator(iconDataLocator)).toHaveCount(1); +// await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('the%20dark%20knight')); +// }); diff --git a/tests/playwright/site.integrations.tests/last.fm.spec.ts b/tests/playwright/site.integrations.tests/last.fm.spec.ts new file mode 100644 index 0000000..e38d7bb --- /dev/null +++ b/tests/playwright/site.integrations.tests/last.fm.spec.ts @@ -0,0 +1,11 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedLidarrUrl } from '../helpers'; + +// TODO: test is not currently working but the integration is. Not sure why + +// test('last.fm artist has lidarr icon', async ({ page }) => { +// await page.goto('https://www.last.fm/music/Aqua', { waitUntil: 'commit' }); +// await expect(page.locator(iconDataLocator)).toHaveCount(1); +// await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedLidarrUrl('Aqua')); +// }); \ No newline at end of file diff --git a/tests/playwright/site.integrations.tests/letterboxd.spec.ts b/tests/playwright/site.integrations.tests/letterboxd.spec.ts new file mode 100644 index 0000000..4854a75 --- /dev/null +++ b/tests/playwright/site.integrations.tests/letterboxd.spec.ts @@ -0,0 +1,9 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl } from '../helpers'; + +test('letterboxd movie has radarr icon', async ({ page }) => { + await page.goto('https://letterboxd.com/film/the-dark-knight/', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('tmdb%3A155')); +}); diff --git a/tests/playwright/site.integrations.tests/metacritic.spec.ts b/tests/playwright/site.integrations.tests/metacritic.spec.ts new file mode 100644 index 0000000..2e2e8cc --- /dev/null +++ b/tests/playwright/site.integrations.tests/metacritic.spec.ts @@ -0,0 +1,15 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +test('metacritic tv has sonarr icon', async ({ page }) => { + await page.goto('https://www.metacritic.com/tv/fringe/', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('Fringe')); +}); + +test('metacritic movie has radarr icon', async ({ page }) => { + await page.goto('https://www.metacritic.com/movie/the-dark-knight/', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('The%20Dark%20Knight')); +}); diff --git a/tests/playwright/site.integrations.tests/musicbrainz.spec.ts b/tests/playwright/site.integrations.tests/musicbrainz.spec.ts new file mode 100644 index 0000000..a5192b9 --- /dev/null +++ b/tests/playwright/site.integrations.tests/musicbrainz.spec.ts @@ -0,0 +1,28 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedLidarrUrl } from '../helpers'; + +const servarrQueryId = (lidarrId: string): string => `lidarr%3A${lidarrId}`; + +test('musicbrainz artist has lidarr icon', async ({ page }) => { + const lidarrId = 'a1ed5e33-22ff-4e7d-a457-42f4309e135f'; + await page.goto(`https://musicbrainz.org/artist/${lidarrId}`, { waitUntil: 'commit' }); + // wait for 20 secs + await page.waitForTimeout(20000); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedLidarrUrl(servarrQueryId(lidarrId))); +}); + +test('musicbrainz release group has lidarr icon', async ({ page }) => { + const lidarrId = '33d83c7d-280e-3ca6-98ff-4e473b4252e8'; + await page.goto(`https://musicbrainz.org/release-group/${lidarrId}`, { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedLidarrUrl(servarrQueryId(lidarrId))); +}); + +test('musicbrainz release has lidarr icon', async ({ page }) => { + const lidarrId = 'c38f3b27-841b-4b88-8e76-448242443bd9' + await page.goto(`https://musicbrainz.org/release/${lidarrId}`, { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedLidarrUrl(servarrQueryId(lidarrId))); +}); \ No newline at end of file diff --git a/tests/playwright/site.integrations.tests/myanimelist.spec.ts b/tests/playwright/site.integrations.tests/myanimelist.spec.ts new file mode 100644 index 0000000..b66ad0c --- /dev/null +++ b/tests/playwright/site.integrations.tests/myanimelist.spec.ts @@ -0,0 +1,15 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +test('myanimelist tv has sonarr icon', async ({ page }) => { + await page.goto('https://myanimelist.net/anime/813/Dragon_Ball_Z', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('Dragon%20Ball%20Z')); +}); + +test('myanimelist movie has radarr icon', async ({ page }) => { + await page.goto('https://myanimelist.net/anime/47/Akira', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('Akira')); +}); diff --git a/tests/playwright/site.integrations.tests/rotten-tomatoes.spec.ts b/tests/playwright/site.integrations.tests/rotten-tomatoes.spec.ts new file mode 100644 index 0000000..6c46d0e --- /dev/null +++ b/tests/playwright/site.integrations.tests/rotten-tomatoes.spec.ts @@ -0,0 +1,15 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +test('rotten tomatoes tv has sonarr icon', async ({ page }) => { + await page.goto('https://www.rottentomatoes.com/tv/fringe', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('fringe')); +}); + +test('rotten tomatoes movie has radarr icon', async ({ page }) => { + await page.goto('https://www.rottentomatoes.com/m/the_dark_knight', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('the%20dark%20knight')); +}); diff --git a/tests/playwright/site.integrations.tests/senscritique.spec.ts b/tests/playwright/site.integrations.tests/senscritique.spec.ts new file mode 100644 index 0000000..6fac7f3 --- /dev/null +++ b/tests/playwright/site.integrations.tests/senscritique.spec.ts @@ -0,0 +1,15 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +test('senscritique tv has sonarr icon', async ({ page }) => { + await page.goto('https://www.senscritique.com/serie/fringe/164968', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('Fringe')); +}); + +test('senscritique movie has radarr icon', async ({ page }) => { + await page.goto('https://www.senscritique.com/film/the_dark_knight_le_chevalier_noir/419456', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('The%20Dark%20Knight%20-%20Le%20Chevalier%20noir')); +}); diff --git a/tests/playwright/site.integrations.tests/simkl.spec.ts b/tests/playwright/site.integrations.tests/simkl.spec.ts new file mode 100644 index 0000000..47054ec --- /dev/null +++ b/tests/playwright/site.integrations.tests/simkl.spec.ts @@ -0,0 +1,21 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +test('simkl tv has sonarr icon', async ({ page }) => { + await page.goto('https://simkl.com/tv/12022/fringe', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('Fringe')); +}); + +test('simkl movie has radarr icon', async ({ page }) => { + await page.goto('https://simkl.com/movies/53282/the-dark-knight', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('The%20Dark%20Knight')); +}); + +test('simkl calendar has sonarr icons', async ({ page }) => { + await page.goto('https://simkl.com/tv/calendar', { waitUntil: 'commit' }); + + await expect(page.locator(iconDataLocator)).not.toHaveCount(0); +}); diff --git a/tests/playwright/site.integrations.tests/tmdb.spec.ts b/tests/playwright/site.integrations.tests/tmdb.spec.ts new file mode 100644 index 0000000..4d652e1 --- /dev/null +++ b/tests/playwright/site.integrations.tests/tmdb.spec.ts @@ -0,0 +1,17 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +// tmdb id doesn't work with sonarr +test('tmdb tv has sonarr icon', async ({ page }) => { + await page.goto('https://www.themoviedb.org/tv/1705-fringe', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('Fringe')); +}); + +// tmdb id works with radarr +test('imdb movie has radarr icon', async ({ page }) => { + await page.goto('https://www.themoviedb.org/movie/155-the-dark-knight', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('tmdb%3A155')); +}); diff --git a/tests/playwright/site.integrations.tests/trakt.spec.ts b/tests/playwright/site.integrations.tests/trakt.spec.ts new file mode 100644 index 0000000..8911017 --- /dev/null +++ b/tests/playwright/site.integrations.tests/trakt.spec.ts @@ -0,0 +1,33 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +test('trakt tv has sonarr icon', async ({ page }) => { + await page.goto('https://trakt.tv/shows/fringe', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('imdb%3Att1119644')); +}); + +test('trakt movie has radarr icon', async ({ page }) => { + await page.goto('https://trakt.tv/movies/the-dark-knight-2008', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('tmdb%3A155')); +}); + +const tvShowViews = ['trending', 'popular', 'favorited/weekly', 'watched/weekly', 'collected/weekly', 'anticipated'] + +tvShowViews.forEach(view => { + test(`trakt tv view ${view} has sonarr icons`, async ({ page }) => { + await page.goto(`https://trakt.tv/shows/${view}`, { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).not.toHaveCount(0); + }); +}); + +const movieViews = ['trending', 'popular', 'favorited/weekly', 'watched/weekly', 'collected/weekly', 'anticipated', 'boxoffice']; + +movieViews.forEach(view => { + test(`trakt movie view ${view} has radarr icons`, async ({ page }) => { + await page.goto(`https://trakt.tv/movies/${view}`, { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).not.toHaveCount(0); + }); +}); \ No newline at end of file diff --git a/tests/playwright/site.integrations.tests/tv-calendar.spec.ts b/tests/playwright/site.integrations.tests/tv-calendar.spec.ts new file mode 100644 index 0000000..87feb82 --- /dev/null +++ b/tests/playwright/site.integrations.tests/tv-calendar.spec.ts @@ -0,0 +1,8 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; + +test('tv calendar page has sonarr icons', async ({ page }) => { + await page.goto('https://www.pogdesign.co.uk/cat', { waitUntil: 'commit' }); + + await expect(page.locator(iconDataLocator)).not.toHaveCount(0); +}); diff --git a/tests/playwright/site.integrations.tests/tvdb.spec.ts b/tests/playwright/site.integrations.tests/tvdb.spec.ts new file mode 100644 index 0000000..8dd652a --- /dev/null +++ b/tests/playwright/site.integrations.tests/tvdb.spec.ts @@ -0,0 +1,17 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedRadarrUrl, getExpectedSonarrUrl } from '../helpers'; + +// tvdb id works with sonarr +test('tvdb tv has sonarr icon', async ({ page }) => { + await page.goto('https://www.thetvdb.com/series/fringe', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('tvdb%3A82066')); +}); + +// tvdb id doesn't work with radarr +test('tvdb movie has radarr icon', async ({ page }) => { + await page.goto('https://thetvdb.com/movies/the-dark-knight', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedRadarrUrl('The%20Dark%20Knight')); +}); diff --git a/tests/playwright/site.integrations.tests/tvmaze.spec.ts b/tests/playwright/site.integrations.tests/tvmaze.spec.ts new file mode 100644 index 0000000..c20af69 --- /dev/null +++ b/tests/playwright/site.integrations.tests/tvmaze.spec.ts @@ -0,0 +1,15 @@ +import { iconDataLocator } from '../constants'; +import { test, expect } from '../fixtures'; +import { getExpectedSonarrUrl } from '../helpers'; + +test('tvmaze show has sonarr icon', async ({ page }) => { + await page.goto('https://www.tvmaze.com/shows/158/fringe', { waitUntil: 'commit' }); + await expect(page.locator(iconDataLocator)).toHaveCount(1); + await expect(page.locator(iconDataLocator)).toHaveAttribute('href', getExpectedSonarrUrl('Fringe')); +}); + +test('tvmaze countdown has sonarr icons', async ({ page }) => { + await page.goto('https://www.tvmaze.com/countdown', { waitUntil: 'commit' }); + + await expect(page.locator(iconDataLocator)).not.toHaveCount(0); +}); diff --git a/tests/servarr_search_url.test.js b/tests/unit-tests/servarr_search_url.test.js similarity index 100% rename from tests/servarr_search_url.test.js rename to tests/unit-tests/servarr_search_url.test.js