File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
typescript-sdk/apps/dojo/e2e/pages Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class PredictiveStateUpdatesPage {
30
30
this . userMessage = page . locator ( '.copilotKitUserMessage' ) ;
31
31
}
32
32
33
- async openChat ( ) {
33
+ async openChat ( ) {
34
34
await this . agentGreeting . isVisible ( ) ;
35
35
}
36
36
@@ -54,13 +54,13 @@ export class PredictiveStateUpdatesPage {
54
54
}
55
55
56
56
async getUserApproval ( ) {
57
- await this . userApprovalModal . isVisible ( ) ;
57
+ await this . userApprovalModal . last ( ) . isVisible ( ) ;
58
58
await this . getButton ( this . page , "Confirm" ) ;
59
- const acceptedLabel = this . userApprovalModal . locator ( 'text=✓ Accepted' ) ;
59
+ const acceptedLabel = this . userApprovalModal . last ( ) . locator ( 'text=✓ Accepted' ) ;
60
60
}
61
61
62
62
async getUserRejection ( ) {
63
- await this . userApprovalModal . isVisible ( ) ;
63
+ await this . userApprovalModal . last ( ) . isVisible ( ) ;
64
64
await this . getButton ( this . page , "Reject" ) ;
65
65
const rejectedLabel = await this . getStatusLabelOfButton ( this . page , "✕ Rejected" ) ;
66
66
await rejectedLabel . isVisible ( ) ;
@@ -85,15 +85,15 @@ export class PredictiveStateUpdatesPage {
85
85
'div.tiptap em' ,
86
86
'div.tiptap s'
87
87
] ;
88
-
88
+
89
89
let count = 0 ;
90
90
for ( const selector of highlightSelectors ) {
91
91
count = await this . page . locator ( selector ) . count ( ) ;
92
92
if ( count > 0 ) {
93
93
break ;
94
94
}
95
95
}
96
-
96
+
97
97
if ( count > 0 ) {
98
98
expect ( count ) . toBeGreaterThan ( 0 ) ;
99
99
} else {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class PredictiveStateUpdatesPage {
30
30
this . userMessage = page . locator ( '.copilotKitUserMessage' ) ;
31
31
}
32
32
33
- async openChat ( ) {
33
+ async openChat ( ) {
34
34
await this . agentGreeting . isVisible ( ) ;
35
35
}
36
36
@@ -54,13 +54,13 @@ export class PredictiveStateUpdatesPage {
54
54
}
55
55
56
56
async getUserApproval ( ) {
57
- await this . userApprovalModal . isVisible ( ) ;
57
+ await this . userApprovalModal . last ( ) . isVisible ( ) ;
58
58
await this . getButton ( this . page , "Confirm" ) ;
59
- const acceptedLabel = this . userApprovalModal . locator ( 'text=✓ Accepted' ) ;
59
+ const acceptedLabel = this . userApprovalModal . last ( ) . locator ( 'text=✓ Accepted' ) ;
60
60
}
61
61
62
62
async getUserRejection ( ) {
63
- await this . userApprovalModal . isVisible ( ) ;
63
+ await this . userApprovalModal . last ( ) . isVisible ( ) ;
64
64
await this . getButton ( this . page , "Reject" ) ;
65
65
const rejectedLabel = await this . getStatusLabelOfButton ( this . page , "✕ Rejected" ) ;
66
66
await rejectedLabel . isVisible ( ) ;
@@ -85,15 +85,15 @@ export class PredictiveStateUpdatesPage {
85
85
'div.tiptap em' ,
86
86
'div.tiptap s'
87
87
] ;
88
-
88
+
89
89
let count = 0 ;
90
90
for ( const selector of highlightSelectors ) {
91
91
count = await this . page . locator ( selector ) . count ( ) ;
92
92
if ( count > 0 ) {
93
93
break ;
94
94
}
95
95
}
96
-
96
+
97
97
if ( count > 0 ) {
98
98
expect ( count ) . toBeGreaterThan ( 0 ) ;
99
99
} else {
You can’t perform that action at this time.
0 commit comments