Skip to content

Commit

Permalink
server e2e coverage & missing images
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codes committed Nov 26, 2024
1 parent 6330995 commit 834ffb1
Show file tree
Hide file tree
Showing 35 changed files with 14 additions and 19 deletions.
1 change: 1 addition & 0 deletions apps/playnite-web/cypress.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const config = {
coverage: {
reportAfterEachSpec: 'text',
exclude: true,
url: 'http://localhost:3000/__coverage__',
},
},
coverage: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]',
Expand Down Expand Up @@ -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"]',
Expand Down
28 changes: 11 additions & 17 deletions apps/playnite-web/scripts/utils/buildServer.js
Original file line number Diff line number Diff line change
@@ -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',
}),
)
}
Expand All @@ -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),
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.

0 comments on commit 834ffb1

Please sign in to comment.