Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import * as React from 'react';
|
|
import { expect } from 'chai';
|
|
import { createRenderer, screen } from '@mui/internal-test-utils';
|
|
import TableFooter from '@mui/material/TableFooter';
|
|
import TableHead from '@mui/material/TableHead';
|
|
import TableRow, { tableRowClasses as classes } from '@mui/material/TableRow';
|
|
|
|
describe('<TableRow> integration', () => {
|
|
const { render } = createRenderer();
|
|
|
|
it('should render with the head class when in the context of a table head', () => {
|
|
render(
|
|
<table>
|
|
<TableHead>
|
|
<TableRow />
|
|
</TableHead>
|
|
</table>,
|
|
);
|
|
|
|
expect(screen.getByRole('row')).to.have.class(classes.root);
|
|
expect(screen.getByRole('row')).to.have.class(classes.head);
|
|
});
|
|
|
|
it('should render with the footer class when in the context of a table footer', () => {
|
|
render(
|
|
<table>
|
|
<TableFooter>
|
|
<TableRow />
|
|
</TableFooter>
|
|
</table>,
|
|
);
|
|
|
|
expect(screen.getByRole('row')).to.have.class(classes.root);
|
|
expect(screen.getByRole('row')).to.have.class(classes.footer);
|
|
});
|
|
});
|