From 3fafb898d0736d392e4f22171451baf01bbf29ca Mon Sep 17 00:00:00 2001 From: Michael Clark <5285928+MikesGlitch@users.noreply.github.com> Date: Tue, 16 Dec 2025 23:03:09 +0000 Subject: [PATCH] :test_tube: Fix flaky VRT test and prevent downloading translations where not needed (#6429) * this is a test * [autofix.ci] apply automated fixes * dot reporter for line by line * [autofix.ci] apply automated fixes * ok... * list reporter * Update VRT screenshots Auto-generated by VRT workflow PR: #6429 * fix couple of issues * Revert "Update VRT screenshots" This reverts commit 0124b134750a519a44df9868182e15dcd84b131f. * putting text change back * release notes * skipping translations on the desktop app --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] --- .../workflows/ai-generated-release-notes.yml | 2 ++ .github/workflows/autofix.yml | 2 ++ .github/workflows/count-points.yml | 2 ++ .github/workflows/docs-release.yml | 2 ++ bin/package-electron | 25 +++++++++++++------ package.json | 2 +- .../desktop-client/e2e/command-bar.test.ts | 4 ++- packages/desktop-client/playwright.config.ts | 4 ++- upcoming-release-notes/6429.md | 6 +++++ 9 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 upcoming-release-notes/6429.md diff --git a/.github/workflows/ai-generated-release-notes.yml b/.github/workflows/ai-generated-release-notes.yml index 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 environment uses: ./.github/actions/setup + with: + download-translations: 'false' - name: Check if this is CodeRabbit's first comment id: check-first-comment diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 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 environment uses: ./.github/actions/setup + with: + download-translations: 'false' - name: Format code run: yarn lint:fix - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 diff --git a/.github/workflows/count-points.yml b/.github/workflows/count-points.yml index 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 environment uses: ./.github/actions/setup + with: + download-translations: 'false' - name: Count points env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docs-release.yml b/.github/workflows/docs-release.yml index 8f880441ed..45612d703d 100644 --- a/.github/workflows/docs-release.yml +++ b/.github/workflows/docs-release.yml @@ -20,6 +20,8 @@ jobs: - name: Set up environment uses: ./.github/actions/setup + with: + download-translations: 'false' - name: Docusaurus Deploy run: | diff --git a/bin/package-electron b/bin/package-electron index 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=false while [[ $# -gt 0 ]]; do key="$1" @@ -20,6 +21,10 @@ while [[ $# -gt 0 ]]; do SKIP_EXE_BUILD=true shift ;; + --skip-translations) + SKIP_TRANSLATIONS=true + shift + ;; *) POSITIONAL+=("$1") shift @@ -29,15 +34,19 @@ done set -- "${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-languages fi -pushd packages/desktop-client/locale > /dev/null -git pull -popd > /dev/null -packages/desktop-client/bin/remove-untranslated-languages export NODE_OPTIONS="--max-old-space-size=4096" diff --git a/package.json b/package.json index 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.ts index 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 page await page.keyboard.press('ControlOrMeta+k'); diff --git a/packages/desktop-client/playwright.config.ts b/packages/desktop-client/playwright.config.ts index 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.md new file mode 100644 index 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