Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down Expand Up @@ -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);
});
});
Original file line number Diff line number Diff line change
@@ -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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat!

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);
});
}
});