-
Notifications
You must be signed in to change notification settings - Fork 0
fix(a11y): make editor validation feedback deterministic #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
8
commits into
develop
Choose a base branch
from
palette-aria-disabled-save-button-6298444943198792767
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
afda8a0
Hi, I'm Jules! I have updated the UI by replacing the native `disable…
seonghobae 70d7f71
test(a11y): reproduce editor submit validation races
seonghobae f4a01b3
chore(a11y): keep validation choice local to editor
seonghobae e8414ed
I've fixed the accessibility issue with the editor's validation feedb…
seonghobae f1a993d
Hello! Jules here. I have updated the code to fix the accessibility i…
seonghobae ba81b47
I have implemented the accessibility fixes for the editor's validatio…
seonghobae 64cb5e0
Hi, I'm Jules! I've just updated the code to fix the accessibility is…
seonghobae 9422f55
I have fixed the accessibility issue with the editor's validation fee…
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { test, expect } from '@playwright/test'; | ||
|
|
||
| test.describe('editor validation feedback', () => { | ||
| test.beforeEach(async ({ page }) => { | ||
| await page.goto('./'); | ||
| await page.getByRole('button', { name: '최상위 작업 추가' }).click(); | ||
| }); | ||
|
|
||
| test('routes an invalid required-field submit through product validation feedback', async ({ page }) => { | ||
| const form = page.locator('form[data-editor-form="true"]'); | ||
| const toast = page.locator('#toast'); | ||
|
|
||
| await expect(form).toBeVisible(); | ||
| await form.evaluate((editorForm) => editorForm.requestSubmit()); | ||
|
|
||
| await expect(page.locator('#editor-errors')).toContainText('최상위 작업은 단계 값을 입력해야 합니다.'); | ||
| await expect(toast).toHaveClass(/show/); | ||
| await expect(toast).toContainText('입력값을 올바르게 수정해야 저장할 수 있습니다.'); | ||
| await expect(form).toBeVisible(); | ||
| }); | ||
|
|
||
| test('flushes pending validation before an immediate valid submit', async ({ page }) => { | ||
| const phaseInput = page.locator('[data-testid="editor-phase"]'); | ||
|
|
||
| await phaseInput.evaluate((input) => { | ||
| input.value = '즉시 제출 단계'; | ||
| input.dispatchEvent(new Event('input', { bubbles: true })); | ||
| input.form.requestSubmit(); | ||
| }); | ||
|
|
||
| await expect(page.locator('form[data-editor-form="true"]')).toHaveCount(0); | ||
| await expect( | ||
| page.locator('tbody tr[data-task-id]').filter({ hasText: '즉시 제출 단계' }), | ||
| ).toHaveCount(1); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.