@@ -80,12 +80,12 @@ const standardSurvey: UserSurveyVm = {
8080 } ,
8181 type : QuestionType . TEXT ,
8282 order : 1 ,
83- text : 'This is the question text' ,
83+ questionText : 'This is the question text' ,
8484 } ,
8585 {
8686 questionId : { value : 'choiceQuestion' } ,
8787 type : QuestionType . CHOICE ,
88- text : 'Choose one please' ,
88+ questionText : 'Choose one please' ,
8989 order : 2 ,
9090 options : [
9191 {
@@ -110,11 +110,11 @@ const standardSurvey: UserSurveyVm = {
110110 questionId : { value : 'linearScaleQuestion' } ,
111111 type : QuestionType . LINEAR_SCALE ,
112112 order : 3 ,
113- text : 'Is this useful?' ,
114- linearScaleConfig : {
115- min : 1 ,
113+ questionText : 'Is this useful?' ,
114+ linearScaleVm : {
115+ minValue : 1 ,
116116 minLabel : 'Strongly disagree' ,
117- max : 7 ,
117+ maxValue : 7 ,
118118 maxLabel : 'Strongly agree' ,
119119 } ,
120120 } ,
@@ -157,7 +157,7 @@ export const TestStandard: Story = {
157157 ) . toBeInTheDocument ( ) ;
158158
159159 await expect (
160- await canvas . findByText ( standardSurvey . questions [ 0 ] . text )
160+ await canvas . findByText ( standardSurvey . questions [ 0 ] . questionText )
161161 ) . toBeInTheDocument ( ) ;
162162
163163 await expect (
@@ -200,9 +200,13 @@ export const TestStandard: Story = {
200200 'Go back, verify that the text is still there, and click next' ,
201201 async ( ) => {
202202 await expect (
203- await canvas . findByText ( standardSurvey . questions [ 1 ] . text , undefined , {
204- timeout : 1500 ,
205- } )
203+ await canvas . findByText (
204+ standardSurvey . questions [ 1 ] . questionText ,
205+ undefined ,
206+ {
207+ timeout : 1500 ,
208+ }
209+ )
206210 ) . toBeInTheDocument ( ) ;
207211
208212 await userEvent . click ( canvas . getByRole ( 'button' , { name : / b a c k / i } ) ) ;
@@ -218,9 +222,13 @@ export const TestStandard: Story = {
218222
219223 await step ( 'Checkbox question and click next' , async ( ) => {
220224 await expect (
221- await canvas . findByText ( standardSurvey . questions [ 1 ] . text , undefined , {
222- timeout : 1500 ,
223- } )
225+ await canvas . findByText (
226+ standardSurvey . questions [ 1 ] . questionText ,
227+ undefined ,
228+ {
229+ timeout : 1500 ,
230+ }
231+ )
224232 ) . toBeInTheDocument ( ) ;
225233
226234 for ( const option of standardSurvey . questions [ 1 ] . options ?? [ ] ) {
@@ -259,17 +267,13 @@ export const TestStandard: Story = {
259267
260268 await step ( 'Linear scale question and complete' , async ( ) => {
261269 await expect (
262- await canvas . findByText ( standardSurvey . questions [ 2 ] . text )
270+ await canvas . findByText ( standardSurvey . questions [ 2 ] . questionText )
263271 ) . toBeInTheDocument ( ) ;
264272 await expect (
265- canvas . getByText (
266- standardSurvey . questions [ 2 ] ! . linearScaleConfig ! . minLabel
267- )
273+ canvas . getByText ( standardSurvey . questions [ 2 ] ! . linearScaleVm ! . minLabel )
268274 ) . toBeInTheDocument ( ) ;
269275 await expect (
270- canvas . getByText (
271- standardSurvey . questions [ 2 ] ! . linearScaleConfig ! . maxLabel
272- )
276+ canvas . getByText ( standardSurvey . questions [ 2 ] ! . linearScaleVm ! . maxLabel )
273277 ) . toBeInTheDocument ( ) ;
274278
275279 await userEvent . click ( canvas . getAllByRole ( 'radio' ) [ 0 ] ) ;
@@ -299,29 +303,29 @@ const umuxSurvey: UserSurveyVm = {
299303 questions : [
300304 {
301305 type : QuestionType . LINEAR_SCALE ,
302- text : 'Acquire is easy to use.' ,
306+ questionText : 'Acquire is easy to use.' ,
303307 questionId : {
304308 value : 'someId' ,
305309 } ,
306310 order : 1 ,
307- linearScaleConfig : {
308- min : 1 ,
311+ linearScaleVm : {
312+ minValue : 1 ,
309313 minLabel : 'Strongly disagree' ,
310- max : 7 ,
314+ maxValue : 7 ,
311315 maxLabel : 'Strongly agree' ,
312316 } ,
313317 } ,
314318 {
315319 type : QuestionType . LINEAR_SCALE ,
316- text : 'Acquire meets my needs.' ,
320+ questionText : 'Acquire meets my needs.' ,
317321 questionId : {
318322 value : 'someOtherId' ,
319323 } ,
320324 order : 2 ,
321- linearScaleConfig : {
322- min : 1 ,
325+ linearScaleVm : {
326+ minValue : 1 ,
323327 minLabel : 'Strongly disagree' ,
324- max : 7 ,
328+ maxValue : 7 ,
325329 maxLabel : 'Strongly agree' ,
326330 } ,
327331 } ,
0 commit comments