@@ -64,12 +64,11 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
64
64
await expect ( u . po . page . getByText ( 'Checkout' ) ) . toBeVisible ( ) ;
65
65
} ) ;
66
66
67
- test . skip ( 'can subscribe to a plan' , async ( { page, context } ) => {
67
+ test ( 'can subscribe to a plan' , async ( { page, context } ) => {
68
68
const u = createTestUtils ( { app, page, context } ) ;
69
69
await u . po . signIn . goTo ( ) ;
70
70
await u . po . signIn . signInWithEmailAndInstantPassword ( { email : fakeUser . email , password : fakeUser . password } ) ;
71
- await u . po . page . goToRelative ( '/pricing-table' ) ;
72
-
71
+ await u . po . page . goToRelative ( '/pricing-table?newSubscriptionRedirectUrl=/pricing-table' ) ;
73
72
await u . po . pricingTable . waitForMounted ( ) ;
74
73
await u . po . pricingTable . startCheckout ( { planSlug : 'plus' } ) ;
75
74
await u . po . checkout . waitForMounted ( ) ;
@@ -87,7 +86,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
87
86
}
88
87
} ) ;
89
88
90
- test . skip ( 'can upgrade to a new plan with saved card' , async ( { page, context } ) => {
89
+ test ( 'can upgrade to a new plan with saved card' , async ( { page, context } ) => {
91
90
const u = createTestUtils ( { app, page, context } ) ;
92
91
await u . po . signIn . goTo ( ) ;
93
92
await u . po . signIn . signInWithEmailAndInstantPassword ( { email : fakeUser . email , password : fakeUser . password } ) ;
@@ -100,7 +99,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
100
99
await expect ( u . po . page . getByText ( 'Payment was successful!' ) ) . toBeVisible ( ) ;
101
100
} ) ;
102
101
103
- test . skip ( 'can downgrade to previous plan' , async ( { page, context } ) => {
102
+ test ( 'can downgrade to previous plan' , async ( { page, context } ) => {
104
103
const u = createTestUtils ( { app, page, context } ) ;
105
104
await u . po . signIn . goTo ( ) ;
106
105
await u . po . signIn . signInWithEmailAndInstantPassword ( { email : fakeUser . email , password : fakeUser . password } ) ;
@@ -114,7 +113,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
114
113
await expect ( u . po . page . getByText ( 'Success!' ) ) . toBeVisible ( ) ;
115
114
} ) ;
116
115
117
- test . skip ( 'user is prompted to add email before checkout' , async ( { page, context } ) => {
116
+ test ( 'user is prompted to add email before checkout' , async ( { page, context } ) => {
118
117
const u = createTestUtils ( { app, page, context } ) ;
119
118
120
119
const fakeUser = u . services . users . createFakeUser ( { withEmail : false , withPhoneNumber : true } ) ;
@@ -157,7 +156,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
157
156
// });
158
157
159
158
test . describe ( 'redirects' , ( ) => {
160
- test . skip ( 'default navigates to afterSignInUrl' , async ( { page, context } ) => {
159
+ test ( 'default navigates to afterSignInUrl' , async ( { page, context } ) => {
161
160
const u = createTestUtils ( { app, page, context } ) ;
162
161
await u . po . signIn . goTo ( ) ;
163
162
await u . po . signIn . signInWithEmailAndInstantPassword ( { email : fakeUser . email , password : fakeUser . password } ) ;
@@ -172,9 +171,16 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
172
171
. getByRole ( 'button' , { name : / ^ c o n t i n u e $ / i } )
173
172
. click ( ) ;
174
173
await u . page . waitForAppUrl ( '/' ) ;
174
+ // eslint-disable-next-line playwright/no-conditional-in-test
175
+ if ( app . name . includes ( 'next' ) ) {
176
+ // Correctly updates RSCs with the new `pla` claim.
177
+ await expect ( u . po . page . getByText ( 'user in pro' ) ) . toBeVisible ( {
178
+ timeout : 5_000 ,
179
+ } ) ;
180
+ }
175
181
} ) ;
176
182
177
- test . skip ( 'navigates to supplied newSubscriptionRedirectUrl' , async ( { page, context } ) => {
183
+ test ( 'navigates to supplied newSubscriptionRedirectUrl' , async ( { page, context } ) => {
178
184
const u = createTestUtils ( { app, page, context } ) ;
179
185
await u . po . signIn . goTo ( ) ;
180
186
await u . po . signIn . signInWithEmailAndInstantPassword ( { email : fakeUser . email , password : fakeUser . password } ) ;
@@ -193,7 +199,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
193
199
} ) ;
194
200
195
201
test . describe ( 'in UserProfile' , ( ) => {
196
- test . skip ( 'renders pricing table with plans' , async ( { page, context } ) => {
202
+ test ( 'renders pricing table with plans' , async ( { page, context } ) => {
197
203
const u = createTestUtils ( { app, page, context } ) ;
198
204
await u . po . signIn . goTo ( ) ;
199
205
await u . po . signIn . signInWithEmailAndInstantPassword ( { email : fakeUser . email , password : fakeUser . password } ) ;
@@ -206,7 +212,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
206
212
await expect ( u . po . page . getByRole ( 'heading' , { name : 'Pro' } ) ) . toBeVisible ( ) ;
207
213
} ) ;
208
214
209
- test . skip ( 'can subscribe to a plan, revalidates payment sources on complete and then downgrades to free' , async ( {
215
+ test ( 'can subscribe to a plan, revalidates payment sources on complete and then downgrades to free' , async ( {
210
216
page,
211
217
context,
212
218
} ) => {
@@ -254,7 +260,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
254
260
await fakeUser . deleteIfExists ( ) ;
255
261
} ) ;
256
262
257
- test . skip ( 'checkout always revalidates on open' , async ( { page, context } ) => {
263
+ test ( 'checkout always revalidates on open' , async ( { page, context } ) => {
258
264
const u = createTestUtils ( { app, page, context } ) ;
259
265
260
266
const fakeUser = u . services . users . createFakeUser ( ) ;
@@ -282,7 +288,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
282
288
await fakeUser . deleteIfExists ( ) ;
283
289
} ) ;
284
290
285
- test . skip ( 'adds payment source via checkout and resets stripe setup intent after failed payment' , async ( {
291
+ test ( 'adds payment source via checkout and resets stripe setup intent after failed payment' , async ( {
286
292
page,
287
293
context,
288
294
} ) => {
@@ -319,7 +325,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withBilling] })('pricing tabl
319
325
await fakeUser . deleteIfExists ( ) ;
320
326
} ) ;
321
327
322
- test . skip ( 'displays notice then plan cannot change' , async ( { page, context } ) => {
328
+ test ( 'displays notice then plan cannot change' , async ( { page, context } ) => {
323
329
const u = createTestUtils ( { app, page, context } ) ;
324
330
325
331
const fakeUser = u . services . users . createFakeUser ( ) ;
0 commit comments