Skip to content

Commit 87ddc89

Browse files
Fix lint issues
1 parent bd8568f commit 87ddc89

1 file changed

Lines changed: 16 additions & 24 deletions

File tree

core/src/components/item-sliding/test/full-swipe/item-sliding.e2e.ts

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr'] }).forEach(({ ti
2020
await page.goto(`/src/components/item-sliding/test/full-swipe`, config);
2121
});
2222

23-
test('should fire ionSwipe when expandable option is swiped fully (end side)', async ({
24-
page,
25-
}) => {
23+
test('should fire ionSwipe when expandable option is swiped fully (end side)', async ({ page }) => {
2624
const ionSwipe = await page.spyOnEvent('ionSwipe');
2725
const item = page.locator('#expandable-end');
2826

@@ -32,9 +30,7 @@ configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr'] }).forEach(({ ti
3230
expect(ionSwipe.length).toBeGreaterThan(0);
3331
});
3432

35-
test('should fire ionSwipe when expandable option is swiped fully (start side)', async ({
36-
page,
37-
}) => {
33+
test('should fire ionSwipe when expandable option is swiped fully (start side)', async ({ page }) => {
3834
const ionSwipe = await page.spyOnEvent('ionSwipe');
3935
const item = page.locator('#expandable-start');
4036

@@ -51,9 +47,7 @@ configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr'] }).forEach(({ ti
5147
await page.waitForTimeout(FULL_ANIMATION_MS);
5248
await page.waitForChanges();
5349

54-
const openAmount = await item.evaluate((el: HTMLIonItemSlidingElement) =>
55-
el.getOpenAmount()
56-
);
50+
const openAmount = await item.evaluate((el: HTMLIonItemSlidingElement) => el.getOpenAmount());
5751
expect(openAmount).toBe(0);
5852
});
5953

@@ -104,23 +98,21 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
10498
* RTL support: swipe direction is mirrored. In RTL, swiping right
10599
* reveals the "end" side options and should trigger the full animation.
106100
*/
107-
configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr', 'rtl'] }).forEach(
108-
({ title, config }) => {
109-
test.describe(title('item-sliding: full swipe'), () => {
110-
test('should fire ionSwipe in the correct swipe direction', async ({ page }) => {
111-
await page.goto(`/src/components/item-sliding/test/full-swipe`, config);
101+
configs({ modes: ['ios', 'md', 'ionic-md'], directions: ['ltr', 'rtl'] }).forEach(({ title, config }) => {
102+
test.describe(title('item-sliding: full swipe'), () => {
103+
test('should fire ionSwipe in the correct swipe direction', async ({ page }) => {
104+
await page.goto(`/src/components/item-sliding/test/full-swipe`, config);
112105

113-
const ionSwipe = await page.spyOnEvent('ionSwipe');
114-
const item = page.locator('#expandable-end');
106+
const ionSwipe = await page.spyOnEvent('ionSwipe');
107+
const item = page.locator('#expandable-end');
115108

116-
// In RTL the "end" side is on the left, revealed by dragging right
117-
const dragByX = config.direction === 'rtl' ? 190 : -190;
109+
// In RTL the "end" side is on the left, revealed by dragging right
110+
const dragByX = config.direction === 'rtl' ? 190 : -190;
118111

119-
await dragElementBy(item, page, dragByX);
120-
await page.waitForTimeout(FULL_ANIMATION_MS);
112+
await dragElementBy(item, page, dragByX);
113+
await page.waitForTimeout(FULL_ANIMATION_MS);
121114

122-
expect(ionSwipe.length).toBeGreaterThan(0);
123-
});
115+
expect(ionSwipe.length).toBeGreaterThan(0);
124116
});
125-
}
126-
);
117+
});
118+
});

0 commit comments

Comments
 (0)