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

feat: update storybook 7 and creevey, update webpack in validations, update TestPages #3417

Merged
merged 103 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
38a6f8b
feat: upgrade storybook to 7 version
HelenaIsh May 3, 2024
336d5bc
chore: delete stories
HelenaIsh May 3, 2024
7e33c4a
chore: fix Button stories
HelenaIsh May 3, 2024
78cffec
chore: refactor
HelenaIsh May 3, 2024
ba09215
chore: fix storybook config
HelenaIsh May 6, 2024
530e0a0
feat: update creevey
HelenaIsh May 6, 2024
7aeab71
chore: fix creevey config
HelenaIsh May 8, 2024
1ba37b3
chore: fix Button test
HelenaIsh May 8, 2024
89dcc02
chore: fix Button test
HelenaIsh May 8, 2024
067fb80
chore: fix Autocomplete test
HelenaIsh May 8, 2024
f5d225c
chore: fix Autocomplete test
HelenaIsh May 8, 2024
468197c
chore: fix baseline test
HelenaIsh May 8, 2024
4af759e
chore: fix Calendar test
HelenaIsh May 8, 2024
a51a273
chore: fix Center test
HelenaIsh May 8, 2024
8d7871f
chore: fix Checkbox test
HelenaIsh May 8, 2024
00ae528
chore: fix Combobox test
HelenaIsh May 8, 2024
af6b581
chore: fix CurrencyInput test
HelenaIsh May 8, 2024
e81effe
chore: fix CurrencyLabel test
HelenaIsh May 13, 2024
04fa17c
chore: rename static method in Select
HelenaIsh May 13, 2024
ed0d744
chore: fix DateInput test
HelenaIsh May 13, 2024
709b0bd
chore: fix DatePicker test
HelenaIsh May 13, 2024
0fe7a1b
chore: fix Dropdown test
HelenaIsh May 13, 2024
d7fc51d
chore: fix DropdownMenu test
HelenaIsh May 13, 2024
cccff29
chore: fix FileUploader test
HelenaIsh May 13, 2024
ef3399f
chore: fix FxInput test
HelenaIsh May 13, 2024
0af3607
chore: fix Gapped test
HelenaIsh May 13, 2024
00be7d6
chore: fix GlobalLoader test
HelenaIsh May 13, 2024
0bc33ad
chore: fix Group test
HelenaIsh May 13, 2024
c56fbe5
chore: fix Hint test
HelenaIsh May 13, 2024
c1a5efb
chore: fix Input test
HelenaIsh May 14, 2024
16d302f
chore: fix Kebab test
HelenaIsh May 14, 2024
753dcfe
chore: fix Link test
HelenaIsh May 14, 2024
cd2ed4b
chore: fix Loader test
HelenaIsh May 14, 2024
beff2c0
chore: fix MaskedInput test
HelenaIsh May 14, 2024
8c59154
chore: fix MenuFooter test
HelenaIsh May 14, 2024
de4bf51
chore: fix MenuHeader test
HelenaIsh May 14, 2024
c2458ea
chore: fix MenuItem test
HelenaIsh May 14, 2024
eb138e7
chore: fix MiniModal test
HelenaIsh May 14, 2024
058d57d
chore: fix Modal test
HelenaIsh May 14, 2024
4059d08
chore: fix Paging test
HelenaIsh May 14, 2024
00495ff
chore: fix PasswordInput test
HelenaIsh May 14, 2024
7d06d93
chore: fix Radio test
HelenaIsh May 14, 2024
8947b11
chore: fix RadioGroup test
HelenaIsh May 14, 2024
b5b7292
chore: fix ScrollContainer test
HelenaIsh May 14, 2024
c0b0005
chore: fix Select test
HelenaIsh May 14, 2024
3d825d4
chore: fix SidePage test
HelenaIsh May 15, 2024
1faee3a
chore: fix SingleToast test
HelenaIsh May 15, 2024
ef013ce
chore: fix Spinner test
HelenaIsh May 15, 2024
3978dc0
chore: fix Sticky test
HelenaIsh May 15, 2024
d284ad4
chore: fix Switcher test
HelenaIsh May 15, 2024
792d5fd
chore: fix Tabs test
HelenaIsh May 15, 2024
df16998
chore: fix Textarea test
HelenaIsh May 15, 2024
e54186c
chore: fix Toast test
HelenaIsh May 15, 2024
6281e81
chore: fix Toggle test
HelenaIsh May 15, 2024
34851f6
chore: fix Token test
HelenaIsh May 15, 2024
8e524d7
chore: fix TokenInput test
HelenaIsh May 15, 2024
9fe937d
chore: fix Tooltip test
HelenaIsh May 15, 2024
255a0b1
chore: fix TooltipMenu test
HelenaIsh May 15, 2024
456603d
chore: fix CloseButtonIcon test
HelenaIsh May 15, 2024
3429292
chore: fix ComboBoxView test
HelenaIsh May 15, 2024
35c428a
chore: fix FileUploaderFile test
HelenaIsh May 15, 2024
d6c2969
chore: fix HideBodyVerticalScroll test
HelenaIsh May 15, 2024
a02f11b
chore: fix IgnoreLayerClick test
HelenaIsh May 15, 2024
7e86260
chore: fix Menu test
HelenaIsh May 15, 2024
6957159
chore: fix PerformanceMetrics test
HelenaIsh May 15, 2024
d577793
chore: fix Popup test
HelenaIsh May 15, 2024
bfe3f42
chore: fix PopupMenu test
HelenaIsh May 15, 2024
7a2a58c
chore: fix ThemePlayground test
HelenaIsh May 15, 2024
8a33651
chore: fix ThemeShowcase test
HelenaIsh May 15, 2024
2c8a16c
chore: fix ZIndex test
HelenaIsh May 15, 2024
7e29711
chore: delete unused import
HelenaIsh May 15, 2024
9a7c97e
chore: rollback storybook version in validations
HelenaIsh May 15, 2024
ab39c44
chore: fix lint
HelenaIsh May 15, 2024
568fc21
chore: fix prettier
HelenaIsh May 15, 2024
d1e7fb4
chore: fix storySort
HelenaIsh May 16, 2024
1d2f15b
chore: fix yarn lock
HelenaIsh May 16, 2024
aa2f041
chore: fix creevey in validations
HelenaIsh May 16, 2024
f60990a
chore: fix yarn lock
HelenaIsh May 16, 2024
d2f2e3b
chore: update webpack in validations
HelenaIsh May 16, 2024
3bbc681
chore: fix yarn
HelenaIsh May 16, 2024
ec3bbb9
chore: ignore lint errors
HelenaIsh May 16, 2024
4ec3786
chore: remove unnecessary package
HelenaIsh May 16, 2024
6b73ce2
chore: update creevey
HelenaIsh May 16, 2024
db52e1b
chore: fix globalObject errors
HelenaIsh May 17, 2024
18f70de
chore: skip flaky firefox tests
HelenaIsh May 17, 2024
928732c
refactor: return pause instead of delay
HelenaIsh May 17, 2024
c2ded2f
chore: fix DatePicker test
HelenaIsh May 17, 2024
ca44f03
chore: remove unnecessary plugin
HelenaIsh May 17, 2024
18f4d46
chore: skip flaky firefox tests
HelenaIsh May 17, 2024
cc8c214
chore: fix storybook config
HelenaIsh May 17, 2024
28d534e
chore: skip flaky firefox tests
HelenaIsh May 17, 2024
3ba5979
chore: skip flaky firefox tests
HelenaIsh May 17, 2024
8498f6b
chore: update flaky screenshots
HelenaIsh May 17, 2024
a40d419
chore: update ComboBox screenshot
HelenaIsh May 20, 2024
6bde133
chore: fix DateInput test
HelenaIsh May 20, 2024
e2cdd65
chore: fix flaky ComboBox tests
HelenaIsh May 20, 2024
ce40c25
chore: fix yarn lock
HelenaIsh May 20, 2024
dd67654
chore: try to fix selenium
HelenaIsh May 21, 2024
4c57e23
chore: fix
HelenaIsh May 21, 2024
3360406
chore: remove icons
HelenaIsh May 21, 2024
ab24131
chore: return icons
HelenaIsh May 21, 2024
f81e37a
chore: fix global object
HelenaIsh May 22, 2024
5beff3a
chore: fix global object
HelenaIsh May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 17 additions & 17 deletions packages/react-ui-testing/TestPages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@
"private": true,
"scripts": {
"postinstall": "node install.js",
"start": "yarn webpack-dev-server -w -d",
"start": "webpack serve --watch --mode development",
"print-versions": "node print-versions.js"
},
"dependencies": {
"@babel/core": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-react": "^7.16.5",
"@types/react": "^17.0.37",
"babel-loader": "^8.2.3",
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"@babel/preset-react": "^7.24.1",
"@types/react": "^18.3.2",
"babel-loader": "^9.1.3",
"babel-polyfill": "^6.26.0",
"cross-env": "^7.0.3",
"css": "^3.0.0",
"css-loader": "^5.2.7",
"css-loader": "^7.1.1",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.2",
"less": "4.1.1",
"less-loader": "7.3.0",
"html-webpack-plugin": "5.6.0",
"less": "4.2.0",
"less-loader": "12.2.0",
"modify-babel-preset": "^3.2.1",
"prop-types": "^15.7.2",
"react-router": "^5.2.0",
"prop-types": "^15.8.1",
"react-router": "^6.23.1",
"script-loader": "^0.7.2",
"semver": "^7.5.2",
"semver": "^7.6.2",
"shelljs": "^0.8.5",
"style-loader": "^2.0.0",
"styled-components": "^5.2.1",
"webpack": "^4.41.2",
"webpack-dev-server": "^3.11.0"
"style-loader": "^4.0.0",
"styled-components": "^6.1.11",
"webpack": "^5.91.0",
"webpack-dev-server": "^5.0.4"
}
}
67 changes: 29 additions & 38 deletions packages/react-ui-testing/TestPages/src/ReactTestApplication.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Router, Route, Switch } from 'react-router';
import { createBrowserHistory } from 'history';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';

import Layout from './components/Layout';
import TestPage from './components/TestPage';
Expand Down Expand Up @@ -36,46 +35,38 @@ import './styles/typography.less';
import AutocompleteTestPage from './components/TestPages/AutocompleteTestPage';
import ToastTestPage from './components/TestPages/ToastTestPage';
import ToggleTestPage from './components/TestPages/ToggleTestPage';
import SwitcherTestPage from "./components/TestPages/SwitcherTestPage";

const customHistory = createBrowserHistory();
const basePath = process.env.baseUrl + '/';
import SwitcherTestPage from './components/TestPages/SwitcherTestPage';

// eslint-disable-next-line import/no-default-export
export default function ReactTestApplication() {
return (
<Router history={customHistory}>
<Route
path={basePath}
render={({ match: { url } }) => (
<Layout>
<Switch>
<Route path={`${url}/TestPage`} component={TestPage} />
<Route path={`${url}/Input`} component={InputTestPage} />
<Route path={`${url}/Lists`} component={ListsTestPage} />
<Route path={`${url}/Modals`} component={ModalsTestPage} />
<Route path={`${url}/ComboBoxes`} component={ComboBoxTestPage} />
<Route path={`${url}/Select`} component={SelectTestPage} />
<Route path={`${url}/DatePicker`} component={DatePickerTestPage} />
<Route path={`${url}/Button`} component={ButtonTestPage} />
<Route path={`${url}/CheckBox`} component={CheckBoxTestPage} />
<Route path={`${url}/Link`} component={LinkTestPage} />
<Route path={`${url}/RadioGroup`} component={RadioGroupTestPage} />
<Route path={`${url}/Radio`} component={RadioTestPage} />
<Route path={`${url}/Textarea`} component={TextAreaTestPage} />
<Route path={`${url}/Tooltip`} component={TooltipTestPage} />
<Route path={`${url}/ExposeTidToDom`} component={ExposeTidToDomTestPage} />
<Route path={`${url}/Kebab`} component={KebabTestPage} />
<Route path={`${url}/Paging`} component={PagingTestPage} />
<Route path={`${url}/SidePage`} component={SidePageTestPage} />
<Route path={`${url}/Autocomplete`} component={AutocompleteTestPage} />
<Route path={`${url}/Toast`} component={ToastTestPage} />
<Route path={`${url}/Toggle`} component={ToggleTestPage} />
<Route path={`${url}/Switcher`} component={SwitcherTestPage} />
</Switch>
</Layout>
)}
></Route>
<Router basename={process.env.baseUrl}>
<Layout>
<Routes>
<Route path="TestPage" element={<TestPage />} />
<Route path="Input" element={<InputTestPage />} />
<Route path="/Lists" element={<ListsTestPage />} />
<Route path="/Modals" element={<ModalsTestPage />} />
<Route path="/ComboBoxes" element={<ComboBoxTestPage />} />
<Route path="/Select" element={<SelectTestPage />} />
<Route path="/DatePicker" element={<DatePickerTestPage />} />
<Route path="/Button" element={<ButtonTestPage />} />
<Route path="/CheckBox" element={<CheckBoxTestPage />} />
<Route path="/Link" element={<LinkTestPage />} />
<Route path="/RadioGroup" element={<RadioGroupTestPage />} />
<Route path="/Radio" element={<RadioTestPage />} />
<Route path="/Textarea" element={<TextAreaTestPage />} />
<Route path="/Tooltip" element={<TooltipTestPage />} />
<Route path="/ExposeTidToDom" element={<ExposeTidToDomTestPage />} />
<Route path="/Kebab" element={<KebabTestPage />} />
<Route path="/Paging" element={<PagingTestPage />} />
<Route path="/SidePage" element={<SidePageTestPage />} />
<Route path="/Autocomplete" element={<AutocompleteTestPage />} />
<Route path="/Toast" element={<ToastTestPage />} />
<Route path="/Toggle" element={<ToggleTestPage />} />
<Route path="/Switcher" element={<SwitcherTestPage />} />
</Routes>
</Layout>
</Router>
);
}
44 changes: 27 additions & 17 deletions packages/react-ui-testing/TestPages/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const reactUiPath = path.resolve(__dirname, '../../react-ui/build');
const { versions, reactUiLocalVersionStub } = require('./versions');

const versionsDependencies = versions.map(x => Object.keys(x.dependencies)).reduce((a, c) => a.concat(c), []);
const versionsDependencies = versions.map((x) => Object.keys(x.dependencies)).reduce((a, c) => a.concat(c), []);

const dependencies = ['react', '@skbkontur/react-ui', ...new Set(versionsDependencies)];

Expand All @@ -23,7 +23,6 @@ function createConfig(reactVersion, reactUIVersion) {
return {
entry: {
[`index_${reactVersion}_${reactUIVersion}`]: [
'babel-polyfill',
'./react-selenium-testing-custom-props.js',
'../react-selenium-testing.js',
`./${targetDir}/index.js`,
Expand All @@ -37,29 +36,35 @@ function createConfig(reactVersion, reactUIVersion) {
module: {
rules: [
{
test: /\.(css)$/,
loaders: ['style-loader', 'css-loader'],
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: {
namedExport: false,
},
},
},
],
},
{
test: /\.(less)$/,
loaders: ['style-loader', 'css-loader', 'less-loader'],
use: ['style-loader', 'css-loader', 'less-loader'],
},
{
test: /\.(woff|eot|png|gif|ttf|woff2)$/,
loader: 'file-loader',
use: 'file-loader',
},
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
babelrc: false,
// presets: [
// require.resolve('babel-preset-react'),
// require.resolve('babel-preset-es2015'),
// require.resolve('babel-preset-stage-0'),
// ],
presets: ['@babel/preset-react', '@babel/preset-env'],
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-react', '@babel/preset-env'],
},
},
},
],
Expand All @@ -70,6 +75,7 @@ function createConfig(reactVersion, reactUIVersion) {
},
plugins: [
new webpack.DefinePlugin({
'process.env.retailUIVersion': JSON.stringify(process.env.RETAIL_UI_VERSION),
'process.env.enableReactTesting': JSON.stringify(true),
'process.env.hasKebab': JSON.stringify(semver.satisfies(reactUIVersion, '>=0.9.0')),
'process.env.hasPaging': JSON.stringify(semver.satisfies(reactUIVersion, '>=0.9.0')),
Expand All @@ -84,16 +90,20 @@ function createConfig(reactVersion, reactUIVersion) {
}),
],
devServer: {
static: {
directory: path.join(__dirname, 'dist'),
},
host: '0.0.0.0',
port: 8083,
historyApiFallback: {
rewrites: versions.map(version => ({
rewrites: versions.map((version) => ({
from: new RegExp(`^/${version['react']}/${version['@skbkontur/react-ui']}/.*`),
to: `/${version['react']}/${version['@skbkontur/react-ui']}/index.html`,
})),
},
hot: true,
},
};
}

module.exports = versions.map(version => createConfig(version['react'], version['@skbkontur/react-ui']));
module.exports = versions.map((version) => createConfig(version['react'], version['@skbkontur/react-ui']));
Loading