Skip to content

WIP: PEPPER-902 sending sample received event to DSS #2129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
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
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export enum LocalControlEnum {
BLANK = '',
YES = 'Yes',
NO = 'No',
UNKNOWN = 'Unknown'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export enum MethodOfDecalcificationEnum {
NITRIC_ACID = "Nitric Acid (includes Perenyi's fluid)",
HYDROCHLORIC_ACID = "Hydrochloric Acid (includes Von Ebner's solution)",
FORMIC_ACID = 'Formic Acid (includes Evans/Kajan, Kristensen/Gooding/Stewart)',
ACID_NOS = 'Acid NOS',
EDTA = 'EDTA',
SAMPLE_NOT_DECALCIFIED = 'Sample not decalcified',
OTHER = 'Other',
UNKNOWN = 'Unknown',
IMMUNOCAL_OR_SOFT_DECAL = 'Immunocal/ Soft Decal'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export enum RequestStatusEnum {
NEEDS_REVIEW = 'Needs Review',
DONT_REQUEST = "Don't Request",
ON_HOLD = 'On Hold',
REQUEST = 'Request',
SENT = 'Sent',
RECEIVED = 'Received',
RETURNED = 'Returned',
UNABLE_TO_OBTAIN = 'Unable To Obtain'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export enum SampleFFPEEnum {
BLANK = '',
YES = 'Yes',
NO = 'No',
UNKNOWN = 'Unknown'
}
3 changes: 3 additions & 0 deletions playwright-e2e/dsm/component/tabs/enums/tab-enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ export enum TabEnum {
SURVEY_DATA = 'Survey Data',
CONTACT_INFORMATION = 'Contact Information',
SAMPLE_INFORMATION = 'Sample Information',
MEDICAL_RECORDS = 'Medical Records',
ONC_HISTORY = 'Onc History',
SEQUENCING_ORDER = 'Sequencing Order',
INVITAE = 'Invitae'
}
25 changes: 25 additions & 0 deletions playwright-e2e/dsm/component/tabs/model/oncHistoryModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Locator } from '@playwright/test';
import { LocalControlEnum } from '../enums/oncHistory-enums/localControl-enum';
import { MethodOfDecalcificationEnum } from '../enums/oncHistory-enums/methodOfDecalcification-enum';
import { SampleFFPEEnum } from '../enums/oncHistory-enums/sampleFFPE-enum';
import { RequestStatusEnum } from '../enums/oncHistory-enums/request-enum';

export default class OncHistory {
constructor(
public request: Locator,
public dateOfPX: string = '',
public typeOfPX: string = '',
public locationOfPX: string = '',
public histology: string = '',
public accessionNumber: string = '',
public facility: string = '',
public phone: string = '',
public fax: string = '',
public destructionYears: string = '',
public sampleIsFromLocalControl: LocalControlEnum,
public methodOfDecalcification: MethodOfDecalcificationEnum,
public sampleIsFFPE: SampleFFPEEnum,
public tissueNotes: Locator,
public requestStatus: RequestStatusEnum
) {}
}
11 changes: 11 additions & 0 deletions playwright-e2e/dsm/component/tabs/oncHistoryTab.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {expect, Locator, Page} from '@playwright/test';

export default class OncHistoryTab {
constructor(private readonly page: Page) {}

/**
* This tab collects information such as the participant's diagnosis, where and when diagnosis was acquired,
* and whether further information from the listed facility has been requested for, received, etc.
* Note: The day that information is first inputted into this tab for a participant is automatically used as the Onc History Created Date
*/
}
4 changes: 3 additions & 1 deletion playwright-e2e/dsm/component/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import {Locator, Page} from '@playwright/test';
import {TabEnum} from 'dsm/component/tabs/enums/tab-enum';
import ContactInformationTab from 'dsm/component/tabs/contactInformationTab';
import SampleInformationTab from 'dsm/component/tabs/sampleInformationTab';
import OncHistoryTab from './oncHistoryTab';

export default class Tabs {
private readonly tabs = new Map<string, object>([
[TabEnum.CONTACT_INFORMATION, new ContactInformationTab(this.page)],
[TabEnum.SAMPLE_INFORMATION, new SampleInformationTab(this.page)]
[TabEnum.SAMPLE_INFORMATION, new SampleInformationTab(this.page)],
[TabEnum.ONC_HISTORY, new OncHistoryTab(this.page)]
])

constructor(private readonly page: Page) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { Page, test, Locator } from '@playwright/test';
import { StudyEnum } from 'dsm/component/navigation/enums/selectStudyNav-enum';
import { Navigation } from 'dsm/component/navigation/navigation';
import HomePage from 'dsm/pages/home-page';
import { WelcomePage } from 'dsm/pages/welcome-page';
import {login} from 'authentication/auth-dsm';
import ParticipantListPage from 'dsm/pages/participant-list-page';
import { StudyNavEnum } from 'dsm/component/navigation/enums/studyNav-enum';
import { KitTypeEnum } from 'dsm/component/kitType/enums/kitType-enum';

test.describe('PE-CGS Sample Received Event', () => {
const studies = [StudyEnum.LMS, StudyEnum.OSTEO2];

let welcomePage: WelcomePage;
let homePage: HomePage;
let navigation: Navigation;

test.beforeEach(async ({ page, request }) => {
await login(page);
welcomePage = new WelcomePage(page);
homePage = new HomePage(page);
navigation = new Navigation(page, request);
});

//For each clinical study, check that the sample received event is working as expected
for (const study of studies) {
test(`Scenario 1: Saliva kit is received first; Tumor sample is received second`, async ({ page }) => {
await welcomePage.selectStudy(study);
await homePage.assertWelcomeTitle();
await homePage.assertSelectedStudyTitle(study);

const participantListPage = await navigation.selectFromStudy<ParticipantListPage>(StudyNavEnum.PARTICIPANT_LIST);
await participantListPage.assertPageTitle();

/**
* Find a participant that fits the following criteria:
* 1. Is enrolled
* 2. Has at least 1 saliva kit uploaded
* 3. One of the saliva kits has the status 'Waiting for GP' (for ease of testing)
* 4. Has at least 1 known physician (in order to ensure Onc History tab is/was created)
* 5. Does not already have a germline consent addendum activity created
*/
const participant = findValidParticipant(page, participantListPage, KitTypeEnum.SALIVA);
})
}
});


async function findValidParticipant(page: Page, participantListPage: ParticipantListPage, kitType: KitTypeEnum): Promise<Locator> {
//Add the necessary columns needed to check to see if a valid participant exists

//Do the relevant filtering to find which of the available participants fit the criteria for this test file

//Pick the first relevant participant that shows up

//Handle what should happen if no relevant participants can be found - otherwise, return the found participant
}