Sha256: d1bc4469e4f3219d9ba6ba7ebf0a75a7bc9d02dac65a982835601bbf773a40e6

Contents?: true

Size: 1.03 KB

Versions: 13

Compression:

Stored size: 1.03 KB

Contents

import React from "react";
import { render, screen } from "../utilities/test-utils";

import { AdvancedTable } from "../";

const MOCK_DATA = [
  {
    year: "2021",
    quarter: null,
    month: null,
    day: null,
    newEnrollments: "20",
    scheduledMeetings: "10",
    children: [
      {
        year: "2011",
        quarter: "Q1",
        month: null,
        day: null,
        newEnrollments: "2",
        scheduledMeetings: "35",
      },
    ],
  },
];

const columnDefinitions = [
  {
    accessor: "year",
    label: "Year",
    cellAccessors: ["quarter", "month", "day"],
  },
  {
    accessor: "newEnrollments",
    label: "New Enrollments",
  },
  {
    accessor: "scheduledMeetings",
    label: "Scheduled Meetings",
  },
];

const testId = "advanced_table";

test("generated scaffold test", () => {
  render(
    <AdvancedTable
        columnDefinitions={columnDefinitions}
        data={{ testid: testId }}
        tableData={MOCK_DATA}
    />
  );

  const kit = screen.getByTestId(testId);
  expect(kit).toBeInTheDocument();
});

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2130 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PLAY12002127 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.powercentrainplaybookpt22125 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2107 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR181stripedtable2103 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.play1141iconkitusinglibrary2100 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR184betaflaginmenuyml2085 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR178AdvancedTableDocs2072 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.17.0 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2035 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2034 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2023 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
playbook_ui-13.16.0.pre.alpha.PBNTR177NewAdvancedTableKit2010 app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx