Skip to content

Commit

Permalink
remove troublesome deprecated queries
Browse files Browse the repository at this point in the history
  • Loading branch information
JCQuintas committed Oct 8, 2024
1 parent ccb3dd5 commit 9e3c284
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions packages-internal/test-utils/src/createRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
cleanup,
prettyDOM,
queries,
queryHelpers,
RenderResult,
act as rtlAct,
fireEvent as rtlFireEvent,
Expand Down Expand Up @@ -193,49 +192,13 @@ const [
},
);

const queryAllByMuiTest = queryHelpers.queryAllByAttribute.bind(null, 'data-mui-test');
const [queryByMuiTest, getAllByMuiTest, getByMuiTest, findAllByMuiTest, findByMuiTest] =
buildQueries(
queryAllByMuiTest,
function getMultipleError(container, dataMuiTest) {
return `Found multiple elements with the data-mui-test attribute of: ${dataMuiTest}`;
},
function getMissingError(container, dataMuiTest) {
return `Found no element with the data-mui-test attribute of: ${dataMuiTest}`;
},
);

const customQueries = {
queryDescriptionOf,
queryAllDescriptionsOf,
getDescriptionOf,
getAllDescriptionsOf,
findDescriptionOf,
findAllDescriptionsOf,
/**
* @deprecated Use `queryAllByTestId` instead
*/
queryAllByMuiTest,
/**
* @deprecated Use `queryByTestId` instead
*/
queryByMuiTest,
/**
* @deprecated Use `getAllByTestId` instead
*/
getAllByMuiTest,
/**
* @deprecated Use `getByTestId` instead
*/
getByMuiTest,
/**
* @deprecated Use `findAllByTestId` instead
*/
findAllByMuiTest,
/**
* @deprecated Use `findByTestId` instead
*/
findByMuiTest,
};

interface RenderConfiguration {
Expand Down

0 comments on commit 9e3c284

Please sign in to comment.