Skip to content
Draft
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
29 changes: 18 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,9 @@ jobs:
matrix:
shardIndex: [1, 2, 3]
shardTotal: [3]
repeat: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
concurrency:
group: matrix-client-test-${{ matrix.shardIndex }}-${{ github.head_ref || github.run_id }}
group: matrix-client-test-${{ matrix.shardIndex }}-r${{ matrix.repeat }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -368,58 +369,58 @@ jobs:
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
if: ${{ !cancelled() }}
with:
name: matrix-test-realm-server-log-${{ matrix.shardIndex }}
name: matrix-test-realm-server-log-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: /tmp/server.log
retention-days: 30
- name: Upload worker manager log
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
if: ${{ !cancelled() }}
with:
name: matrix-test-worker-manager-log-${{ matrix.shardIndex }}
name: matrix-test-worker-manager-log-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: /tmp/worker-manager.log
retention-days: 30
- name: Upload prerender server log
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
if: ${{ !cancelled() }}
with:
name: matrix-test-prerender-server-log-${{ matrix.shardIndex }}
name: matrix-test-prerender-server-log-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: /tmp/prerender-server.log
retention-days: 30
- name: Upload prerender manager log
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
if: ${{ !cancelled() }}
with:
name: matrix-test-prerender-manager-log-${{ matrix.shardIndex }}
name: matrix-test-prerender-manager-log-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: /tmp/prerender-manager.log
retention-days: 30
- name: Upload icon server log
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
if: ${{ !cancelled() }}
with:
name: matrix-test-icon-server-log-${{ matrix.shardIndex }}
name: matrix-test-icon-server-log-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: /tmp/icon-server.log
retention-days: 30
- name: Upload host-dist log
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
if: ${{ !cancelled() }}
with:
name: matrix-test-host-dist-log-${{ matrix.shardIndex }}
name: matrix-test-host-dist-log-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: /tmp/host-dist.log
retention-days: 30

- name: Upload blob report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
with:
name: blob-report-${{ matrix.shardIndex }}
name: blob-report-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: packages/matrix/blob-report
retention-days: 1

- name: Upload Playwright traces
if: ${{ !cancelled() }}
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
with:
name: playwright-traces-${{ matrix.shardIndex }}
name: playwright-traces-${{ matrix.shardIndex }}-r${{ matrix.repeat }}
path: packages/matrix/test-results/**/trace.zip
retention-days: 30
if-no-files-found: ignore
Expand Down Expand Up @@ -457,10 +458,16 @@ jobs:
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Flatten blob reports into a single directory
run: |
mkdir -p all-blob-reports-flat
i=0; for f in all-blob-reports/**/*.zip; do
cp "$f" "all-blob-reports-flat/$((i++))-$(basename "$f")"
done

- name: Merge blobs into one single report
run: pnpm exec playwright merge-reports --reporter html ./all-blob-reports
run: pnpm exec playwright merge-reports --reporter html ./all-blob-reports-flat

- name: Upload HTML report
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
Expand Down
18 changes: 15 additions & 3 deletions packages/matrix/tests/room-creation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ test.describe('Room creation', () => {
test('it opens latest room available (or creates new) when current room is deleted', async ({
page,
}) => {
test.setTimeout(120_000);
await login(page, firstUser.username, firstUser.password, { url: appURL });
await page.locator(`[data-test-room-settled]`).waitFor();
let room1 = await getRoomId(page);
Expand All @@ -362,19 +363,30 @@ test.describe('Room creation', () => {
await isInRoom(page, room2); // remains in same room
await deleteRoom(page, room2); // current room is deleted
await page.locator('[data-test-ai-assistant-panel]').click();
// Wait for the deleted room to be removed from the DOM before polling
// for the auto-created replacement room
await expect(page.locator(`[data-test-room="${room2}"]`)).toHaveCount(0, {
timeout: 30_000,
});
let newRoom: string | undefined;
// Poll without using getRoomId — it blocks on waitFor('[data-test-room-settled]')
// which can consume the entire waitUntil budget in a single attempt.
// Use a generous timeout because room creation involves Matrix API calls
// that can be slow under CI load.
await waitUntil(async () => {
try {
let roomId = await getRoomId(page);
if (roomId !== room1 && roomId !== room2 && roomId !== room3) {
let roomEl = page.locator('[data-test-room]');
if ((await roomEl.count()) === 0) return false;
let roomId = await roomEl.getAttribute('data-test-room');
if (roomId && roomId !== room1 && roomId !== room2 && roomId !== room3) {
newRoom = roomId;
return true;
}
return false;
} catch {
return false;
}
}, 30000);
}, 60_000);
if (!newRoom) {
throw new Error('expected to enter a newly-created room after deletion');
}
Expand Down
Loading