Skip to content

Commit

Permalink
fix: jsdom and playwright mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSinclair committed Jul 31, 2024
1 parent a720c5b commit 4c2bf53
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 177 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@
"@commitlint/config-conventional": "^18.4.3",
"@lavamoat/preinstall-always-fail": "^2.0.0",
"@tanstack/react-query": "^5.51.11",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^18.19.3",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
Expand All @@ -62,7 +60,6 @@
"esbuild-plugin-replace": "^1.4.0",
"ethers": "^5.6.8",
"husky": "^8.0.3",
"jsdom": "^23.0.1",
"lokijs": "^1.5.12",
"next": "^14.2.3",
"next-auth": "4.24.5",
Expand Down
3 changes: 0 additions & 3 deletions packages/rainbowkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,12 @@
"wagmi": "^2.9.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.2",
"@types/qrcode": "^1.5.5",
"@types/ua-parser-js": "^0.7.39",
"@vanilla-extract/css-utils": "0.1.3",
"@vanilla-extract/private": "^1.0.3",
"autoprefixer": "^10.4.16",
"jsdom": "^23.0.1",
"nock": "^13.4.0",
"postcss": "^8.4.32",
"react": "^18.3.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import user from '@testing-library/user-event';
import { userEvent } from '@vitest/browser/context';
import React, { Fragment } from 'react';
import { describe, expect, it } from 'vitest';
import { useConnect } from 'wagmi';
Expand Down Expand Up @@ -41,7 +41,7 @@ describe('<ChainModal />', () => {

const connectButtonOption = await modal.findByTestId('rk-connect-btn');

await user.click(connectButtonOption);
await userEvent.click(connectButtonOption);

return modal;
};
Expand Down Expand Up @@ -99,7 +99,7 @@ describe('<ChainModal />', () => {
expect(mainnetOption).toHaveTextContent('Connected');
expect(arbitrumOption).not.toHaveTextContent('Connected');

await user.click(arbitrumOption);
await userEvent.click(arbitrumOption);

expect(mainnetOption).not.toHaveTextContent('Connected');
expect(arbitrumOption).toHaveTextContent('Connected');
Expand All @@ -116,7 +116,7 @@ describe('<ChainModal />', () => {

const closeButton = await modal.findByLabelText('Close');

await user.click(closeButton);
await userEvent.click(closeButton);

expect(onCloseGotCalled).toBe(true);
});
Expand Down
7 changes: 0 additions & 7 deletions packages/rainbowkit/test/setup.ts

This file was deleted.

Loading

0 comments on commit 4c2bf53

Please sign in to comment.