@@ -19,11 +19,42 @@ test.only('Purshace article', async ({ page }) => {
19
19
20
20
await ai ( 'click continue button' , { page, test } )
21
21
await ai ( 'finish purchase' , { page, test } )
22
- const element = await page . locator ( '.checkout_complete_container' )
23
- expect ( element ) . toBeVisible ( )
22
+ var statusPurchase = await ai ( 'the purchase was successful?' , { page, test } )
23
+ console . log ( statusPurchase )
24
+ expect ( statusPurchase ) . toEqual ( true )
24
25
25
26
await page . pause ( )
26
27
27
28
} ) ;
28
29
30
+ test ( 'Purshace article not complete info' , async ( { page } ) => {
31
+ await ai ( 'go to this page https://www.saucedemo.com/' , { page, test } )
32
+ await ai ( 'insert username as standard_user' , { page, test } )
33
+ await ai ( 'insert password as secret_sauce in the password field' , { page, test } )
34
+ await ai ( 'click buton login' , { page, test } )
35
+ await ai ( 'add to the cart the 2 articles' , { page, test } )
36
+ await page . pause ( )
37
+
38
+ await ai ( 'go to te cart' , { page, test } )
39
+ await ai ( 'checkout purchase' , { page, test } )
40
+ await ai ( 'fill form with real information' , { page, test } )
41
+ await page . pause ( )
42
+
43
+ var statusPurchase = await ai ( 'the purchase was successful?' , { page, test } )
44
+ console . log ( statusPurchase )
45
+ expect ( statusPurchase ) . toEqual ( true )
46
+
47
+ await page . pause ( )
48
+
49
+ } ) ;
50
+
51
+ test ( 'Spanish login' , async ( { page } ) => {
52
+ await ai ( 'visita la pagina https://www.saucedemo.com/' , { page, test } )
53
+ await ai ( 'inserta username standard_user' , { page, test } )
54
+ await ai ( 'inserta password secret_sauce in the password field' , { page, test } )
55
+ await ai ( 'clic en el boton login' , { page, test } )
56
+ await ai ( 'agrega dos articulos' , { page, test } )
57
+ await page . pause ( )
58
+
59
+ } ) ;
29
60
0 commit comments