Skip to content

Commit 808875a

Browse files
committed
playwright tissue request test
1 parent 04e6d53 commit 808875a

File tree

1,038 files changed

+5858
-1581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,038 files changed

+5858
-1581
lines changed

.circleci/config.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ executors:
6161
resource_class: medium+
6262
docker:
6363
# Playwright docker image version MUST match Playwright version in project
64-
- image: mcr.microsoft.com/playwright:v1.31.0-focal
64+
- image: mcr.microsoft.com/playwright:v1.38.0-jammy
6565
working_directory: *playwright_path
6666
environment:
67+
TZ: "America/New_York"
6768
NODE_ENV: development # Needed if playwright is in devDependencies
6869

6970
commands:
@@ -700,7 +701,7 @@ jobs:
700701
command: npx playwright install --with-deps chromium # Only need Chrome browser
701702

702703
- run:
703-
name: Running Playwright tests
704+
name: Running Playwright tests on << parameters.env >>
704705
working_directory: *playwright_path
705706
command: |
706707
npx playwright test --list | grep -o 'tests/.*.spec.ts' | sort | uniq > e2e_tests.txt
@@ -843,15 +844,6 @@ workflows:
843844
jobs:
844845
- deploy-stored-build-job:
845846
study_key: << pipeline.parameters.study_key >>
846-
- playwright-build:
847-
env: << pipeline.parameters.deploy_env >>
848-
- playwright-test:
849-
env: << pipeline.parameters.deploy_env >>
850-
parallelism_num: 2
851-
test_suite: UNKNOWN
852-
requires:
853-
- playwright-build
854-
- deploy-stored-build-job
855847

856848
api-run-tests-workflow:
857849
# Run ui tests for study specified in api call by run_ci.sh and tests for sdk and toolkit

build-utils/findmodifiedprojects.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# If a file from a common area, like the root diretory was modified, we call that _SHARED_
55
set +x
66
#ignore these file name patterns when figuring out what modules changed
7-
declare -a exclude_patterns=( '^.*\.md' '^.*.pdf', '^.*\.spec\.ts' )
7+
declare -a exclude_patterns=( '^.*\.md' '^.*.pdf', '^.*\.spec\.ts', 'playwright' )
88

99
EXCLUDE_CMD='grep -v -E'
1010

ddp-workspace/projects/ddp-atcp/src/app/components/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class AppComponent implements OnInit, OnDestroy {
111111
});
112112
});
113113
const modalClose = this.communicationService.closePopupMessage$.subscribe(() => {
114-
this.dialog.getDialogById('ServerMessage').close();
114+
this.dialog.getDialogById('ServerMessage')?.close();
115115
});
116116
this.anchor.addNew(modalOpen).addNew(modalClose);
117117
}

ddp-workspace/projects/ddp-atcp/src/app/components/participant-list/participant-list.component.ts

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
import { Component, OnInit, Inject, OnDestroy } from '@angular/core';
22
import { Router } from '@angular/router';
3-
import { forkJoin, Observable, of } from 'rxjs';
4-
import { map, take, switchMap, tap, skipWhile, mergeMap, filter } from 'rxjs/operators';
3+
import {forkJoin, mergeMap, Observable, of} from 'rxjs';
4+
import { map, take, switchMap, tap } from 'rxjs/operators';
55

66
import {
7-
SessionMementoService,
8-
ConfigurationService,
9-
GovernedParticipantsServiceAgent,
10-
UserProfile,
11-
ActivityInstance,
12-
UserActivityServiceAgent,
13-
UserManagementServiceAgent,
14-
WorkflowServiceAgent,
15-
LanguageService,
16-
CompositeDisposable,
17-
UserStatusServiceAgent,
18-
ParticipantProfileServiceAgent
7+
SessionMementoService,
8+
ConfigurationService,
9+
GovernedParticipantsServiceAgent,
10+
UserProfile,
11+
ActivityInstance,
12+
UserActivityServiceAgent,
13+
UserManagementServiceAgent,
14+
WorkflowServiceAgent,
15+
LanguageService,
16+
CompositeDisposable,
17+
UserStatusServiceAgent,
18+
UserProfileServiceAgent, UserProfileDecorator
1919
} from 'ddp-sdk';
2020

2121
import { ActivityService } from '../../services/activity.service';
2222
import { RegistrationStatusService } from '../../services/registrationStatus.service';
2323
import * as RouterResources from '../../router-resources';
2424
import { ActivityCodes } from '../../sdk/constants/activityCodes';
2525
import { WorkflowModel } from '../../models/workflow.model';
26+
import {AddParticipantPayload} from '../../../../../ddp-sdk/src/lib/models/addParticipantPayload';
2627

2728
export interface Participant {
2829
guid: string;
@@ -55,7 +56,7 @@ export class ParticipantListComponent implements OnInit, OnDestroy {
5556
private readonly userStatusService: UserStatusServiceAgent,
5657
private readonly registrationStatusService: RegistrationStatusService,
5758
@Inject('ddp.config') private readonly config: ConfigurationService,
58-
private participantProfileService: ParticipantProfileServiceAgent
59+
private readonly userProfileServiceAgent: UserProfileServiceAgent,
5960
) {}
6061

6162
ngOnInit(): void {
@@ -79,24 +80,32 @@ export class ParticipantListComponent implements OnInit, OnDestroy {
7980

8081
onAddParticipantClick(): void {
8182
this.disableAddParticipantsButton = true;
83+
const payload: AddParticipantPayload = {
84+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
85+
};
86+
87+
const addParticipantObs = this.userProfileServiceAgent.profile
88+
.pipe(
89+
mergeMap(({profile: {preferredLanguage}}: UserProfileDecorator) =>
90+
this.governedParticipantsAgent
91+
.addParticipant(this.config.studyGuid, {...payload, languageCode: preferredLanguage})
92+
),
93+
take(1),
94+
tap(participantGuid => this.session.setParticipant(participantGuid)),
95+
switchMap(() => this.workflowAgent.fromParticipantList())
96+
)
97+
.subscribe({
98+
next: () => {
99+
this.disableAddParticipantsButton = false;
100+
this.activityService.setCurrentActivity(null);
101+
this.router.navigateByUrl(RouterResources.Survey);
102+
},
103+
error: () => {
104+
this.disableAddParticipantsButton = false;
105+
}
106+
});
82107

83-
this.governedParticipantsAgent
84-
.addParticipant(this.config.studyGuid)
85-
.pipe(
86-
take(1),
87-
tap(participantGuid => this.session.setParticipant(participantGuid)),
88-
switchMap(() => this.workflowAgent.fromParticipantList()),
89-
)
90-
.subscribe({
91-
next: () => {
92-
this.disableAddParticipantsButton = false;
93-
this.activityService.setCurrentActivity(null);
94-
this.router.navigateByUrl(RouterResources.Survey);
95-
},
96-
error: () => {
97-
this.disableAddParticipantsButton = false;
98-
}
99-
});
108+
this.anchor.addNew(addParticipantObs);
100109
}
101110

102111
private getParticipants(): void {

ddp-workspace/projects/ddp-atcp/src/app/components/welcome/welcome.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ export class WelcomeComponent implements OnInit, OnDestroy {
3838
}
3939

4040
public ngOnInit(): void {
41-
const translate$ = this.ngxTranslate.getTranslation(['HomePage.Participate.Steps.Second.Ul'])
42-
.subscribe((list: string[]) => {
43-
this.list = list['HomePage.Participate.Steps.Second.Ul'];
44-
});
45-
this.anchor.addNew(translate$);
41+
if(this.ngxTranslate) {
42+
const translate$ = this.ngxTranslate.getTranslation(['HomePage.Participate.Steps.Second.Ul'])
43+
.subscribe((list: object) => {
44+
this.list = list['HomePage.Participate.Steps.Second.Ul'];
45+
});
46+
this.anchor.addNew(translate$);
47+
}
4648
}
4749

4850
public ngOnDestroy(): void {

ddp-workspace/projects/ddp-brugada/src/app/components/progress-bar/progress-bar.component.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import '../../../styles/breakpoints';
33

44
.wrapper {
5-
height: 92px;
5+
min-height: 92px;
66
display: flex;
77
margin: 5rem 0;
88
position: relative;
@@ -30,7 +30,7 @@
3030
&_active {
3131
color: map-get($colors, 'progress_bar-active');
3232

33-
& .circular {
33+
& .circular {
3434
background: map-get($colors, 'progress_bar-active');
3535
border: 3px solid map-get($colors, 'progress_bar-active-border');
3636
& .number {
@@ -43,7 +43,7 @@
4343
}
4444

4545
&_white {
46-
& .circular {
46+
& .circular {
4747
background: map-get($colors, 'white');
4848
border: 3px solid map-get($colors, 'progress_bar-active-border');
4949
& .number {

ddp-workspace/projects/ddp-dsm-ui/src/app/filter-column/filter-column.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<mat-checkbox color="primary" disableRipple
2323
[checked]="dataFilter.value1" [(ngModel)]="dataFilter.value1" (change)="changeValue($event, dataFilter)"> Yes
2424
</mat-checkbox>
25-
<mat-checkbox color="primary" disableRipple
25+
<mat-checkbox *ngIf="showSearchParameter(dataFilter)" color="primary" disableRipple
2626
[checked]="dataFilter.value2" [(ngModel)]="dataFilter.value2" (change)="changeValue2($event, dataFilter)"> No
2727
</mat-checkbox>
2828
</ng-container>

ddp-workspace/projects/ddp-dsm-ui/src/app/filter-column/filter-column.component.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export class FilterColumnComponent implements OnInit {
1414
showOptions = false;
1515
selected: number;
1616

17+
// Hide a search parameter for the following RGP columns
18+
rgpHideSearchParamColumns = [
19+
{ displayName: 'Specialty Project: R21', name: 'r21', tableAlias: 'r' }
20+
];
21+
1722
ngOnInit(): void {
1823
if (this.dataFilter.singleOption) {
1924
for (const [ key, value ] of Object.entries(this.dataFilter.selectedOptions)) {
@@ -87,4 +92,16 @@ export class FilterColumnComponent implements OnInit {
8792
this.dataFilter.notEmpty = false;
8893
this.dataFilter.empty = false;
8994
}
95+
96+
/**
97+
* Show or hide (remove) a search parameter.
98+
* @param dataFilter
99+
* @returns Return true if dataFilter column is not found in hardcoded rgpHideSearchParamColumns array.
100+
*/
101+
showSearchParameter(dataFilter: Filter): boolean {
102+
const found = this.rgpHideSearchParamColumns.findIndex(column => dataFilter?.participantColumn?.display === column.displayName
103+
&& dataFilter?.participantColumn?.name === column.name
104+
&& dataFilter?.participantColumn?.tableAlias === column.tableAlias);
105+
return found === -1;
106+
}
90107
}

ddp-workspace/projects/ddp-dsm-ui/src/app/onc-history-detail/onc-history-detail.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,18 @@ export class OncHistoryDetailComponent implements OnInit {
8686
}
8787
}
8888
if (v != null) {
89+
let ddpParticipantId = this.participant.data.profile['guid'];
90+
if (this.participant.data.profile['legacyAltPid']) {
91+
ddpParticipantId = this.participant.data.profile['legacyAltPid'];
92+
}
8993
const realm: string = sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM);
9094
const patch1 = new PatchUtil(
9195
this.oncHistory[index].oncHistoryDetailId, this.role.userMail(),
9296
{
9397
name: parameterName,
9498
value: v
9599
}, null, 'participantId', this.participant.participant.participantId,
96-
Statics.ONCDETAIL_ALIAS, null, realm, this.participant.data.profile['guid']
100+
Statics.ONCDETAIL_ALIAS, null, realm, ddpParticipantId
97101
);
98102
const patch = patch1.getPatch();
99103
this.patchFinished = false;

ddp-workspace/projects/ddp-dsm-ui/src/app/services/dsm.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,9 +1138,11 @@ export class DSMService {
11381138
);
11391139
}
11401140

1141-
public applyDestructionPolicyToAll(source: string, json: string): Observable<any> {
1141+
public applyDestructionPolicyToAll(realm: string, json: string): Observable<any> {
11421142
const url = this.baseUrl + DSMService.UI + 'institutions';
1143-
return this.http.patch(url, json, this.buildHeader()).pipe(
1143+
const map: { name: string; value: any }[] = [];
1144+
map.push({name: DSMService.REALM, value: realm});
1145+
return this.http.patch(url, json, this.buildQueryHeader(map)).pipe(
11441146
catchError(this.handleError)
11451147
);
11461148
}

ddp-workspace/projects/ddp-dsm-ui/src/app/shipping-search/shipping-search.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h3 class="Color--primary Line--Break">{{additionalMessage}}</h3>
3636
</mat-form-field>
3737
<button mat-raised-button type="button" color="primary"
3838
(click)="searchKit()"
39-
[disabled]="!((searchValue != null && searchValue !== '') && searchField != null)">Search Kit</button>
39+
[disabled]="buttonDisabled">Search Kit</button>
4040
</div>
4141
<br/>
4242

ddp-workspace/projects/ddp-dsm-ui/src/app/shipping-search/shipping-search.component.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ import { DSMService } from '../services/dsm.service';
66
import { KitRequest } from '../shipping/shipping.model';
77
import { RoleService } from '../services/role.service';
88
import { Observable, defer } from 'rxjs';
9+
import { ComponentService } from '../services/component.service';
910

1011
@Component({
1112
selector: 'app-shipping-search',
1213
templateUrl: './shipping-search.component.html',
1314
styleUrls: ['./shipping-search.component.css']
1415
})
1516
export class ShippingSearchComponent implements OnInit {
17+
realm: string;
1618
errorMessage: string;
1719
additionalMessage: string;
1820
searchValue: string | null = null;
@@ -22,26 +24,40 @@ export class ShippingSearchComponent implements OnInit {
2224
kit: KitRequest[] = [];
2325
private currentPatchField: string | null;
2426
PECGS_RESEARCH = 'PECGS_RESEARCH';
27+
disabled = true;
2528

26-
constructor(private dsmService: DSMService, private auth: Auth, private role: RoleService) {
29+
constructor(private dsmService: DSMService, private auth: Auth, private role: RoleService, private compService: ComponentService) {
2730
if (!auth.authenticated()) {
2831
auth.sessionLogout();
2932
}
3033
}
3134

3235
ngOnInit(): void {
36+
if (sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM) != null) {
37+
this.realm = sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM);
38+
} else {
39+
this.errorMessage = 'Please select a study';
40+
}
3341
this.checkRight();
3442
}
3543

3644
private checkRight(): void {
45+
let allowedToSeeInformation = false;
3746
this.allowedRealms = [];
3847
let jsonData: any[];
3948
this.dsmService.getRealmsAllowed(Statics.SHIPPING).subscribe({
4049
next: data => {
4150
jsonData = data;
4251
jsonData.forEach((val) => {
43-
this.allowedRealms.push(val);
52+
if (sessionStorage.getItem(ComponentService.MENU_SELECTED_REALM) === val) {
53+
allowedToSeeInformation = true;
54+
this.allowedRealms.push(val);
55+
this.disabled = false;
56+
}
4457
});
58+
if (!allowedToSeeInformation) {
59+
this.errorMessage = 'You are not allowed to see kit information of the selected study';
60+
}
4561
},
4662
error: () => null
4763
});
@@ -166,4 +182,8 @@ saveCompleted(): void{
166182
}
167183
return false;
168184
}
185+
186+
get buttonDisabled(): boolean {
187+
return this.disabled || this.searchField == null || this.searchValue == null || !this.searchValue.trim().length;
188+
}
169189
}

ddp-workspace/projects/ddp-dsm-ui/src/app/usersAndPermissions/components/user/administrationUser.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
class="header-text-inputs-editing-name"
1717
type="text"
1818
[value]="user.name"
19+
(keydown)="onKeyDown($event)"
1920
(click)="$event.stopPropagation()"/>
2021
</p>
2122
<p>Phone:
@@ -26,6 +27,7 @@
2627
class="header-text-inputs-editing-phone"
2728
type="text"
2829
[value]="user.phone"
30+
(keydown)="onKeyDown($event)"
2931
(click)="$event.stopPropagation()"/>
3032
</p>
3133
</form>

ddp-workspace/projects/ddp-dsm-ui/src/app/usersAndPermissions/components/user/administrationUser.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ export class AdministrationUserComponent implements OnInit, OnDestroy {
177177
}
178178

179179
/* Template methods */
180+
public onKeyDown(event: KeyboardEvent): void {
181+
event.stopPropagation();
182+
}
180183

181184
public get doNotAllowCollapse(): boolean {
182185
return this.hasPermissionsChanged || this.disableUserActionButtons;

ddp-workspace/projects/ddp-lms/src/assets/i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@
842842
"countMeInBtn": "Count Me In",
843843
"learMoreBtn": "Learn More",
844844
"paragraph2Headline": "What is the goal of the LMSproject?\n\n",
845-
"paragraph2Text": "The goal of the LMSproject is to transform cancer care by enabling all patients who have ever been diagnosed with leiomyosarcoma to accelerate biomedical research through sharing their cancer samples, clinical information, and their experiences. In order to achieve these goals, datasets containing linked clinical, genomic, molecular, and patient-reported data (without including any personal information) will be regularly shared with the biomedical research community through scientific repositories such as cBioPortal for Cancer Genomics and the National Cancer Institute (NCI) Genomic Data Commons.<br><br>Count Me In's Leiomyosarcoma (LMS) Project is supported by a grant from the National Cancer Institute's Cancer Moonshot program and is part of the <a href='https://pecgs.org/pecgs/home' target='_blank'>Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network</a> of research centers.",
845+
"paragraph2Text": "The goal of the LMSproject is to transform cancer care by enabling all patients who have ever been diagnosed with leiomyosarcoma to accelerate biomedical research through sharing their cancer samples, clinical information, and their experiences. In order to achieve these goals, datasets containing linked clinical, genomic, molecular, and patient-reported data (without including any personal information) will be regularly shared with the biomedical research community through scientific repositories such as cBioPortal for Cancer Genomics and the National Cancer Institute (NCI) Genomic Data Commons.<br><br>Count Me In's Leiomyosarcoma (LMS) Project is supported by a grant from the National Cancer Institute's Cancer Moonshot program and is part of the <a href='https://pe-cgs.org/' target='_blank'>Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network</a> of research centers.",
846846
"paragraph2Button": "Learn More About Us",
847847
"paragraph3Title": "Here’s how to participate:",
848848
"steps": [

ddp-workspace/projects/ddp-osteo/src/assets/i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@
656656
{
657657
"Question": "Who is conducting this research?",
658658
"Paragraphs": [
659-
"This project is being conducted by the Broad Institute of MIT and Harvard, Dana-Farber Cancer Institute, and Count Me In, a non-profit research initiative that conducts patient-partnered studies of cancer. Count Me In's Osteosarcoma (OS) Project and Leiomyosarcoma (LMS) Project are supported by a grant from the National Cancer Institute's Cancer Moonshot program and are part of the <a class=\"Link\" href=\"https://www.cancer.gov/research/key-initiatives/moonshot-cancer-initiative/implementation/patient-engagement\" target=\"_blank\"> Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network of research centers.</a>"
659+
"This project is being conducted by the Broad Institute of MIT and Harvard, Dana-Farber Cancer Institute, and Count Me In, a non-profit research initiative that conducts patient-partnered studies of cancer. Count Me In's Osteosarcoma (OS) Project and Leiomyosarcoma (LMS) Project are supported by a grant from the National Cancer Institute's Cancer Moonshot program and are part of the <a class=\"Link\" href=\"https://pe-cgs.org\" target=\"_blank\"> Participant Engagement and Cancer Genome Sequencing (PE-CGS) Network of research centers.</a>"
660660
]
661661
},
662662
{

0 commit comments

Comments
 (0)