Skip to content

Commit 327cfc3

Browse files
committed
Fix lint formatting and update IME E2E expectations
- format AppNavigationForm.vue to satisfy prettier/eslint CI - register IconPlus in AnswerInput components used by explicit add button - update IME playwright test to assert explicit Enter intent before option creation Signed-off-by: don9x2E <revan@kakao.com>
1 parent e41428e commit 327cfc3

3 files changed

Lines changed: 98 additions & 89 deletions

File tree

playwright/e2e/ime-input.spec.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test.beforeEach(async ({ page }) => {
1717
})
1818

1919
test(
20-
'IME input does not trigger new option',
20+
'IME input requires explicit intent to create new option',
2121
{
2222
annotation: {
2323
type: 'issue',
@@ -75,7 +75,12 @@ test(
7575
await client.send('Input.insertText', {
7676
text: 'さ',
7777
})
78-
// so there were 4 inputs but those should only result in one new option
78+
// Committing composition text alone must not create a new option.
79+
await expect(question.answerInputs).toHaveCount(0)
80+
await expect(question.newAnswerInput).toHaveValue('さ')
81+
82+
// Explicit intent (Enter) creates exactly one option.
83+
await question.newAnswerInput.press('Enter')
7984
await expect(question.answerInputs).toHaveCount(1)
8085
await expect(question.answerInputs).toHaveValue('さ')
8186
},

src/components/AppNavigationForm.vue

Lines changed: 90 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -6,93 +6,96 @@
66
<template>
77
<div>
88
<NcListItem
9-
:active="isActive"
10-
:actions-aria-label="t('forms', 'Form actions')"
11-
:counter-number="form.submissionCount"
12-
compact
13-
:force-display-actions="forceDisplayActions"
14-
:name="formTitle"
15-
:to="{
16-
name: routerTarget,
17-
params: { hash: form.hash },
18-
}"
19-
@click="mobileCloseNavigation">
20-
<template #icon>
21-
<NcLoadingIcon v-if="loading" :size="16" />
22-
<IconCheck v-else-if="isExpired" :size="16" />
23-
<FormsIcon v-else :size="16" />
24-
</template>
25-
<template v-if="hasSubtitle" #subname>
26-
{{ formSubtitle }}
27-
</template>
28-
<template
29-
v-if="!loading && (!readOnly || canEdit || canSeeResults)"
30-
#actions>
31-
<NcActionRouter
32-
v-if="!isArchived && canEdit"
33-
close-after-click
34-
:disabled="isFormLocked"
35-
exact
36-
:to="{ name: 'edit', params: { hash: form.hash } }"
37-
@click="mobileCloseNavigation">
38-
<template #icon>
39-
<IconPencil :size="20" />
40-
</template>
41-
{{ t('forms', 'Edit form') }}
42-
</NcActionRouter>
43-
<NcActionButton
44-
v-if="!isArchived && !readOnly"
45-
close-after-click
46-
@click="onShareForm">
47-
<template #icon>
48-
<IconShareVariant :size="20" />
49-
</template>
50-
{{ t('forms', 'Share form') }}
51-
</NcActionButton>
52-
<NcActionRouter
53-
v-if="canSeeResults"
54-
close-after-click
55-
exact
56-
:to="{ name: 'results', params: { hash: form.hash } }"
57-
@click="mobileCloseNavigation">
58-
<template #icon>
59-
<IconPoll :size="20" />
60-
</template>
61-
{{ t('forms', 'Results') }}
62-
</NcActionRouter>
63-
<NcActionButton v-if="canEdit" close-after-click @click="onCloneForm">
64-
<template #icon>
65-
<IconContentCopy :size="20" />
66-
</template>
67-
{{ t('forms', 'Copy form') }}
68-
</NcActionButton>
69-
<NcActionSeparator v-if="canEdit && !readOnly" />
70-
<NcActionButton
71-
v-if="canEdit && !readOnly"
72-
close-after-click
73-
:disabled="isFormLocked"
74-
@click="onToggleArchive">
75-
<template #icon>
76-
<IconArchiveOff v-if="isArchived" :size="20" />
77-
<IconArchive v-else :size="20" />
78-
</template>
79-
{{
80-
isArchived
81-
? t('forms', 'Unarchive form')
82-
: t('forms', 'Archive form')
83-
}}
84-
</NcActionButton>
85-
<NcActionButton
86-
v-if="canEdit && !readOnly"
87-
close-after-click
88-
:disabled="isFormLocked"
89-
@click="showDeleteDialog = true">
90-
<template #icon>
91-
<IconDelete :size="20" />
92-
</template>
93-
{{ t('forms', 'Delete form') }}
94-
</NcActionButton>
95-
</template>
9+
:active="isActive"
10+
:actions-aria-label="t('forms', 'Form actions')"
11+
:counter-number="form.submissionCount"
12+
compact
13+
:force-display-actions="forceDisplayActions"
14+
:name="formTitle"
15+
:to="{
16+
name: routerTarget,
17+
params: { hash: form.hash },
18+
}"
19+
@click="mobileCloseNavigation">
20+
<template #icon>
21+
<NcLoadingIcon v-if="loading" :size="16" />
22+
<IconCheck v-else-if="isExpired" :size="16" />
23+
<FormsIcon v-else :size="16" />
24+
</template>
25+
<template v-if="hasSubtitle" #subname>
26+
{{ formSubtitle }}
27+
</template>
28+
<template
29+
v-if="!loading && (!readOnly || canEdit || canSeeResults)"
30+
#actions>
31+
<NcActionRouter
32+
v-if="!isArchived && canEdit"
33+
close-after-click
34+
:disabled="isFormLocked"
35+
exact
36+
:to="{ name: 'edit', params: { hash: form.hash } }"
37+
@click="mobileCloseNavigation">
38+
<template #icon>
39+
<IconPencil :size="20" />
40+
</template>
41+
{{ t('forms', 'Edit form') }}
42+
</NcActionRouter>
43+
<NcActionButton
44+
v-if="!isArchived && !readOnly"
45+
close-after-click
46+
@click="onShareForm">
47+
<template #icon>
48+
<IconShareVariant :size="20" />
49+
</template>
50+
{{ t('forms', 'Share form') }}
51+
</NcActionButton>
52+
<NcActionRouter
53+
v-if="canSeeResults"
54+
close-after-click
55+
exact
56+
:to="{ name: 'results', params: { hash: form.hash } }"
57+
@click="mobileCloseNavigation">
58+
<template #icon>
59+
<IconPoll :size="20" />
60+
</template>
61+
{{ t('forms', 'Results') }}
62+
</NcActionRouter>
63+
<NcActionButton
64+
v-if="canEdit"
65+
close-after-click
66+
@click="onCloneForm">
67+
<template #icon>
68+
<IconContentCopy :size="20" />
69+
</template>
70+
{{ t('forms', 'Copy form') }}
71+
</NcActionButton>
72+
<NcActionSeparator v-if="canEdit && !readOnly" />
73+
<NcActionButton
74+
v-if="canEdit && !readOnly"
75+
close-after-click
76+
:disabled="isFormLocked"
77+
@click="onToggleArchive">
78+
<template #icon>
79+
<IconArchiveOff v-if="isArchived" :size="20" />
80+
<IconArchive v-else :size="20" />
81+
</template>
82+
{{
83+
isArchived
84+
? t('forms', 'Unarchive form')
85+
: t('forms', 'Archive form')
86+
}}
87+
</NcActionButton>
88+
<NcActionButton
89+
v-if="canEdit && !readOnly"
90+
close-after-click
91+
:disabled="isFormLocked"
92+
@click="showDeleteDialog = true">
93+
<template #icon>
94+
<IconDelete :size="20" />
95+
</template>
96+
{{ t('forms', 'Delete form') }}
97+
</NcActionButton>
98+
</template>
9699
</NcListItem>
97100
<NcDialog
98101
:open.sync="showDeleteDialog"

src/components/Questions/AnswerInput.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export default {
109109
IconCheckboxBlankOutline,
110110
IconDelete,
111111
IconDragIndicator,
112+
IconPlus,
112113
IconRadioboxBlank,
113114
IconTableColumn,
114115
IconTableRow,

0 commit comments

Comments
 (0)