Skip to content

Commit

Permalink
Add test for tables that have multiple tbodies and associated theads.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeWannacott committed May 26, 2023
1 parent cd459e1 commit 38a0662
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/missingTableTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function createTestTableNoMissingTags(testTableData, classTags = "") {
</html>`);

// Call tablesort and make table sortable and simulate click from a user.
tableSortJs((testing = true), tableWithHeadAndBody.window.document);
tableSortJs(true, tableWithHeadAndBody.window.document);
tableWithHeadAndBody.window.document.querySelector("table th").click();
// Make an array from table contents to test if sorted correctly.
let table = tableWithHeadAndBody.window.document.querySelector("table");
Expand Down Expand Up @@ -68,7 +68,7 @@ function createTestTableMissingHeadTag(testTableData, classTags = "") {
</html>`);

// Call tablesort and make table sortable and simulate click from a user.
tableSortJs((testing = true), tableWithMissingHeadTag.window.document);
tableSortJs(true, tableWithMissingHeadTag.window.document);
tableWithMissingHeadTag.window.document.querySelector("table th").click();
// Make an array from table contents to test if sorted correctly.
let table = tableWithMissingHeadTag.window.document.querySelector("table");
Expand Down Expand Up @@ -106,7 +106,7 @@ function createTestTableMissingBodyTag(testTableData, classTags = "") {
</html>`);

// Call tablesort and make table sortable and simulate click from a user.
tableSortJs((testing = true), tablewithMissingBodyTag.window.document);
tableSortJs(tablewithMissingBodyTag.window.document);
tablewithMissingBodyTag.window.document.querySelector("table th").click();
// Make an array from table contents to test if sorted correctly.
let table = tablewithMissingBodyTag.window.document.querySelector("table");
Expand Down Expand Up @@ -142,7 +142,7 @@ function createTestTableMissingBodyAndHeadTag(testTableData, classTags = "") {
</html>`);

// Call tablesort and make table sortable and simulate click from a user.
tableSortJs((testing = true), tableWithMissingBodyAndHeadTag.window.document);
tableSortJs(true, tableWithMissingBodyAndHeadTag.window.document);
tableWithMissingBodyAndHeadTag.window.document
.querySelector("table th")
.click();
Expand Down Expand Up @@ -205,7 +205,7 @@ function createTestTableMultipleTBodies(
</body>
</html>`);
// Call tablesort and make table sortable and simulate click from a user.
tableSortJs((testing = true), tableWithMultipleTableBodies.window.document);
tableSortJs(true, tableWithMultipleTableBodies.window.document);
const tableTH =
tableWithMultipleTableBodies.window.document.querySelectorAll("table th");
for (let th of tableTH) {
Expand Down

0 comments on commit 38a0662

Please sign in to comment.