From b3e0d4564da1c40ee088105c0c0c7ab84c21c7eb Mon Sep 17 00:00:00 2001 From: xsalonx Date: Wed, 10 Apr 2024 12:37:48 +0200 Subject: [PATCH] fix test --- test/public/qcFlagTypes/creation.test.js | 5 ++++- test/public/qcFlagTypes/overview.test.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/public/qcFlagTypes/creation.test.js b/test/public/qcFlagTypes/creation.test.js index 5a92f20499..99df2d1bf9 100644 --- a/test/public/qcFlagTypes/creation.test.js +++ b/test/public/qcFlagTypes/creation.test.js @@ -51,13 +51,15 @@ module.exports = () => { await goToPage(page, 'qc-flag-type-creation'); await validateElement(page, 'button#submit[disabled]'); + await fillInput(page, 'input#id', '1001'); await fillInput(page, 'input#name', 'LimitedAcceptance'); await fillInput(page, 'input#method', 'Limited acceptance'); await pressElement(page, 'button#submit'); await expectInnerText( page, '.alert.alert-danger', - 'The request conflicts with existing data: A QC flag with name LimitedAcceptance or Limited acceptance already exists', + // eslint-disable-next-line max-len + 'The request conflicts with existing data: A QC flag type with id 1001 or name LimitedAcceptance or method Limited acceptance already exists', ); }); @@ -65,6 +67,7 @@ module.exports = () => { await goToPage(page, 'qc-flag-type-creation'); await validateElement(page, 'button#submit[disabled]'); + await fillInput(page, 'input#id', '1001'); await fillInput(page, 'input#name', 'AAA+'); await fillInput(page, 'input#method', 'A+A+A'); await fillInput(page, 'input[type=color]', '#F000F0'); diff --git a/test/public/qcFlagTypes/overview.test.js b/test/public/qcFlagTypes/overview.test.js index 49b4ac04b8..678d2e5643 100644 --- a/test/public/qcFlagTypes/overview.test.js +++ b/test/public/qcFlagTypes/overview.test.js @@ -56,6 +56,7 @@ module.exports = () => { await goToPage(page, 'qc-flag-types-overview'); const tableDataValidators = { + id: (id) => !isNaN(id), name: (name) => name !== '-', method: (method) => method !== '-', bad: (isBad) => isBad === 'Yes' || isBad === 'No',