From 604f9d4dc676bea71d37315f0e7ddde12fb37eea Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 16 Oct 2024 18:09:01 -0700 Subject: [PATCH] harden test condition --- tests/playwright-test/reporter-errors.spec.ts | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/playwright-test/reporter-errors.spec.ts b/tests/playwright-test/reporter-errors.spec.ts index bebdbed895..98bc3600fc 100644 --- a/tests/playwright-test/reporter-errors.spec.ts +++ b/tests/playwright-test/reporter-errors.spec.ts @@ -116,28 +116,28 @@ test('should report matcherResults for web matchers', async ({ runInlineTest }) const { errors } = result.report.suites[0].specs[0].tests[0].results[0]; expect(errors).toEqual([ - { expected: 'checked', actual: 'unchecked' }, - { expected: 'disabled', actual: 'enabled' }, - { expected: 'editable', actual: 'editable' }, - { expected: 'empty', actual: 'notEmpty' }, - { expected: 'enabled', actual: 'enabled' }, - { expected: 'focused', actual: 'inactive' }, - { expected: 'hidden', actual: 'visible' }, - { expected: 'in viewport', actual: 'in viewport' }, - { expected: 'visible', actual: 'visible' }, - { expected: 'World', actual: 'Hello' }, - { expected: 'World', actual: '' }, - { expected: 'World', actual: '' }, - { expected: 'value', actual: null }, - { expected: 'have attribute', actual: 'not have attribute' }, - { expected: 'name', actual: '' }, - { expected: 2, actual: 1 }, - { expected: '10', actual: 'auto' }, - { expected: 'id', actual: '' }, - { expected: 'value' }, - { expected: 'role', actual: '' }, - { expected: 'World', actual: 'Hello' }, - { expected: 'value', actual: '' }, - { expected: ['value'], actual: [] }, + { log: expect.any(Array), expected: 'checked', actual: 'unchecked' }, + { log: expect.any(Array), expected: 'disabled', actual: 'enabled' }, + { log: expect.any(Array), expected: 'editable', actual: 'editable' }, + { log: expect.any(Array), expected: 'empty', actual: 'notEmpty' }, + { log: expect.any(Array), expected: 'enabled', actual: 'enabled' }, + { log: expect.any(Array), expected: 'focused', actual: 'inactive' }, + { log: expect.any(Array), expected: 'hidden', actual: 'visible' }, + { log: expect.any(Array), expected: 'in viewport', actual: 'in viewport' }, + { log: expect.any(Array), expected: 'visible', actual: 'visible' }, + { log: expect.any(Array), expected: 'World', actual: 'Hello' }, + { log: expect.any(Array), expected: 'World', actual: '' }, + { log: expect.any(Array), expected: 'World', actual: '' }, + { log: expect.any(Array), expected: 'value', actual: null }, + { log: expect.any(Array), expected: 'have attribute', actual: 'not have attribute' }, + { log: expect.any(Array), expected: 'name', actual: '' }, + { log: expect.any(Array), expected: 2, actual: 1 }, + { log: expect.any(Array), expected: '10', actual: 'auto' }, + { log: expect.any(Array), expected: 'id', actual: '' }, + { log: expect.any(Array), expected: 'value' }, + { log: expect.any(Array), expected: 'role', actual: '' }, + { log: expect.any(Array), expected: 'World', actual: 'Hello' }, + { log: expect.any(Array), expected: 'value', actual: '' }, + { log: expect.any(Array), expected: ['value'], actual: [] }, ].map(e => expect.objectContaining(e))); });