File tree 1 file changed +15
-11
lines changed
test/e2e/app-dir/use-cache
1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -101,17 +101,21 @@ describe('use-cache', () => {
101
101
102
102
it ( 'should error when cookies/headers/draftMode is used inside "use cache"' , async ( ) => {
103
103
const browser = await next . browser ( '/errors' )
104
- expect ( await browser . waitForElementByCss ( '#cookies' ) . text ( ) ) . toContain (
105
- isNextDev
106
- ? 'Route /errors used "cookies" inside "use cache".'
107
- : GENERIC_RSC_ERROR
108
- )
109
- expect ( await browser . waitForElementByCss ( '#headers' ) . text ( ) ) . toContain (
110
- isNextDev
111
- ? 'Route /errors used "headers" inside "use cache".'
112
- : GENERIC_RSC_ERROR
113
- )
114
- expect ( await browser . waitForElementByCss ( '#draft-mode' ) . text ( ) ) . toContain (
104
+
105
+ await retry ( async ( ) => {
106
+ expect ( await browser . elementById ( 'cookies' ) . text ( ) ) . toContain (
107
+ isNextDev
108
+ ? 'Route /errors used "cookies" inside "use cache".'
109
+ : GENERIC_RSC_ERROR
110
+ )
111
+ expect ( await browser . elementById ( 'headers' ) . text ( ) ) . toContain (
112
+ isNextDev
113
+ ? 'Route /errors used "headers" inside "use cache".'
114
+ : GENERIC_RSC_ERROR
115
+ )
116
+ } )
117
+
118
+ expect ( await browser . elementById ( 'draft-mode' ) . text ( ) ) . toContain (
115
119
'Editing: false'
116
120
)
117
121
You can’t perform that action at this time.
0 commit comments