From aef25594530d9f99d812ec8507b7cc53ded3dacb Mon Sep 17 00:00:00 2001 From: "Mason, Steven" Date: Tue, 10 Oct 2023 11:07:17 -0500 Subject: [PATCH] Add test case --- .../terra-data-grid/tests/jest/Cell.test.jsx | 25 ++++++++++ .../jest/__snapshots__/Cell.test.jsx.snap | 46 +++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/packages/terra-data-grid/tests/jest/Cell.test.jsx b/packages/terra-data-grid/tests/jest/Cell.test.jsx index c6d87900508..3e12cf6fe34 100644 --- a/packages/terra-data-grid/tests/jest/Cell.test.jsx +++ b/packages/terra-data-grid/tests/jest/Cell.test.jsx @@ -141,6 +141,31 @@ describe('Cell', () => { expect(wrapper).toMatchSnapshot(); }); + it('verifies that the cell rendered is marked blank when the cell content is empty and isRowHeader is true', () => { + const wrapper = shallowWithIntl( + + + , + ).dive().dive(); + + const blankCell = wrapper.find('th.blank'); + expect(blankCell).toHaveLength(1); + + const cellContent = blankCell.find('div'); + expect(cellContent.text()).toBe('Terra.dataGrid.blank'); + + expect(wrapper).toMatchSnapshot(); + }); + it('verifies that a selected cell has the correct styles when isSelected prop is true', () => { const wrapper = shallowWithIntl( diff --git a/packages/terra-data-grid/tests/jest/__snapshots__/Cell.test.jsx.snap b/packages/terra-data-grid/tests/jest/__snapshots__/Cell.test.jsx.snap index a8eb52bc757..64256bfead6 100644 --- a/packages/terra-data-grid/tests/jest/__snapshots__/Cell.test.jsx.snap +++ b/packages/terra-data-grid/tests/jest/__snapshots__/Cell.test.jsx.snap @@ -401,6 +401,52 @@ exports[`Cell verifies that the cell rendered is marked blank when the cell cont `; +exports[`Cell verifies that the cell rendered is marked blank when the cell content is empty and isRowHeader is true 1`] = ` + + +
+ + Terra.dataGrid.blank + +
+
+ +`; + exports[`Cell verifies that the cell rendered is marked selectable when isSelectable prop is true 1`] = `