Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
xsalonx committed Apr 10, 2024
1 parent 2f656f7 commit b3e0d45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/public/qcFlagTypes/creation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,23 @@ 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',
);
});

it('should succesfully create QC Flag Type', async () => {
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');
Expand Down
1 change: 1 addition & 0 deletions test/public/qcFlagTypes/overview.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b3e0d45

Please sign in to comment.