Skip to content

Commit e94c351

Browse files
committed
Added chat specs test
1 parent a314480 commit e94c351

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

common-data-defs.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,33 @@ const v2 = {
7777
]
7878
}
7979
}
80+
},
81+
'questionnary-with-chat-3': {
82+
features: { chat: { type: 'user' } },
83+
forms: {
84+
history: {
85+
itemKeys: [
86+
'body-weight',
87+
'fertility-cycles-start',
88+
'fertility-cycles-ovulation',
89+
'fertility-cycles-period-end',
90+
'fertility-cycles-fertile-window',
91+
'fertility-hormone-lh',
92+
'fertility-hormone-fsh'
93+
],
94+
key: 'recurring-c',
95+
name: 'History',
96+
type: 'recurring'
97+
},
98+
profile: {
99+
itemKeys: ['profile-date-of-birth'],
100+
key: 'profile-c',
101+
name: 'Profile',
102+
type: 'permanent'
103+
}
104+
},
105+
permissionsPreRequest: [{ streamId: 'profile' }],
106+
title: 'Basic with chat 3'
80107
}
81108
}
82109

dr-lib.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ async function initDemoAccount (appManaging) {
9090
request.requesterName = 'Username ' + drUserName;
9191
request.description = { en: 'Short Description to be updated: ' + questionary.title };
9292
request.consent = { en: 'This is a consent message to be set' };
93+
if (questionary.features?.chat) {
94+
request.addChatFeature();
95+
}
9396

9497
// add static permissions
9598
for (const extraPermission of questionary.permissionsPreRequest) {

0 commit comments

Comments
 (0)