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', () => {
...
@@ -339,16 +339,13 @@ describe('ImportAnnotations', () => {
it
(
it
(
'should pass a11y checks'
,
'should pass a11y checks'
,
checkAccessibility
({
checkAccessibility
({
content
:
()
=>
// re. not using `mount`, see https://github.com/hypothesis/client/issues/5690
mount
(
content
:
()
=>
(
// re. outer div, see https://github.com/hypothesis/client/issues/5690
<
ImportAnnotations
<
div
>
store
=
{
fakeStore
}
<
ImportAnnotations
importAnnotationsService
=
{
fakeImportAnnotationsService
}
store
=
{
fakeStore
}
/
>
importAnnotationsService
=
{
fakeImportAnnotationsService
}
),
/
>
<
/div>
,
),
}),
}),
);
);
});
});
src/sidebar/components/ShareDialog/test/ShareDialog-test.js
View file @
6788a69a
...
@@ -126,17 +126,11 @@ describe('ShareDialog', () => {
...
@@ -126,17 +126,11 @@ describe('ShareDialog', () => {
it
(
it
(
'should pass a11y checks'
,
'should pass a11y checks'
,
checkAccessibility
({
checkAccessibility
({
content
:
()
=>
// ShareDialog renders a Fragment as its top-level component when
// ShareDialog renders a Fragment as its top-level component when
// it has import and/or export tabs.
// it has import and/or export tabs.
// Returning the VNode verbatim ensures no children are discarded.
// Wrapping it in a `div` ensures `checkAccessibility` internal logic
// See https://github.com/hypothesis/client/issues/5671
// does not discard all the Fragment children but the first one.
content
:
()
=>
<
ShareDialog
shareTab
exportTab
importTab
/>
,
// See https://github.com/hypothesis/client/issues/5671
mount
(
<
div
>
<
ShareDialog
shareTab
exportTab
importTab
/>
<
/div>
,
),
}),
}),
);
);
});
});
...
...
src/sidebar/components/test/ThreadList-test.js
View file @
6788a69a
...
@@ -418,10 +418,7 @@ describe('ThreadList', () => {
...
@@ -418,10 +418,7 @@ describe('ThreadList', () => {
it
(
it
(
'should pass a11y checks'
,
'should pass a11y checks'
,
checkAccessibility
({
checkAccessibility
({
content
:
()
=>
{
content
:
()
=>
createComponent
(),
const
wrapper
=
createComponent
();
return
wrapper
;
},
}),
}),
);
);
});
});
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