Skip to content

Commit e151dd5

Browse files
committed
ci: use prod build for cypress
1 parent ceaaaa4 commit e151dd5

File tree

5 files changed

+250
-26
lines changed

5 files changed

+250
-26
lines changed

cypress/e2e/SmokeTests/SmokeTests.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Feature: Smoke tests
66
Then you should see the login prompt
77

88
# login form is not working for v42 currently
9-
@skip-login @v<42
9+
# https://dhis2.atlassian.net/browse/DHIS2-20638
10+
@skip-login @v<40
1011
Scenario: Show app main selections and header bar: without auth cookie
1112
Given you open the App without auth cookie
1213
When you fill in credentials

i18n/en.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ msgstr ""
55
"Content-Type: text/plain; charset=utf-8\n"
66
"Content-Transfer-Encoding: 8bit\n"
77
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
8-
"POT-Creation-Date: 2025-12-04T10:33:38.238Z\n"
9-
"PO-Revision-Date: 2025-12-04T10:33:38.238Z\n"
8+
"POT-Creation-Date: 2025-12-08T22:18:04.114Z\n"
9+
"PO-Revision-Date: 2025-12-08T22:18:04.114Z\n"
1010

1111
msgid "Choose one or more dates..."
1212
msgstr "Choose one or more dates..."

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,17 @@
6464
},
6565
"scripts": {
6666
"start": "yarn verifyCacheVersion && concurrently --kill-others \"yarn workspaces run build:watch\" \"d2-app-scripts start\"",
67-
"start:forCypress": "yarn workspaces run build && node scripts/startAppForCypress.js",
67+
"start:prod": "yarn build:standalone && serve -s build/app",
68+
"start:forCypress": "yarn build:standalone && node scripts/startAppForCypress.js",
6869
"build": "yarn verifyCacheVersion && yarn workspaces run build && GENERATE_SOURCEMAP=false d2-app-scripts build && cp ./package.json ./build/app/package.json",
69-
"build:standalone": "yarn workspaces run build && GENERATE_SOURCEMAP=false d2-app-scripts build --standalone",
70-
"serve": "npx serve -s build/app",
70+
"build:standalone": "yarn verifyCacheVersion && yarn workspaces run build && GENERATE_SOURCEMAP=false d2-app-scripts build --standalone",
7171
"test": "yarn workspaces run build && d2-app-scripts test",
7272
"test:debug": "yarn workspaces run build && react-scripts --inspect-brk test --runInBand",
7373
"jsdoc": "NODE_ENV=development jsdoc -c jsdoc-conf.json",
7474
"linter:check": "yarn workspaces run linter:check && yarn workspaces run build && eslint -c .eslintrc . --quiet",
7575
"tsc:check": "./node_modules/.bin/tsc --noEmit && yarn workspaces run tsc:check",
7676
"cy:open": "export NODE_OPTIONS=--openssl-legacy-provider && concurrently --kill-others \"yarn start:forCypress\" \"wait-on 'http-get://127.0.0.1:3000' && cypress open\"",
7777
"cy:run": "export NODE_OPTIONS=--openssl-legacy-provider && concurrently --kill-others \"yarn start:forCypress\" \"wait-on 'http-get://127.0.0.1:3000' && cypress run\"",
78-
"cy:open:fast": "export NODE_OPTIONS=--openssl-legacy-provider && yarn build:standalone && concurrently --kill-others \"yarn serve\" \"wait-on 'http-get://127.0.0.1:3000' && cypress open\"",
79-
"cy:run:fast": "export NODE_OPTIONS=--openssl-legacy-provider && yarn build:standalone && concurrently --kill-others \"yarn serve\" \"wait-on 'http-get://127.0.0.1:3000' && cypress run\"",
8078
"verifyCacheVersion": "node scripts/verifyCacheVersion.js",
8179
"postinstall": "husky install && node scripts/createSymlinkToInternalPackages.mjs",
8280
"i18n:add": "d2-app-scripts i18n extract && git add ./i18n/",
@@ -128,6 +126,7 @@
128126
"jsdoc-babel": "^0.5.0",
129127
"jsdoc-export-default-interop": "^0.3.1",
130128
"redux-devtools-extension": "^2.13.9",
129+
"serve": "^14.2.5",
131130
"typescript": "^5.8.2",
132131
"wait-on": "^8.0.1"
133132
},

scripts/startAppForCypress.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ const env = Object
5252
}, { BROWSER: 'none' });
5353

5454
exec({
55-
cmd: 'yarn',
56-
args: ['run', 'start'],
55+
cmd: 'serve',
56+
args: ['-s build/app'],
5757
cwd: '.',
5858
env,
59-
pipe: true,
59+
pipe: false,
6060
});

0 commit comments

Comments
 (0)