Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita8ad515

Browse files
committed
ensure button is also not enabled
1 parent8e8b4ec commita8ad515

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

‎site/src/components/SettingsAccountForm/SettingsAccountForm.test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ describe("AccountForm", () => {
3030
// Then
3131
constel=awaitscreen.findByLabelText("Username")
3232
expect(el).toBeEnabled()
33+
constbtn=awaitscreen.findByRole("button")
34+
expect(btn).toBeEnabled()
3335
})
3436
})
3537

@@ -56,6 +58,8 @@ describe("AccountForm", () => {
5658
// Then
5759
constel=awaitscreen.findByLabelText("Username")
5860
expect(el).toBeDisabled()
61+
constbtn=awaitscreen.findByRole("button")
62+
expect(btn).toBeDisabled()
5963
})
6064
})
6165
})

‎site/src/components/SettingsAccountForm/SettingsAccountForm.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export const AccountForm: FC<React.PropsWithChildren<AccountFormProps>> = ({
6464
<TextField
6565
{...getFieldHelpers("username")}
6666
onChange={onChangeTrimmed(form)}
67+
aria-disabled={!editable}
6768
autoComplete="username"
6869
disabled={!editable}
6970
fullWidth
@@ -72,7 +73,13 @@ export const AccountForm: FC<React.PropsWithChildren<AccountFormProps>> = ({
7273
/>
7374

7475
<div>
75-
<LoadingButtonloading={isLoading}type="submit"variant="contained">
76+
<LoadingButton
77+
loading={isLoading}
78+
aria-disabled={!editable}
79+
disabled={!editable}
80+
type="submit"
81+
variant="contained"
82+
>
7683
{isLoading ?"" :Language.updateSettings}
7784
</LoadingButton>
7885
</div>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp