Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default tseslint.config(
rules: {
'no-unused-vars': 'off', // we have @typescript-eslint/no-unused-vars enabled below
'no-else-return': 'error',
'preserve-caught-error': 'off',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Expand Down
4 changes: 2 additions & 2 deletions github/actions/generate-publish-test-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
- name: Generate Allure report
shell: bash
run: |
npx ts-node run/test/specs/utils/allure/closeRun.ts
npx ts-node run/test/utils/allure/closeRun.ts
env:
PLATFORM: ${{ inputs.PLATFORM }}
BUILD_NUMBER: ${{ inputs.BUILD_NUMBER }}
Expand All @@ -37,7 +37,7 @@ runs:
id: publish
shell: bash
run: |
npx ts-node run/test/specs/utils/allure/publishReport.ts
npx ts-node run/test/utils/allure/publishReport.ts
env:
PLATFORM: ${{ inputs.PLATFORM }}
BUILD_NUMBER: ${{ inputs.BUILD_NUMBER }}
Expand Down
10 changes: 8 additions & 2 deletions run/types/DeviceWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,10 @@ export class DeviceWrapper {
);

// Load the reference image buffer from disk
const referencePath = path.join('run', 'test', 'specs', 'media', referenceImageName);
const referencePath = path.join('run', 'test', 'media', referenceImageName);
await fs.access(referencePath).catch(() => {
throw new Error(`Reference image not found: ${referencePath}`);
});
const referenceBuffer = await fs.readFile(referencePath);

let bestMatch: {
Expand Down Expand Up @@ -1861,7 +1864,10 @@ export class DeviceWrapper {
public async pushMediaToDevice(
mediaFileName: 'profile_picture.jpg' | 'test_file.pdf' | 'test_image.jpg' | 'test_video.mp4'
) {
const filePath = path.join('run', 'test', 'specs', 'media', mediaFileName);
const filePath = path.join('run', 'test', 'media', mediaFileName);
await fs.access(filePath).catch(() => {
throw new Error(`Media file not found: ${filePath}`);
});
if (this.isIOS()) {
// Push file to simulator
await runScriptAndLog(`xcrun simctl addmedia ${this.udid} ${filePath}`, true);
Expand Down
2 changes: 1 addition & 1 deletion scripts/create_ios_simulators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const DEVICE_CONFIG = {
runtime: 'com.apple.CoreSimulator.SimRuntime.iOS-26-2', // xcrun simctl list runtimes
};

const MEDIA_ROOT = path.join('run', 'test', 'specs', 'media');
const MEDIA_ROOT = path.join('run', 'test', 'media');
const MEDIA_FILES = {
images: ['profile_picture.jpg', 'test_image.jpg'],
videos: ['test_video.mp4'],
Expand Down