@@ -2,8 +2,12 @@ import { expect } from '@playwright/test';
2
2
import type { E2EPage } from '@utils/test/playwright' ;
3
3
import { test } from '@utils/test/playwright' ;
4
4
5
- // TODO FW-3081
6
- test . describe . skip ( 'ripple-effect: basic' , ( ) => {
5
+ test . describe ( 'ripple-effect: basic' , ( ) => {
6
+ test . beforeEach ( async ( { skip } ) => {
7
+ skip . rtl ( ) ;
8
+ skip . mode ( 'ios' ) ;
9
+ } ) ;
10
+
7
11
test ( 'should add .ion-activated when pressed' , async ( { page } ) => {
8
12
await verifyRippleEffect ( page , '#small-btn' ) ;
9
13
await verifyRippleEffect ( page , '#large-btn' ) ;
@@ -14,7 +18,7 @@ test.describe.skip('ripple-effect: basic', () => {
14
18
15
19
test . describe ( 'ripple effect with nested ion-button' , ( ) => {
16
20
test ( 'should add .ion-activated when the block is pressed' , async ( { page } ) => {
17
- await page . goto ( ` /src/components/ripple-effect/test/basic?ionic:_testing=false&ionic:mode=md` ) ;
21
+ await page . goto ( ' /src/components/ripple-effect/test/basic?ionic:_testing=false' ) ;
18
22
19
23
const el = page . locator ( '#ripple-with-button' ) ;
20
24
@@ -30,9 +34,7 @@ test.describe.skip('ripple-effect: basic', () => {
30
34
// Waits for the ripple effect to be added
31
35
await page . waitForSelector ( '.ion-activated' ) ;
32
36
33
- const elHandle = await el . elementHandle ( ) ;
34
- const classes = await elHandle ?. evaluate ( ( el ) => el . classList . value ) ;
35
- expect ( classes ) . toMatch ( / i o n - a c t i v a t e d / ) ;
37
+ await expect ( el ) . toHaveClass ( / i o n - a c t i v a t e d / ) ;
36
38
} ) ;
37
39
38
40
test ( 'should add .ion-activated when the button is pressed' , async ( { page } ) => {
@@ -42,7 +44,7 @@ test.describe.skip('ripple-effect: basic', () => {
42
44
} ) ;
43
45
44
46
const verifyRippleEffect = async ( page : E2EPage , selector : string ) => {
45
- await page . goto ( ` /src/components/ripple-effect/test/basic?ionic:_testing=false&ionic:mode=md` ) ;
47
+ await page . goto ( ' /src/components/ripple-effect/test/basic?ionic:_testing=false' ) ;
46
48
47
49
const el = page . locator ( selector ) ;
48
50
@@ -55,10 +57,7 @@ const verifyRippleEffect = async (page: E2EPage, selector: string) => {
55
57
await page . mouse . down ( ) ;
56
58
}
57
59
58
- // Waits for the ripple effect to be added
59
- await page . waitForSelector ( `${ selector } .ion-activated` ) ;
60
+ await page . waitForSelector ( '.ion-activated' ) ;
60
61
61
- const elHandle = await el . elementHandle ( ) ;
62
- const classes = await elHandle ?. evaluate ( ( el ) => el . classList . value ) ;
63
- expect ( classes ) . toMatch ( / i o n - a c t i v a t e d / ) ;
62
+ await expect ( el ) . toHaveClass ( / i o n - a c t i v a t e d / ) ;
64
63
} ;
0 commit comments