Skip to content

Commit f5c4761

Browse files
committed
fix(input): fixing automated test that verified wrapper click issue
1 parent d5a0971 commit f5c4761

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

core/src/components/input/test/basic/input.e2e.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
132132
});
133133

134134
test.describe(title('input: click'), () => {
135-
test('should trigger onclick only once when clicking the label', async ({ page }) => {
135+
test('should trigger onclick only once when clicking the label', async ({ page }, testInfo) => {
136136
testInfo.annotations.push({
137137
type: 'issue',
138138
description: 'https://github.com/ionic-team/ionic-framework/issues/30165',
@@ -169,13 +169,18 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
169169
expect((event.target as HTMLElement).tagName.toLowerCase()).toBe('ion-input');
170170
});
171171

172-
test('should trigger onclick only once when clicking the wrapper', async ({ page }) => {
172+
test('should trigger onclick only once when clicking the wrapper', async ({ page }, testInfo) => {
173+
testInfo.annotations.push({
174+
type: 'issue',
175+
description: 'https://github.com/ionic-team/ionic-framework/issues/30165',
176+
});
173177
// Create a spy function in page context
174178
await page.setContent(
175179
`
176180
<ion-input
177181
label="Click Me"
178182
value="Test Value"
183+
label-placement="floating"
179184
></ion-input>
180185
`,
181186
config
@@ -189,8 +194,8 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
189194
// what would be the double click
190195
await input.click({
191196
position: {
192-
x: 5,
193-
y: 5,
197+
x: 1,
198+
y: 1,
194199
},
195200
});
196201

core/src/components/select/test/basic/select.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
152152
});
153153

154154
test.describe(title('select: click'), () => {
155-
test('clicking a select label should only trigger onclick once', async ({ page }) => {
155+
test('clicking a select label should only trigger onclick once', async ({ page }, testInfo) => {
156156
testInfo.annotations.push({
157157
type: 'issue',
158158
description: 'https://github.com/ionic-team/ionic-framework/issues/30165',

core/src/components/textarea/test/basic/textarea.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { configs, test } from '@utils/test/playwright';
33

44
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
55
test.describe(title('textarea: click'), () => {
6-
test('should trigger onclick only once when clicking the label', async ({ page }) => {
6+
test('should trigger onclick only once when clicking the label', async ({ page }, testInfo) => {
77
testInfo.annotations.push({
88
type: 'issue',
99
description: 'https://github.com/ionic-team/ionic-framework/issues/30165',

0 commit comments

Comments
 (0)