File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,22 @@ type Metadata = {
7
7
} ;
8
8
9
9
export async function enterCreditCard ( page : Page ) {
10
+ const dialog = page . locator ( '.modal' ) . filter ( {
11
+ hasText : 'add payment method'
12
+ } ) ;
13
+ await dialog . waitFor ( {
14
+ state : 'visible'
15
+ } ) ;
10
16
await page . getByPlaceholder ( 'cardholder' ) . fill ( 'Test User' ) ;
11
17
const stripe = page . frameLocator ( '[title="Secure payment input frame"]' ) ;
12
18
await stripe . locator ( 'id=Field-numberInput' ) . fill ( '4242424242424242' ) ;
13
19
await stripe . locator ( 'id=Field-expiryInput' ) . fill ( '1250' ) ;
14
20
await stripe . locator ( 'id=Field-cvcInput' ) . fill ( '123' ) ;
15
21
await stripe . locator ( 'id=Field-countryInput' ) . selectOption ( 'DE' ) ;
16
22
await page . getByRole ( 'button' , { name : 'Add' , exact : true } ) . click ( ) ;
23
+ await dialog . waitFor ( {
24
+ state : 'hidden'
25
+ } ) ;
17
26
}
18
27
19
28
export async function createProProject ( page : Page ) : Promise < Metadata > {
@@ -24,7 +33,6 @@ export async function createProProject(page: Page): Promise<Metadata> {
24
33
await page . locator ( 'id=plan' ) . selectOption ( 'tier-1' ) ;
25
34
await page . getByRole ( 'button' , { name : 'get started' } ) . click ( ) ;
26
35
await page . waitForURL ( '/console/create-organization**' ) ;
27
- await new Promise ( ( r ) => setTimeout ( r , 1000 ) ) ;
28
36
await page . getByRole ( 'button' , { name : 'add' } ) . first ( ) . click ( ) ;
29
37
await enterCreditCard ( page ) ;
30
38
// skip members
You can’t perform that action at this time.
0 commit comments