Fail mock test runs if tests fail
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
4dcd78d51a
commit
5df80cb93d
3 changed files with 11 additions and 13 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue