Skip to content

Commit

Permalink
Merge pull request #5416 from dfe-analytical-services/EES-5149-hidden…
Browse files Browse the repository at this point in the history
…-filter-groups

EES-5149 remove check to hide filter groups
  • Loading branch information
rianski authored Dec 4, 2024
2 parents aa86adf + 7b30fd3 commit 90d635c
Show file tree
Hide file tree
Showing 5 changed files with 391 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ describe('TimePeriodDataTable', () => {

const table = screen.getByRole('table');

expect(table.querySelectorAll('thead tr')).toHaveLength(2);
expect(table.querySelectorAll('thead th')).toHaveLength(6);
expect(table.querySelectorAll('thead tr')).toHaveLength(3);
expect(table.querySelectorAll('thead th')).toHaveLength(7);
expect(table.querySelectorAll('thead th[scope="colgroup"]')).toHaveLength(
2,
3,
);
expect(table.querySelectorAll('thead th[scope="col"]')).toHaveLength(4);

Expand Down Expand Up @@ -90,10 +90,10 @@ describe('TimePeriodDataTable', () => {

const table = screen.getByRole('table');

expect(table.querySelectorAll('thead tr')).toHaveLength(2);
expect(table.querySelectorAll('thead th')).toHaveLength(6);
expect(table.querySelectorAll('thead tr')).toHaveLength(3);
expect(table.querySelectorAll('thead th')).toHaveLength(7);
expect(table.querySelectorAll('thead th[scope="colgroup"]')).toHaveLength(
2,
3,
);
expect(table.querySelectorAll('thead th[scope="col"]')).toHaveLength(4);

Expand Down Expand Up @@ -144,10 +144,10 @@ describe('TimePeriodDataTable', () => {

const table = screen.getByRole('table');

expect(table.querySelectorAll('thead tr')).toHaveLength(1);
expect(table.querySelectorAll('thead th')).toHaveLength(2);
expect(table.querySelectorAll('thead tr')).toHaveLength(2);
expect(table.querySelectorAll('thead th')).toHaveLength(3);
expect(table.querySelectorAll('thead th[scope="colgroup"]')).toHaveLength(
0,
1,
);
expect(table.querySelectorAll('thead th[scope="col"]')).toHaveLength(2);

Expand Down Expand Up @@ -317,10 +317,10 @@ describe('TimePeriodDataTable', () => {

const table = screen.getByRole('table');

expect(table.querySelectorAll('thead tr')).toHaveLength(1);
expect(table.querySelectorAll('thead th')).toHaveLength(1);
expect(table.querySelectorAll('thead tr')).toHaveLength(2);
expect(table.querySelectorAll('thead th')).toHaveLength(2);
expect(table.querySelectorAll('thead th[scope="colgroup"]')).toHaveLength(
0,
1,
);
expect(table.querySelectorAll('thead th[scope="col"]')).toHaveLength(1);
expect(table.querySelector('thead th[scope="col"]')).toHaveTextContent(
Expand Down Expand Up @@ -1450,9 +1450,9 @@ describe('TimePeriodDataTable', () => {
expect(table.querySelectorAll('thead th[scope="col"]')).toHaveLength(3);

expect(table.querySelectorAll('tbody tr')).toHaveLength(6);
expect(table.querySelectorAll('tbody th')).toHaveLength(11);
expect(table.querySelectorAll('tbody th')).toHaveLength(13);
expect(table.querySelectorAll('tbody th[scope="rowgroup"]')).toHaveLength(
5,
7,
);
expect(table.querySelectorAll('tbody th[scope="row"]')).toHaveLength(6);

Expand Down Expand Up @@ -1526,10 +1526,10 @@ describe('TimePeriodDataTable', () => {

const table = screen.getByRole('table');

expect(table.querySelectorAll('thead tr')).toHaveLength(2);
expect(table.querySelectorAll('thead th')).toHaveLength(6);
expect(table.querySelectorAll('thead tr')).toHaveLength(3);
expect(table.querySelectorAll('thead th')).toHaveLength(7);
expect(table.querySelectorAll('thead th[scope="colgroup"]')).toHaveLength(
2,
3,
);
expect(table.querySelectorAll('thead th[scope="col"]')).toHaveLength(4);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,17 @@ exports[`TimePeriodDataTable renders table with completely empty columns removed
<tr>
<td
colspan="3"
rowspan="2"
rowspan="3"
/>
<th
colspan="4"
rowspan="1"
scope="colgroup"
>
First language
</th>
</tr>
<tr>
<th
colspan="3"
rowspan="1"
Expand Down Expand Up @@ -525,7 +534,7 @@ exports[`TimePeriodDataTable renders table with completely empty rows removed 1`
>
<tr>
<td
colspan="3"
colspan="4"
rowspan="2"
/>
<th
Expand Down Expand Up @@ -570,6 +579,14 @@ exports[`TimePeriodDataTable renders table with completely empty rows removed 1`
>
Coventry
</th>
<th
class=""
colspan="1"
rowspan="2"
scope="rowgroup"
>
First language
</th>
<th
class=""
colspan="1"
Expand Down Expand Up @@ -636,6 +653,14 @@ exports[`TimePeriodDataTable renders table with completely empty rows removed 1`
>
Croydon
</th>
<th
class=""
colspan="1"
rowspan="4"
scope="rowgroup"
>
First language
</th>
<th
class=""
colspan="1"
Expand Down Expand Up @@ -981,8 +1006,17 @@ exports[`TimePeriodDataTable renders table with only one of each option 1`] = `
<tr>
<td
colspan="1"
rowspan="1"
rowspan="2"
/>
<th
colspan="1"
rowspan="1"
scope="colgroup"
>
Ethnic group major
</th>
</tr>
<tr>
<th
colspan="1"
rowspan="1"
Expand Down Expand Up @@ -1110,8 +1144,17 @@ exports[`TimePeriodDataTable renders table with two of every option 1`] = `
<tr>
<td
colspan="3"
rowspan="2"
rowspan="3"
/>
<th
colspan="4"
rowspan="1"
scope="colgroup"
>
Ethnic group major
</th>
</tr>
<tr>
<th
colspan="2"
rowspan="1"
Expand Down Expand Up @@ -1463,8 +1506,17 @@ exports[`TimePeriodDataTable renders table without indicators when there is only
<tr>
<td
colspan="2"
rowspan="2"
rowspan="3"
/>
<th
colspan="4"
rowspan="1"
scope="colgroup"
>
Ethnic group major
</th>
</tr>
<tr>
<th
colspan="2"
rowspan="1"
Expand Down Expand Up @@ -1664,8 +1716,17 @@ exports[`TimePeriodDataTable renders table without time period when there is onl
<tr>
<td
colspan="2"
rowspan="1"
rowspan="2"
/>
<th
colspan="2"
rowspan="1"
scope="colgroup"
>
Ethnic group major
</th>
</tr>
<tr>
<th
colspan="1"
rowspan="1"
Expand Down
Loading

0 comments on commit 90d635c

Please sign in to comment.