diff --git a/.github/scripts/fixtures/failed-flow/android/report.xml b/.github/scripts/fixtures/failed-flow/android/report.xml deleted file mode 100644 index 2a45978e43..0000000000 --- a/.github/scripts/fixtures/failed-flow/android/report.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - The expected button was not visible. - - diff --git a/.github/scripts/fixtures/infrastructure-failure/ios/phase.txt b/.github/scripts/fixtures/infrastructure-failure/ios/phase.txt deleted file mode 100644 index 253983fa9e..0000000000 --- a/.github/scripts/fixtures/infrastructure-failure/ios/phase.txt +++ /dev/null @@ -1 +0,0 @@ -Building and installing the development client diff --git a/.github/scripts/fixtures/success/android/report.xml b/.github/scripts/fixtures/success/android/report.xml deleted file mode 100644 index 86664c89b8..0000000000 --- a/.github/scripts/fixtures/success/android/report.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/.github/scripts/fixtures/success/ios/report.xml b/.github/scripts/fixtures/success/ios/report.xml deleted file mode 100644 index 890d6b7a94..0000000000 --- a/.github/scripts/fixtures/success/ios/report.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/.github/scripts/summarize-maestro.test.mjs b/.github/scripts/summarize-maestro.test.mjs deleted file mode 100644 index 9c724a8f7d..0000000000 --- a/.github/scripts/summarize-maestro.test.mjs +++ /dev/null @@ -1,75 +0,0 @@ -import assert from 'node:assert/strict' -import path from 'node:path' -import test from 'node:test' -import {fileURLToPath} from 'node:url' - -import {buildSummary, parseJUnit} from './summarize-maestro.mjs' - -const here = path.dirname(fileURLToPath(import.meta.url)) -const fixtures = path.join(here, 'fixtures') -const common = { - artifactUrls: { - ios: 'https://github.test/run/artifacts/1', - android: 'https://github.test/run/artifacts/2', - }, - sha: '0123456789abcdef', - runUrl: 'https://github.test/run', - commitUrl: 'https://github.test/commit/0123456789abcdef', -} - -test('does not notify for successful jobs and successful JUnit', () => { - const root = path.join(fixtures, 'success') - const summary = buildSummary({ - ...common, - iosStatus: 'success', - androidStatus: 'success', - iosRoot: path.join(root, 'ios'), - androidRoot: path.join(root, 'android'), - }) - - assert.equal(summary.notify, false) - assert.deepEqual( - summary.platforms.map(platform => platform.failures), - [[], []], - ) -}) - -test('reports failed flow names and concise failure messages', () => { - const root = path.join(fixtures, 'failed-flow') - const summary = buildSummary({ - ...common, - iosStatus: 'success', - androidStatus: 'failure', - iosRoot: path.join(fixtures, 'success', 'ios'), - androidRoot: path.join(root, 'android'), - }) - - assert.equal(summary.notify, true) - assert.match(summary.payload.text, /create-account\.yml/) - assert.match(summary.payload.text, /Element not found: Create account/) - assert.match(summary.payload.text, /Android logs and artifacts/) -}) - -test('reports the latest setup phase when infrastructure fails before JUnit', () => { - const root = path.join(fixtures, 'infrastructure-failure') - const summary = buildSummary({ - ...common, - iosStatus: 'failure', - androidStatus: 'success', - iosRoot: path.join(root, 'ios'), - androidRoot: path.join(fixtures, 'success', 'android'), - }) - - assert.equal(summary.notify, true) - assert.match( - summary.payload.text, - /Setup phase: Building and installing the development client/, - ) -}) - -test('parses self-closing JUnit failures', () => { - const failures = parseJUnit( - '', - ) - assert.deepEqual(failures, [{name: 'flow.yml', message: 'boom'}]) -})