Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
[terra-table] Add sections to the Terra Table component (#1852)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm9361 authored Nov 9, 2023
1 parent 44cc333 commit 0cdf151
Show file tree
Hide file tree
Showing 44 changed files with 49,927 additions and 42,671 deletions.
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/terra-data-grid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* Added
* Added ability to select a range of cells to FlowsheetDataGrid.

* Changed
* Updated unit test to account for generated ids of `terra-table` elements.

## 1.0.0 - (October 25, 2023)
* Initial working component release.

Expand Down
3 changes: 3 additions & 0 deletions packages/terra-data-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"terra-table": "^5.1.1-alpha.0",
"terra-visually-hidden-text": "^2.36.0"
},
"devDependencies": {
"uuid": "3.4.0"
},
"scripts": {
"compile": "babel --root-mode upward src --out-dir lib --copy-files",
"lint": "npm run lint:js && npm run lint:scss",
Expand Down
4 changes: 4 additions & 0 deletions packages/terra-data-grid/tests/jest/DataGrid.test.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
/* eslint-disable-next-line import/no-extraneous-dependencies */
import { mountWithIntl, shallowWithIntl } from 'terra-enzyme-intl';
import { v4 as uuidv4 } from 'uuid';
import DataGrid from '../../src/DataGrid';
import ERRORS from '../../src/utils/constants';

Expand Down Expand Up @@ -54,14 +55,17 @@ const dataFile = {
],
};

let mockSpyUuid;
beforeAll(() => {
jest.spyOn(console, 'error').mockImplementation();
jest.spyOn(console, 'warn').mockImplementation();
mockSpyUuid = jest.spyOn(uuidv4, 'v4').mockReturnValue('00000000-0000-0000-0000-000000000000');
});

afterAll(() => {
console.error.mockRestore(); // eslint-disable-line no-console
console.warn.mockRestore(); // eslint-disable-line no-console
mockSpyUuid.mockRestore();
});

describe('DataGrid', () => {
Expand Down
4 changes: 4 additions & 0 deletions packages/terra-data-grid/tests/jest/WorklistDataGrid.test.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
/* eslint-disable-next-line import/no-extraneous-dependencies */
import { mountWithIntl } from 'terra-enzyme-intl';
import { v4 as uuidv4 } from 'uuid';
import WorklistDataGrid from '../../src/WorklistDataGrid';

// Source data for tests
Expand Down Expand Up @@ -53,9 +54,11 @@ const dataFile = {
],
};

let mockSpyUuid;
beforeAll(() => {
jest.spyOn(console, 'error').mockImplementation();
jest.spyOn(console, 'warn').mockImplementation();
mockSpyUuid = jest.spyOn(uuidv4, 'v4').mockReturnValue('00000000-0000-0000-0000-000000000000');
});

afterEach(() => {
Expand All @@ -66,6 +69,7 @@ afterEach(() => {
afterAll(() => {
console.error.mockRestore(); // eslint-disable-line no-console
console.warn.mockRestore(); // eslint-disable-line no-console
mockSpyUuid.mockRestore();
});

describe('WorklistDataGrid', () => {
Expand Down
Loading

0 comments on commit 0cdf151

Please sign in to comment.