diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77786ee75bd..1a6553dafcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -364,6 +364,7 @@ jobs: mock-tests: needs: lint + continue-on-error: true strategy: matrix: workerIndex: [0, 1, 2, 3] @@ -450,5 +451,5 @@ jobs: if: failure() uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4 with: - name: logs + name: logs-${{ matrix.workerIndex }} path: artifacts diff --git a/ts/scripts/mocha-separator.ts b/ts/scripts/mocha-separator.ts index ed65258aa86..ee0bfd79116 100644 --- a/ts/scripts/mocha-separator.ts +++ b/ts/scripts/mocha-separator.ts @@ -22,6 +22,8 @@ const filteredFiles = files.filter((_file, index) => { console.log(`Running on ${filteredFiles.length}/${files.length} of files`); -spawnSync(MOCHA, [...flags, ...filteredFiles], { +const { status } = spawnSync(MOCHA, [...flags, ...filteredFiles], { stdio: 'inherit', }); + +process.exit(status); diff --git a/ts/test-mock/messaging/readSync_test.ts b/ts/test-mock/messaging/readSync_test.ts index 9f83ae8d991..b2299b43bc6 100644 --- a/ts/test-mock/messaging/readSync_test.ts +++ b/ts/test-mock/messaging/readSync_test.ts @@ -1,7 +1,6 @@ // Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { assert } from 'chai'; import createDebug from 'debug'; import Long from 'long'; @@ -64,13 +63,12 @@ describe('readSync', function (this: Mocha.Suite) { .waitFor(); debug('checking left pane for 3 unread'); - const unreadCount = await leftPane + await leftPane .locator( - '.module-conversation-list__item--contact-or-conversation__unread-indicator.module-conversation-list__item--contact-or-conversation__unread-indicator--unread-messages' + '.module-conversation-list__item--contact-or-conversation__unread-indicator.module-conversation-list__item--contact-or-conversation__unread-indicator--unread-messages >> "3"' ) .first() - .innerText(); - assert.equal(unreadCount, '3', 'unread count'); + .waitFor({ state: 'visible' }); debug('incoming out of order messages'); const massTimestamps = Array.from(Array(100)).map(() => @@ -134,15 +132,12 @@ describe('readSync', function (this: Mocha.Suite) { await sendUnreadMessage(); debug('checking left pane for 1 unread'); - const newUnreadCount = await leftPane + await leftPane .locator( - '.module-conversation-list__item--contact-or-conversation__unread-indicator.module-conversation-list__item--contact-or-conversation__unread-indicator--unread-messages' + '.module-conversation-list__item--contact-or-conversation__unread-indicator.module-conversation-list__item--contact-or-conversation__unread-indicator--unread-messages >> "1"' ) .first() - .innerText(); - - assert.equal(newUnreadCount, '1', 'updated unread count'); - debug({ newUnreadCount }); + .waitFor({ state: 'visible' }); debug('opening conversation'); await leftPane