Skip to content

Commit 74d81b1

Browse files
committed
test(e2e): enhance detox video options patch
1 parent 1e0bfa1 commit 74d81b1

File tree

7 files changed

+50
-30
lines changed

7 files changed

+50
-30
lines changed

.github/workflows/test-mobile-e2e-reusable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ jobs:
837837
path: ios-test-artifacts
838838
pattern: ios-test-artifacts*
839839
merge-multiple: true
840-
- uses: LedgerHQ/ledger-live/tools/actions/composites/upload-allure-report@develop
840+
- uses: LedgerHQ/ledger-live/tools/actions/composites/upload-allure-report@support/qaa_e2e_llm_fail_video_retry_pr_comments
841841
if: ${{ !cancelled() }}
842842
id: upload
843843
with:
@@ -888,7 +888,7 @@ jobs:
888888
path: android-test-artifacts
889889
pattern: android-test-artifacts*
890890
merge-multiple: true
891-
- uses: LedgerHQ/ledger-live/tools/actions/composites/upload-allure-report@develop
891+
- uses: LedgerHQ/ledger-live/tools/actions/composites/upload-allure-report@support/qaa_e2e_llm_fail_video_retry_pr_comments
892892
id: upload
893893
if: ${{ !cancelled() }}
894894
with:

e2e/mobile/specs/deeplinks.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe("DeepLinks Tests", () => {
113113
});
114114

115115
(isSmokeTestRun ? describe.skip : describe)("Open modular drawer via deeplinks", () => {
116-
const TOP_CRYPTO_TICKERS = ["BTC", "ETH", "USDT", "XRP", "BNB"];
116+
const TOP_CRYPTO_TICKERS = ["BTCError", "ETH", "USDT", "XRP", "BNB"];
117117

118118
beforeEach(async () => {
119119
await app.modularDrawer.tapDrawerCloseButton({ onlyIfVisible: true });

e2e/mobile/specs/market.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe("Market page for user with no device", () => {
3333
tags.forEach(tag => $Tag(tag));
3434
it("should find the researched crypto", async () => {
3535
await app.walletTabNavigator.navigateToMarket();
36-
await app.market.searchAsset("eth");
36+
await app.market.searchAsset("error");
3737
await app.market.expectMarketRowTitle(ticker);
3838
});
3939

patches/detox-allure2-adapter@1.0.0-alpha.42.patch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/dist/listener.js
22
+++ b/dist/listener.js
3-
@@ -75,8 +75,20 @@
3+
@@ -75,8 +75,21 @@
44
onError,
55
});
66
}
@@ -15,8 +15,9 @@
1515
+ // If enabled via env var, check for JSON options or use defaults
1616
+ if (enableVideoFromEnv) {
1717
+ try {
18-
+ baseOptions = process.env.DETOX_VIDEO_OPTIONS ? JSON.parse(process.env.DETOX_VIDEO_OPTIONS) : { android: { recording: { bitRate: 1000000, maxSize: 720, codec: 'h264' }, audio: false, window: false }, ios: { codec: 'hevc' } };
18+
+ baseOptions = process.env.DETOX_VIDEO_OPTIONS ? JSON.parse(process.env.DETOX_VIDEO_OPTIONS) : {};
1919
+ } catch (e) {
20+
+ console.warn('Failed to parse DETOX_VIDEO_OPTIONS:', e instanceof Error ? e.message : String(e));
2021
+ baseOptions = {};
2122
+ }
2223
+ }

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/actions/composites/upload-allure-report/action.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,7 @@ runs:
4242
echo "path=${PATH_VALUE}" >> "$GITHUB_OUTPUT"
4343
- name: Compress PNG files
4444
shell: bash
45-
run: |
46-
if command -v pngquant &> /dev/null; then
47-
echo "pngquant already installed"
48-
else
49-
echo "Installing pngquant..."
50-
if [[ "$OSTYPE" == "darwin"* ]]; then
51-
brew install pngquant
52-
else
53-
sudo apt-get update && sudo apt-get install -y pngquant
54-
fi
55-
fi
56-
57-
PNG_COUNT=$(find "${{ inputs.path }}" -type f -name "*.png" 2>/dev/null | wc -l)
58-
echo "Found $PNG_COUNT PNG files to compress"
59-
60-
if [ "$PNG_COUNT" -gt 0 ]; then
61-
find "${{ inputs.path }}" -type f -name "*.png" -exec pngquant --quality=65-80 --skip-if-larger --ext .png --force {} \;
62-
echo "PNG compression completed"
63-
fi
45+
run: ${{ github.action_path }}/compress-pngs.sh "${{ inputs.path }}"
6446
- name: Publish report on Allure Server
6547
id: publish-report
6648
uses: LedgerHQ/send-to-allure-server-action@2.1.2
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# Compress PNG files in a directory using pngquant
5+
# Usage: compress-pngs.sh <directory>
6+
7+
TARGET_DIR="${1:-}"
8+
9+
if [ -z "$TARGET_DIR" ]; then
10+
echo "::error::No directory specified"
11+
exit 1
12+
fi
13+
14+
if [ ! -d "$TARGET_DIR" ]; then
15+
echo "::warning::Directory '$TARGET_DIR' not found. Skipping PNG compression."
16+
exit 0
17+
fi
18+
19+
# Install pngquant if not available
20+
if command -v pngquant &> /dev/null; then
21+
echo "pngquant already installed"
22+
else
23+
echo "Installing pngquant..."
24+
if [[ "$OSTYPE" == "darwin"* ]]; then
25+
brew install pngquant
26+
else
27+
sudo apt-get update && sudo apt-get install -y pngquant
28+
fi
29+
fi
30+
31+
PNG_COUNT=$(find "$TARGET_DIR" -type f -name "*.png" 2>/dev/null | wc -l | tr -d ' ')
32+
echo "Found $PNG_COUNT PNG files to compress"
33+
34+
if [ "$PNG_COUNT" -gt 0 ]; then
35+
find "$TARGET_DIR" -type f -name "*.png" -exec pngquant --quality=65-80 --skip-if-larger --ext .png --force {} \;
36+
echo "PNG compression completed"
37+
fi

0 commit comments

Comments
 (0)