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
6788a69a
Commit
6788a69a
authored
Oct 26, 2023
by
Alejandro Celaya
Committed by
Alejandro Celaya
Oct 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use VNode approach in a11y tests where we were wrapping component under test in div
parent
9b112690
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
25 deletions
+13
-25
ImportAnnotations-test.js
...bar/components/ShareDialog/test/ImportAnnotations-test.js
+7
-10
ShareDialog-test.js
src/sidebar/components/ShareDialog/test/ShareDialog-test.js
+5
-11
ThreadList-test.js
src/sidebar/components/test/ThreadList-test.js
+1
-4
No files found.
src/sidebar/components/ShareDialog/test/ImportAnnotations-test.js
View file @
6788a69a
...
...
@@ -339,16 +339,13 @@ describe('ImportAnnotations', () => {
it
(
'should pass a11y checks'
,
checkAccessibility
({
content
:
()
=>
mount
(
// re. outer div, see https://github.com/hypothesis/client/issues/5690
<
div
>
<
ImportAnnotations
store
=
{
fakeStore
}
importAnnotationsService
=
{
fakeImportAnnotationsService
}
/
>
<
/div>
,
),
// re. not using `mount`, see https://github.com/hypothesis/client/issues/5690
content
:
()
=>
(
<
ImportAnnotations
store
=
{
fakeStore
}
importAnnotationsService
=
{
fakeImportAnnotationsService
}
/
>
),
}),
);
});
src/sidebar/components/ShareDialog/test/ShareDialog-test.js
View file @
6788a69a
...
...
@@ -126,17 +126,11 @@ describe('ShareDialog', () => {
it
(
'should pass a11y checks'
,
checkAccessibility
({
content
:
()
=>
// ShareDialog renders a Fragment as its top-level component when
// it has import and/or export tabs.
// Wrapping it in a `div` ensures `checkAccessibility` internal logic
// does not discard all the Fragment children but the first one.
// See https://github.com/hypothesis/client/issues/5671
mount
(
<
div
>
<
ShareDialog
shareTab
exportTab
importTab
/>
<
/div>
,
),
// ShareDialog renders a Fragment as its top-level component when
// it has import and/or export tabs.
// Returning the VNode verbatim ensures no children are discarded.
// See https://github.com/hypothesis/client/issues/5671
content
:
()
=>
<
ShareDialog
shareTab
exportTab
importTab
/>
,
}),
);
});
...
...
src/sidebar/components/test/ThreadList-test.js
View file @
6788a69a
...
...
@@ -418,10 +418,7 @@ describe('ThreadList', () => {
it
(
'should pass a11y checks'
,
checkAccessibility
({
content
:
()
=>
{
const
wrapper
=
createComponent
();
return
wrapper
;
},
content
:
()
=>
createComponent
(),
}),
);
});
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