@@ -70,6 +70,41 @@ test("shows a pending question dock", async ({ page }) => {
7070 expect ( ( await reply ) . postDataJSON ( ) ) . toEqual ( { answers : [ [ "Minimal" ] ] } )
7171} )
7272
73+ test ( "shows every question in the question pager" , async ( { page } ) => {
74+ await mockServer ( page , {
75+ questions : [
76+ {
77+ id : "question-request" ,
78+ sessionID,
79+ questions : Array . from ( { length : 4 } , ( _ , index ) => ( {
80+ header : `Question ${ index + 1 } ` ,
81+ question : `Question ${ index + 1 } ?` ,
82+ options : [ { label : "Yes" , description : "Continue" } ] ,
83+ } ) ) ,
84+ } ,
85+ ] ,
86+ } )
87+
88+ await page . goto ( `/${ base64Encode ( directory ) } /session/${ sessionID } ` )
89+ await expectSessionTitle ( page , title )
90+
91+ const question = page . locator ( '[data-component="dock-prompt"][data-kind="question"]' )
92+ const segments = question . locator ( '[data-slot="question-progress-segment"]' )
93+ await expect ( segments ) . toHaveCount ( 4 )
94+ await expect
95+ . poll ( ( ) =>
96+ segments . nth ( 1 ) . evaluate ( ( element ) => ( {
97+ segment : getComputedStyle ( element , "::after" ) . backgroundColor ,
98+ expected : getComputedStyle ( element ) . getPropertyValue ( "--v2-background-bg-layer-04" ) . trim ( ) ,
99+ } ) ) ,
100+ )
101+ . toEqual ( { segment : "rgb(219, 219, 219)" , expected : "#dbdbdbff" } )
102+
103+ await question . getByRole ( "button" , { name : "Questions 3" } ) . click ( )
104+ await expect ( question . getByText ( "3 of 4 questions" ) ) . toBeVisible ( )
105+ await expect ( question . getByText ( "Question 3?" , { exact : true } ) ) . toBeVisible ( )
106+ } )
107+
73108test ( "shows a pending permission dock" , async ( { page } ) => {
74109 await mockServer ( page , {
75110 permissions : [
0 commit comments