diff --git a/core/src/components/checkbox/test/basic/checkbox.e2e.ts b/core/src/components/checkbox/test/basic/checkbox.e2e.ts
index 957c6da31b8..1a41b339599 100644
--- a/core/src/components/checkbox/test/basic/checkbox.e2e.ts
+++ b/core/src/components/checkbox/test/basic/checkbox.e2e.ts
@@ -98,28 +98,5 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
await checkbox.evaluate((el: HTMLIonCheckboxElement) => (el.checked = true));
expect(ionChange).not.toHaveReceivedEvent();
});
-
- test('clicking padded space within item should click the checkbox', async ({ page }) => {
- await page.setContent(
- `
-
- Size
-
- `,
- config
- );
- const itemNative = page.locator('.item-native');
- const ionChange = await page.spyOnEvent('ionChange');
-
- // Clicks the padded space within the item
- await itemNative.click({
- position: {
- x: 5,
- y: 5,
- },
- });
-
- expect(ionChange).toHaveReceivedEvent();
- });
});
});
diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts b/core/src/components/checkbox/test/item/checkbox.e2e.ts
index bdcf1892da2..341839739b1 100644
--- a/core/src/components/checkbox/test/item/checkbox.e2e.ts
+++ b/core/src/components/checkbox/test/item/checkbox.e2e.ts
@@ -127,3 +127,70 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
});
});
});
+
+configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
+ test.describe(title('checkbox: item functionality'), () => {
+ test('clicking padded space within item should click the checkbox', async ({ page }) => {
+ test.info().annotations.push({
+ type: 'issue',
+ description: 'https://github.com/ionic-team/ionic-framework/issues/27169',
+ });
+
+ await page.setContent(
+ `
+
+ Size
+
+ `,
+ config
+ );
+ const item = page.locator('ion-item');
+ const ionChange = await page.spyOnEvent('ionChange');
+
+ // Clicks the padded space within the item
+ await item.click({
+ position: {
+ x: 5,
+ y: 5,
+ },
+ });
+
+ expect(ionChange).toHaveReceivedEvent();
+ });
+
+ test('clicking padded space within item should fire one click event', async ({ page }) => {
+ test.info().annotations.push({
+ type: 'issue',
+ description: 'https://github.com/ionic-team/ionic-framework/issues/29758',
+ });
+
+ await page.setContent(
+ `
+
+
+ Checkbox
+
+
+ `,
+ config
+ );
+
+ const item = page.locator('ion-item');
+ const onClick = await page.spyOnEvent('click');
+
+ // Click the padding area (5px from left edge)
+ await item.click({
+ position: {
+ x: 5,
+ y: 5,
+ },
+ });
+
+ expect(onClick).toHaveReceivedEventTimes(1);
+
+ // Verify that the event target is the checkbox and not the item
+ const event = onClick.events[0];
+ expect((event.target as HTMLElement).tagName.toLowerCase()).toBe('ion-checkbox');
+ });
+ });
+});
diff --git a/core/src/components/checkbox/test/item/index.html b/core/src/components/checkbox/test/item/index.html
index b2fa0bdccd1..8692c4a022e 100644
--- a/core/src/components/checkbox/test/item/index.html
+++ b/core/src/components/checkbox/test/item/index.html
@@ -246,6 +246,16 @@
Multiline Label
+
+