diff --git a/playwright-e2e/tests/dsm/miscellaneous/participant-withdrawal.spec.ts b/playwright-e2e/tests/dsm/miscellaneous/participant-withdrawal.spec.ts index 463715d535..0c16938933 100644 --- a/playwright-e2e/tests/dsm/miscellaneous/participant-withdrawal.spec.ts +++ b/playwright-e2e/tests/dsm/miscellaneous/participant-withdrawal.spec.ts @@ -12,8 +12,7 @@ import { assertTableHeaders } from 'utils/assertion-helper'; import { logParticipantWithdrew } from 'utils/log-utils'; import * as user from 'data/fake-user.json'; -// Enable after bug fix https://broadworkbench.atlassian.net/browse/PEPPER-1112 -test.describe.skip('Participants Withdrawal', () => { +test.describe('Participants Withdrawal', () => { const studies = [StudyEnum.LMS]; for (const study of studies) { diff --git a/playwright-e2e/tests/dsm/participant-list/rgp-default-filter.spec.ts b/playwright-e2e/tests/dsm/participant-list/rgp-default-filter.spec.ts index 219fe3f12b..592a56c963 100644 --- a/playwright-e2e/tests/dsm/participant-list/rgp-default-filter.spec.ts +++ b/playwright-e2e/tests/dsm/participant-list/rgp-default-filter.spec.ts @@ -2,6 +2,7 @@ import { expect } from '@playwright/test'; import { test } from 'fixtures/dsm-fixture'; import { StudyEnum } from 'dsm/component/navigation/enums/selectStudyNav-enum'; import ParticipantListPage from 'dsm/pages/participant-list-page'; +import { CustomViewColumns } from 'dsm/component/filters/sections/search/search-enums'; test.describe('Participants list', () => { test('RGP default filters @dsm @rgp', async ({ page, request }) => { @@ -70,4 +71,17 @@ test.describe('Participants list', () => { expect(test.info().errors).toHaveLength(0); }); + + test('Open Status filter @dsm @rgp', async ({ page, request }) => { + // Status column must be added. It's not part of default filters. + const participantListPage = await ParticipantListPage.goto(page, StudyEnum.RGP, request); + const customizeViewPanel = participantListPage.filters.customizeViewPanel; + await customizeViewPanel.open(); + await customizeViewPanel.selectColumns(CustomViewColumns.PARTICIPANT, ['Status']); + await customizeViewPanel.close(); + + const searchPanel = participantListPage.filters.searchPanel; + await searchPanel.open(); + expect(await searchPanel.checkboxExists('Status', 'Registered')).toBe(true); + }); }); diff --git a/playwright-e2e/tests/dsm/participant-list/study-specific-default-status-filter.spec.ts b/playwright-e2e/tests/dsm/participant-list/study-specific-default-status-filter.spec.ts new file mode 100644 index 0000000000..ae3b8bdabc --- /dev/null +++ b/playwright-e2e/tests/dsm/participant-list/study-specific-default-status-filter.spec.ts @@ -0,0 +1,28 @@ +import { expect } from '@playwright/test'; +import { test } from 'fixtures/dsm-fixture'; +import { StudyEnum } from 'dsm/component/navigation/enums/selectStudyNav-enum'; +import ParticipantListPage from 'dsm/pages/participant-list-page'; + +test.describe('Display of Participants List Filter', () => { + const cmiClinicalStudies = [StudyEnum.LMS, StudyEnum.OSTEO2]; + const cmiResearchStudies = [StudyEnum.BRAIN, StudyEnum.PANCAN]; + const cmiResearchStudies2 = [StudyEnum.ANGIO, StudyEnum.ESC, StudyEnum.MBC, StudyEnum.PROSTATE]; + + for (const study of cmiClinicalStudies.concat(cmiResearchStudies).concat(cmiResearchStudies2)) { + test(`Status is displayed for every participant @${study} @dsm`, async ({ page, request }) => { + const participantListPage = await ParticipantListPage.goto(page, study, request); + const searchPanel = participantListPage.filters.searchPanel; + await searchPanel.open(); + + expect.soft(await searchPanel.checkboxExists('Status', 'Registered')).toBe(true); + expect.soft(await searchPanel.checkboxExists('Status', 'Exited before Enrollment')).toBe(true); + expect.soft(await searchPanel.checkboxExists('Status', 'Exited after Enrollment')).toBe(true); + expect.soft(await searchPanel.checkboxExists('Status', 'Enrolled')).toBe(true); + if (!cmiResearchStudies2.includes(study)) { + // Some CMI Research studies do not have this status + expect.soft(await searchPanel.checkboxExists('Status', 'Lost to Followup')).toBe(true); + } + expect(test.info().errors).toHaveLength(0); + }); + } +});