A local-first personal finance app
:test_tube: Fix flaky VRT test and prevent downloading translations where not needed (#6429)
Michael Clark3fafb898d073
diff --git a/.github/workflows/ai-generated-release-notes.yml b/.github/workflows/ai-generated-release-notes.ymlindex e832d4cd24..b2b5323766 100644--- a/.github/workflows/ai-generated-release-notes.yml+++ b/.github/workflows/ai-generated-release-notes.yml@@ -20,6 +20,8 @@ jobs:uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0- name: Set up environmentuses: ./.github/actions/setup+ with:+ download-translations: 'false'- name: Check if this is CodeRabbit's first commentid: check-first-commentdiff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.ymlindex c91175d12a..66acab281a 100644--- a/.github/workflows/autofix.yml+++ b/.github/workflows/autofix.yml@@ -18,6 +18,8 @@ jobs:- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0- name: Set up environmentuses: ./.github/actions/setup+ with:+ download-translations: 'false'- name: Format coderun: yarn lint:fix- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27diff --git a/.github/workflows/count-points.yml b/.github/workflows/count-points.ymlindex 6ef96fdc81..e4528fc54e 100644--- a/.github/workflows/count-points.yml+++ b/.github/workflows/count-points.yml@@ -19,6 +19,8 @@ jobs:uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0- name: Set up environmentuses: ./.github/actions/setup+ with:+ download-translations: 'false'- name: Count pointsenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}diff --git a/.github/workflows/docs-release.yml b/.github/workflows/docs-release.ymlindex 8f880441ed..45612d703d 100644--- a/.github/workflows/docs-release.yml+++ b/.github/workflows/docs-release.yml@@ -20,6 +20,8 @@ jobs:- name: Set up environmentuses: ./.github/actions/setup+ with:+ download-translations: 'false'- name: Docusaurus Deployrun: |diff --git a/bin/package-electron b/bin/package-electronindex 56a7f819fd..8dfaeac4c1 100755--- a/bin/package-electron+++ b/bin/package-electron@@ -8,6 +8,7 @@ CI=${CI:-false}cd "$ROOT/.."POSITIONAL=()SKIP_EXE_BUILD=false+SKIP_TRANSLATIONS=falsewhile [[ $# -gt 0 ]]; dokey="$1"@@ -20,6 +21,10 @@ while [[ $# -gt 0 ]]; doSKIP_EXE_BUILD=trueshift;;+ --skip-translations)+ SKIP_TRANSLATIONS=true+ shift+ ;;*)POSITIONAL+=("$1")shift@@ -29,15 +34,19 @@ doneset -- "${POSITIONAL[@]}"-# Get translations-echo "Updating translations..."-if ! [ -d packages/desktop-client/locale ]; then- git clone https://github.com/actualbudget/translations packages/desktop-client/locale+if [ $SKIP_TRANSLATIONS == false ]; then+ # Get translations+ echo "Updating translations..."+ if ! [ -d packages/desktop-client/locale ]; then+ git clone https://github.com/actualbudget/translations packages/desktop-client/locale+ fi++ pushd packages/desktop-client/locale > /dev/null++ git pull+ popd > /dev/null+ packages/desktop-client/bin/remove-untranslated-languagesfi-pushd packages/desktop-client/locale > /dev/null-git pull-popd > /dev/null-packages/desktop-client/bin/remove-untranslated-languagesexport NODE_OPTIONS="--max-old-space-size=4096"diff --git a/package.json b/package.jsonindex 77b346a8a8..dc1a01e25b 100644--- a/package.json+++ b/package.json@@ -46,7 +46,7 @@"test": "lage test --continue","test:debug": "lage test --no-cache --continue","e2e": "yarn workspace @actual-app/web run e2e",- "e2e:desktop": "yarn build:desktop --skip-exe-build && yarn workspace desktop-electron e2e",+ "e2e:desktop": "yarn build:desktop --skip-exe-build --skip-translations && yarn workspace desktop-electron e2e","playwright": "yarn workspace @actual-app/web run playwright","vrt": "yarn workspace @actual-app/web run vrt","vrt:docker": "./bin/run-vrt",diff --git a/packages/desktop-client/e2e/command-bar.test.ts b/packages/desktop-client/e2e/command-bar.test.tsindex a1b156e76e..bfde3d132c 100644--- a/packages/desktop-client/e2e/command-bar.test.ts+++ b/packages/desktop-client/e2e/command-bar.test.ts@@ -59,7 +59,9 @@ test.describe('Command bar', () => {await commandBar.fill('reports');await page.keyboard.press('Enter');await expect(page.getByTestId('reports-page')).toBeVisible();- await expect(page.getByText('Loading reports...')).not.toBeVisible(); // wait for screen to load+ await expect(page.getByText('Loading reports...')).not.toBeVisible({+ timeout: 10000, // Wait for 10 seconds max for reports to load+ }); // wait for screen to load// Navigate to schedule pageawait page.keyboard.press('ControlOrMeta+k');diff --git a/packages/desktop-client/playwright.config.ts b/packages/desktop-client/playwright.config.tsindex bcb530af5d..e0d6d1461a 100644--- a/packages/desktop-client/playwright.config.ts+++ b/packages/desktop-client/playwright.config.ts@@ -8,7 +8,9 @@ export default defineConfig({fullyParallel: true,workers: process.env.CI ? 1 : undefined,testDir: 'e2e/',- reporter: process.env.CI ? 'blob' : [['html', { open: 'never' }]],+ reporter: process.env.CI+ ? [['blob'], ['list']]+ : [['html', { open: 'never' }]],use: {userAgent: 'playwright',screenshot: 'on',diff --git a/upcoming-release-notes/6429.md b/upcoming-release-notes/6429.mdnew file mode 100644index 0000000000..31d9468fae--- /dev/null+++ b/upcoming-release-notes/6429.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [MikesGlitch]+---++Prevent downloading translations for all vrt workflows