Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
37f7683b
Commit
37f7683b
authored
Aug 23, 2023
by
Alejandro Celaya
Committed by
Alejandro Celaya
Aug 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add accessibility tests to FileInput component
parent
7c7cae68
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
FileInput.tsx
src/sidebar/components/ShareDialog/FileInput.tsx
+0
-1
FileInput-test.js
src/sidebar/components/ShareDialog/test/FileInput-test.js
+15
-0
No files found.
src/sidebar/components/ShareDialog/FileInput.tsx
View file @
37f7683b
...
...
@@ -27,7 +27,6 @@ export default function FileInput({
disabled=
{
disabled
}
className=
"invisible absolute w-0 h-0"
aria
-
hidden
tabIndex=
{
-
1
}
data
-
testid=
"file-input"
onChange=
{
e
=>
{
const
files
=
(
e
.
target
as
HTMLInputElement
)
!
.
files
;
...
...
src/sidebar/components/ShareDialog/test/FileInput-test.js
View file @
37f7683b
import
{
mount
}
from
'enzyme'
;
import
{
checkAccessibility
}
from
'../../../../test-util/accessibility'
;
import
FileInput
from
'../FileInput'
;
describe
(
'FileInput'
,
()
=>
{
...
...
@@ -96,4 +97,18 @@ describe('FileInput', () => {
assert
.
equal
(
proxyButton
.
prop
(
'disabled'
),
disabled
);
});
});
it
(
'should pass a11y checks'
,
checkAccessibility
([
{
content
:
()
=>
mount
(
<
div
>
<
FileInput
onFileSelected
=
{
fakeOnFileSelected
}
/
>
<
/div>
,
),
},
]),
);
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment