Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonjoseph committed Jan 3, 2024
1 parent 53b85bd commit 4e23037
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions src/components/A11yStatus/A11yStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,38 @@ class A11yStatus extends React.Component {
.replace(' ', '-')}/usage`;
}

// Iterate through all specs in the suite, and all tags in
// each spec, to determine if there is _any_ spec that includes
// a tag we're looking for.
const hasDefaultAVT = componentTestData.suites.some((suite) => {
return suite.specs.some((spec) => {
return spec.tags.some((tag) => {
return tag.includes('avt-default-state');
let hasDefaultAVT = false;
let hasComplexAVT = false;
let hasKeyboardNavAVT = false;
if (componentTestData) {
// Iterate through all specs in the suite, and all tags in
// each spec, to determine if there is _any_ spec that includes
// a tag we're looking for.

hasDefaultAVT = componentTestData.suites.some((suite) => {
return suite.specs.some((spec) => {
return spec.tags.some((tag) => {
return tag.includes('avt-default-state');
});
});
});
});

const hasComplexAVT = componentTestData.suites.some((suite) => {
return suite.specs.some((spec) => {
return spec.tags.some((tag) => {
return tag.includes('avt-advanced-states');
hasComplexAVT = componentTestData.suites.some((suite) => {
return suite.specs.some((spec) => {
return spec.tags.some((tag) => {
return tag.includes('avt-advanced-states');
});
});
});
});

const hasKeyboardNavAVT = componentTestData.suites.some(
(suite) => {
hasKeyboardNavAVT = componentTestData.suites.some((suite) => {
return suite.specs.some((spec) => {
return spec.tags.some((tag) => {
return tag.includes('avt-keyboard-nav');
});
});
}
);
});
}

return (
<>
Expand Down

0 comments on commit 4e23037

Please sign in to comment.