diff --git a/apps/playnite-web/cypress.config.mjs b/apps/playnite-web/cypress.config.mjs index 1dde530c7..bdbc2651a 100755 --- a/apps/playnite-web/cypress.config.mjs +++ b/apps/playnite-web/cypress.config.mjs @@ -13,6 +13,7 @@ const config = { coverage: { reportAfterEachSpec: 'text', exclude: true, + url: 'http://localhost:3000/__coverage__', }, }, coverage: true, diff --git a/apps/playnite-web/cypress/e2e/remote-control/game-details.cy.ts b/apps/playnite-web/cypress/e2e/remote-control/game-details.cy.ts index ec9062c49..d523606de 100755 --- a/apps/playnite-web/cypress/e2e/remote-control/game-details.cy.ts +++ b/apps/playnite-web/cypress/e2e/remote-control/game-details.cy.ts @@ -42,7 +42,7 @@ describe('Remote control.', () => { cy.get('[data-test="GameDetails"]') .parent() .compareSnapshot({ - name: `play-button-visible_${breakpointName}`, + name: `${locationName}_play-button-visible_${breakpointName}`, cypressScreenshotOptions: { blackout: [ '[data-test="GameDetails"] [data-test="Name"]', @@ -73,7 +73,7 @@ describe('Remote control.', () => { cy.get('[data-test="GameDetails"]') .parent() .compareSnapshot({ - name: `restart-stop-buttons-visible_${breakpointName}`, + name: `${locationName}_restart-stop-buttons-visible_${breakpointName}`, cypressScreenshotOptions: { blackout: [ '[data-test="GameDetails"] [data-test="Name"]', diff --git a/apps/playnite-web/scripts/utils/buildServer.js b/apps/playnite-web/scripts/utils/buildServer.js index 46aa0773b..ea37213b4 100755 --- a/apps/playnite-web/scripts/utils/buildServer.js +++ b/apps/playnite-web/scripts/utils/buildServer.js @@ -1,34 +1,27 @@ import { build } from 'esbuild' -import istanbul from 'esbuild-plugin-istanbul' +import { esbuildPluginIstanbul } from 'esbuild-plugin-istanbul' const plugins = [] if (process.env.INSTRUMENT) { plugins.push( - istanbul.esbuildPluginIstanbul({ - filter: /src\/.*ts$/, + esbuildPluginIstanbul({ + filter: /src\/server\/.*ts/, loader: 'ts', name: 'istanbul-loader-ts', }), ) plugins.push( - istanbul.esbuildPluginIstanbul({ - filter: /src\/.*tsx$/, - loader: 'tsx', - name: 'istanbul-loader-tsx', - }), - ) - plugins.push( - istanbul.esbuildPluginIstanbul({ - filter: /server.ts$/, + esbuildPluginIstanbul({ + filter: /server\.ts/, loader: 'ts', - name: 'istanbul-loader-ts', + name: 'istanbul-loader-server-ts', }), ) plugins.push( - istanbul.esbuildPluginIstanbul({ - filter: /app.ts$/, + esbuildPluginIstanbul({ + filter: /app\.ts/, loader: 'ts', - name: 'istanbul-loader-ts', + name: 'istanbul-loader-app-ts', }), ) } @@ -40,7 +33,8 @@ build({ external: ['lightningcss', 'esbuild', 'sharp', 'mongodb'], outfile: `server.${process.env.NODE_ENV ?? 'development'}.cjs`, platform: 'node', - sourcemap: process.env.NODE_ENV !== 'production', + sourcemap: + process.env.NODE_ENV !== 'production' || process.env.INSTRUMENT === 'true', define: { 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), }, diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_desktop.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_desktop.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_desktop.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_desktop.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-mini-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-mini-landscape.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-mini-landscape.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-mini-landscape.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-mini-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-mini-portrait.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-mini-portrait.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-mini-portrait.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-pro-12-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-pro-12-landscape.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-pro-12-landscape.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-pro-12-landscape.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-pro-12-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-pro-12-portrait.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_ipad-pro-12-portrait.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_ipad-pro-12-portrait.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_iphone-16-pro-max-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_iphone-16-pro-max-portrait.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_iphone-16-pro-max-portrait.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_iphone-16-pro-max-portrait.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_iphone-16-pro-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_iphone-16-pro-portrait.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_iphone-16-pro-portrait.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_play-button-visible_iphone-16-pro-portrait.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_desktop.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_desktop.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_desktop.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_desktop.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-mini-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-mini-landscape.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-mini-landscape.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-mini-landscape.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-mini-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-mini-portrait.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-mini-portrait.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-mini-portrait.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-pro-12-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-pro-12-landscape.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-pro-12-landscape.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-pro-12-landscape.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-pro-12-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-pro-12-portrait.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_ipad-pro-12-portrait.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_ipad-pro-12-portrait.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_iphone-16-pro-max-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_iphone-16-pro-max-portrait.png similarity index 100% rename from apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-restart-stop-buttons-visible_iphone-16-pro-max-portrait.png rename to apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_iphone-16-pro-max-portrait.png diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_iphone-16-pro-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_iphone-16-pro-portrait.png new file mode 100755 index 000000000..76ac22446 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-Browse_restart-stop-buttons-visible_iphone-16-pro-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_desktop.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_desktop.png new file mode 100755 index 000000000..b9ae9cc67 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_desktop.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-mini-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-mini-landscape.png new file mode 100755 index 000000000..bfc6e78d1 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-mini-landscape.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-mini-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-mini-portrait.png new file mode 100755 index 000000000..2c41eb22e Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-mini-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-pro-12-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-pro-12-landscape.png new file mode 100755 index 000000000..32388bcb9 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-pro-12-landscape.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-pro-12-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-pro-12-portrait.png new file mode 100755 index 000000000..b9ae9cc67 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_ipad-pro-12-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_iphone-16-pro-max-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_iphone-16-pro-max-portrait.png new file mode 100755 index 000000000..f80598402 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_iphone-16-pro-max-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_iphone-16-pro-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_iphone-16-pro-portrait.png new file mode 100755 index 000000000..8fdef0b6e Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_play-button-visible_iphone-16-pro-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_desktop.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_desktop.png new file mode 100755 index 000000000..aba2e82c1 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_desktop.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-mini-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-mini-landscape.png new file mode 100755 index 000000000..b7c62b973 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-mini-landscape.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-mini-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-mini-portrait.png new file mode 100755 index 000000000..d6f267465 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-mini-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-pro-12-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-pro-12-landscape.png new file mode 100755 index 000000000..39a3e2350 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-pro-12-landscape.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-pro-12-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-pro-12-portrait.png new file mode 100755 index 000000000..758488637 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_ipad-pro-12-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_iphone-16-pro-max-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_iphone-16-pro-max-portrait.png new file mode 100755 index 000000000..808c66a3b Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_iphone-16-pro-max-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_iphone-16-pro-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_iphone-16-pro-portrait.png new file mode 100755 index 000000000..5d4bb6982 Binary files /dev/null and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-On Deck_restart-stop-buttons-visible_iphone-16-pro-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-Browse-iphone-16-pro-max-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-Browse-iphone-16-pro-max-portrait.png index 49bc716c8..ca6ce23d8 100755 Binary files a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-Browse-iphone-16-pro-max-portrait.png and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-Browse-iphone-16-pro-max-portrait.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-desktop.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-desktop.png index 0e3c101c8..ae95e068d 100755 Binary files a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-desktop.png and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-desktop.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-ipad-pro-12-landscape.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-ipad-pro-12-landscape.png index 02c1ce81c..96ef55649 100755 Binary files a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-ipad-pro-12-landscape.png and b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-game-details-On Deck-ipad-pro-12-landscape.png differ diff --git a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_iphone-16-pro-portrait.png b/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_iphone-16-pro-portrait.png deleted file mode 100755 index 70f86cac9..000000000 Binary files a/apps/playnite-web/visual-regression-tests/e2e-screenshots/baseline/game-details.cy.ts-play-button-visible_iphone-16-pro-portrait.png and /dev/null differ