Skip to content

Commit

Permalink
Update datatable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWags committed Mar 5, 2024
1 parent 8c3e0da commit 80c38b2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 1 addition & 7 deletions e2e-tests/datatable.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,7 @@ test('Datatable', async ({ page }) => {
// //////////////////
// Test that the tables exist
// //////////////////
// const datatable = await page1.getByText('IntersectionSizeSchool Male3Unincluded3Just Male3Duff_Fan Male Power_Plant3Evil Male2Evil Male Power_Plant2Duff_Fan Male2Just Blue_Hair2Just School1School Evil Male1Rows per page:101–10 of');
// await expect(datatable).toBeVisible();
// const visibleSets = await page1.getByText('SetSizeSchool6Blue_Hair3Duff_Fan6Evil6Male18Power_Plant5Rows per page:101–6 of');
// await expect(visibleSets).toBeVisible();
// const hiddenSets = await page1.getByText('No rowsSetSizeRows per page:100–0 of');
// await expect(hiddenSets).toBeVisible();
const datatable = await page1.getByText('IntersectionSizeSchool-Male3Unincluded3Male3Duff Fan-Male-Power Plant3Evil-Male2Evil-Male-Power Plant2Duff Fan-Male2Blue Hair2School1School-Evil-Male1Rows per page:101–10 of');
const datatable = await page1.getByText('IntersectionSizeSchool & Male3Unincluded3Male3Duff Fan & Male & Power Plant3Evil & Male2Evil & Male & Power Plant2Duff Fan & Male2Blue Hair2School1School & Evil & Male1Rows per page:101–10 of');
await expect(datatable).toBeVisible();
const visibleSets = await page1.getByText('SetSizeSchool6Blue_Hair3Duff_Fan6Evil6Male18Power_Plant5Rows per page:101–6 of');
await expect(visibleSets).toBeVisible();
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getAccessibleData } from "@visdesignlab/upset2-react";
import DownloadIcon from '@mui/icons-material/Download';

const getRowData = (row: AccessibleDataEntry) => {
return {id: row.id, elementName: `${(row.type === "Aggregate") ? "Aggregate: " : ""}${row.elementName}`, size: row.size}
return {id: row.id, elementName: `${(row.type === "Aggregate") ? "Aggregate: " : ""}${row.elementName.replaceAll("~&~", " & ")}`, size: row.size}
}

const getAggRows = (row: AccessibleDataEntry) => {
Expand Down
2 changes: 0 additions & 2 deletions packages/upset/src/utils/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ const generateElementName = (rows: Rows, vSetNames: string[]): Rows => {
export const getAltTextConfig = (state: UpsetConfig, data: CoreUpsetData, rows: Rows): AltTextConfig => {
let dataObj = state as AltTextConfig;

console.log(rows.order);

const updatedRows = generateElementName(rows, dataObj.visibleSets);

dataObj = {
Expand Down

0 comments on commit 80c38b2

Please sign in to comment.