Comments (7)
Hi @benparks1976, the tests are green on my side with the example code you provided. I've noticed you are using node 14
, which doesn't support the array.at()
function. I would suggest upgrading your node to a more recent version, at
is available from 16.6
.
Otherwise you could also add a polyfill. eg: https://www.npmjs.com/package/array.prototype.at
from mui-x.
Hey @benparks1976 ... my colleague @JCQuintas noticed that you were using the old syntax.
If you change the code in your example to this it should work:
import React from "react";
import Demo from "../demo";
import { render } from "@testing-library/react";
describe("when rendering the data grid", () => {
it("should render the table columns", async () => {
const {findAllByRole} = render(<Demo/>)
const headers = await findAllByRole("columnheader")!;
expect(headers[1].textContent).toBe("Serial number");
expect(headers[2].textContent).toBe("Model name");
});
})
Could you try that please?
from mui-x.
Hi, thanks for the follow up. I tried your suggestion and I still got the same issue:
from mui-x.
Did you try a fresh install?
from mui-x.
Thanks @JCQuintas, this is the problem. Thanks all for your help.
from mui-x.
Closing...
from mui-x.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
@benparks1976: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.
from mui-x.
Related Issues (20)
- [Tree View] SimpleTreeView keyboard navigation is broken with React 17 HOT 1
- [data grid] How to Use Render Cell for Default Group Column Without Affecting Its Functionality? HOT 1
- Issue with Date / Time pickers v5.0.20 HOT 1
- [data grid] Multi Column Sort Indicator Cut off when Column is narrow HOT 2
- [docs] DataGrid columns code hidden behind `useDemoData`
- [data grid] Unable to use Multiple Filter option HOT 5
- [data grid] `GridFilterInputMultipleValue`'s prop types are incorrectly typed HOT 3
- [data grid] Aggregation not working in Data Grid Premium v6 in IOS17 Version HOT 5
- [data grid] multiple data sets state management & filtering HOT 12
- [tree view] Can't use `itemId` with escaping characters in `SimpleTreeView` HOT 6
- [data grid] Toolbar button `slotProps` get overwritten by `slotProps.baseButton`
- [charts] Separate tick labels vs data labels for bar charts HOT 4
- [data grid] Save and restore filtermodels HOT 1
- [charts][core] Replace useIsomorphicLayoutEffect of @react-spring/web for Base UI's helper HOT 5
- [data grid] Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release HOT 3
- [pickers] Issue with JAWS on DateTimePicker component v5.0.20 HOT 1
- [data grid] Columns selection component losing anchorElement/scroll state HOT 5
- [data grid] Lazy loading details when using Master detail feature HOT 4
- [pickers] How to customize the `DatePicker` calendar header? HOT 2
- [data grid] License works locally but not on Vercel production HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mui-x.