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
}

0 commit comments

Comments
 (0)