@@ -92,14 +92,11 @@ describe('Doc Integration Details', function () {
92
92
await screen . findByRole ( 'heading' , { name : 'Doc Integrations' } )
93
93
) . toBeInTheDocument ( ) ;
94
94
95
- const button = screen . getByTestId ( 'detail-actions' ) ;
96
- expect ( button ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
97
- await userEvent . click ( button ) ;
98
- expect ( button ) . toHaveAttribute ( 'aria-expanded' , 'true' ) ;
95
+ await userEvent . click ( await screen . findByText ( 'Doc Integrations Actions' ) ) ;
99
96
100
- const deleteButton = screen . getByRole ( 'option' , {
101
- name : ' Delete Doc Integration 🚨 Delete this Doc Integration FOREVER (irreversible) 🚨' ,
102
- } ) ;
97
+ const deleteButton = await screen . findByText (
98
+ / D e l e t e t h i s D o c I n t e g r a t i o n F O R E V E R \ (i r r e v e r s i b l e \) /
99
+ ) ;
103
100
104
101
expect ( deleteButton ) . toBeEnabled ( ) ;
105
102
await userEvent . click ( deleteButton ) ;
@@ -150,16 +147,13 @@ describe('Doc Integration Details', function () {
150
147
await screen . findByRole ( 'heading' , { name : 'Doc Integrations' } )
151
148
) . toBeInTheDocument ( ) ;
152
149
153
- const button = screen . getByTestId ( 'detail-actions' ) ;
154
- expect ( button ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
150
+ const button = await screen . findByText ( 'Doc Integrations Actions' ) ;
155
151
await userEvent . click ( button ) ;
156
- expect ( button ) . toHaveAttribute ( 'aria-expanded' , 'true' ) ;
157
152
158
- const deleteButton = screen . getByRole ( 'option' , {
159
- name : ' Delete Doc Integration 🚨 Delete this Doc Integration FOREVER (irreversible) 🚨' ,
160
- } ) ;
153
+ const deleteButton = await screen . findByText (
154
+ / D e l e t e t h i s D o c I n t e g r a t i o n F O R E V E R \ (i r r e v e r s i b l e \) /
155
+ ) ;
161
156
162
- expect ( deleteButton ) . toBeEnabled ( ) ;
163
157
await userEvent . click ( deleteButton ) ;
164
158
165
159
renderGlobalModal ( ) ;
@@ -208,16 +202,12 @@ describe('Doc Integration Details', function () {
208
202
await screen . findByRole ( 'heading' , { name : 'Doc Integrations' } )
209
203
) . toBeInTheDocument ( ) ;
210
204
211
- const button = screen . getByTestId ( 'detail-actions' ) ;
212
- expect ( button ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
213
- await userEvent . click ( button ) ;
214
- expect ( button ) . toHaveAttribute ( 'aria-expanded' , 'true' ) ;
205
+ await userEvent . click ( await screen . findByText ( 'Doc Integrations Actions' ) ) ;
215
206
216
- const unpublishButton = screen . getByRole ( 'option' , {
217
- name : 'Unpublish App Revert This Doc Integration to Draft Mode',
218
- } ) ;
207
+ const unpublishButton = await screen . findByText (
208
+ ' Revert This Doc Integration to Draft Mode'
209
+ ) ;
219
210
220
- expect ( unpublishButton ) . toBeEnabled ( ) ;
221
211
await userEvent . click ( unpublishButton ) ;
222
212
223
213
expect ( indicators . addSuccessMessage ) . toHaveBeenCalledWith (
0 commit comments