Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Remove data-mui-test from tests #23498

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Nov 13, 2020

Only targets /core for now which doesn't need data-mui-test anymore. We can use data-testid in tests instead.

Part of #23488

@eps1lon eps1lon added the test label Nov 13, 2020
@@ -268,12 +268,12 @@ describe('<DateRangePicker />', () => {
open
renderInput={defaultRangeRenderInput}
onChange={() => {}}
renderDay={(day) => <div key={String(day)} data-mui-test="renderDayCalled" />}
renderDay={(day) => <div key={String(day)} data-testid="renderDayCalled" />}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only change touching pickers since I didn't need to alter pickers implementation

@mui-pr-bot
Copy link

mui-pr-bot commented Nov 13, 2020

Details of bundle changes

Generated by 🚫 dangerJS against 4a29e94

@@ -27,7 +27,7 @@ describe('<Backdrop />', () => {

it('should render a backdrop div with content of nested children', () => {
const { container } = render(
<Backdrop open className="woofBackdrop">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by removal of unused props

expect(onClose.callCount).to.equal(0);
});

it('should spread custom props on the modal root node', () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by removal of a duplicate test (describeConformance covers this case).

@@ -487,9 +488,11 @@ describe('<Popover />', () => {
});

expectPopover = (top, left) => {
expect(popoverEl.style.top).to.equal(`${top}px`);
expect(popoverEl).toHaveInlineStyle({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated refactor while I was working with the test.

@eps1lon eps1lon merged commit b750c32 into mui:next Nov 13, 2020
@eps1lon eps1lon deleted the test/data-mui-test-reduction branch November 13, 2020 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants