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

update react-ui & storybook deps #83

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion db-viewer-ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import "./react-selenium-testing";

Check failure on line 1 in db-viewer-ui/index.tsx

View workflow job for this annotation

GitHub Actions / test

Replace `⏎import·"./react-selenium-prep"` with `import·"./react-selenium-prep";`
import "./react-selenium-prep"
import "@skbkontur/react-selenium-testing";

import React from "react";
import ReactDom from "react-dom";
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
Expand Down
19 changes: 10 additions & 9 deletions db-viewer-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@
"tslib": "^2.3.0"
},
"devDependencies": {
"@skbkontur/icons": "^1.3.0",
"@skbkontur/react-ui": "^4.1.0",
"@storybook/addon-actions": "^7.0.7",
"@storybook/addons": "^7.0.7",
"@storybook/cli": "^7.4.6",
"@storybook/react": "^7.0.7",
"@storybook/react-vite": "^7.4.6",
"@types/lodash": "^4.14.171",
"@skbkontur/icons": "^1.7.3",
"@skbkontur/react-selenium-testing": "^0.2.1",
"@skbkontur/react-ui": "^4.19.0",
"@storybook/addon-actions": "^7.6.8",
"@storybook/addons": "^7.6.8",
"@storybook/cli": "^7.6.8",
"@storybook/react": "^7.6.8",
"@storybook/react-vite": "^7.6.8",
"@types/lodash": "^4.14.202",
"@types/react": "^17.0.15",
"@types/react-dom": "^17.0.15",
"@types/react-router": "^5.1.16",
Expand All @@ -85,7 +86,7 @@
"react-refresh": "^0.10.0",
"react-router-dom": "^6.11.1",
"rimraf": "^3.0.2",
"storybook-addon-react-router-v6": "^2.0.7",
"storybook-addon-react-router-v6": "^2.0.10",
"typescript": "^4.3.5",
"vite": "^4.4.9",
"vitest": "^0.30.1"
Expand Down
30 changes: 30 additions & 0 deletions db-viewer-ui/react-selenium-prep.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type { ReactSeleniumTestingType } from "@skbkontur/react-selenium-testing";

window.global ||= window;

const customization: ReactSeleniumTestingType = {
attributeWhiteList: {
error: [/.*/],
warning: [/.*/],
disabled: [/.*/],
"data-page-number": [/.*/],
disablePortal: ["ComboBoxRenderer"],
checked: [/.*/],
items: ["RadioGroup"],
value: [/Input|Textarea|RadioGroup|FilteredInput/],
activePage: ["Paging"],
pagesCount: ["Paging"],
trigger: [/Tooltip|ValidationTooltip|ValidationWrapper|ValidationWrapperV1/],
active: [/.*/],
className: [/.*/],
"data-active": [/.*/],
},
acceptAttribute: (prevAcceptResult, componentName, propName) => {
if (componentName === "Select" && propName === "items") {
return true;
}
return prevAcceptResult;
},
};

(window as any).ReactSeleniumTesting = customization;

Check failure on line 30 in db-viewer-ui/react-selenium-prep.ts

View workflow job for this annotation

GitHub Actions / test

Insert `⏎`
Loading
Loading