Closed GomezIvann closed 1 year ago
Describe the bug The library nwsapi has been updated to version 2.2.5 and it's throwing a new error when testing the DxcDialog.
nwsapi
DxcDialog
To Reproduce Include steps to reproduce the behaviour.
Example:
create-react-app
@dxc-technology\halstack-react
Implement a quick App using the DxcDialog.
() => { const [isDialogVisible, setDialogVisible] = useState(false); const handleClick = () => { setDialogVisible(!isDialogVisible); }; return ( <DxcInset space="2rem"> <DxcButton label="Enter your data" onClick={handleClick}></DxcButton> {isDialogVisible && ( <DxcDialog onCloseClick={handleClick}> Please enter your personal information. </DxcDialog> )} </DxcInset> ); }
test("renders learn react link", async () => { const { getByText } = render(<App />); fireEvent.click(getByText("Enter your data")); expect(getByText("Please enter your personal information.")).toBeTruthy(); });
npm test
Screenshots
Describe the bug The library
nwsapi
has been updated to version 2.2.5 and it's throwing a new error when testing theDxcDialog
.To Reproduce Include steps to reproduce the behaviour.
Example:
create-react-app
.@dxc-technology\halstack-react
dependencies and run the app.Implement a quick App using the
DxcDialog
.npm test
.Screenshots