Skip to content

Commit

Permalink
accept baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenengland committed Feb 22, 2024
1 parent 058062b commit c3137ab
Show file tree
Hide file tree
Showing 43 changed files with 234 additions and 202 deletions.
2 changes: 1 addition & 1 deletion test/baselines/ReleaseScript_JS/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@alcalzone/release-script-plugin-iobroker": "^3.7.0",
"@alcalzone/release-script-plugin-license": "^3.7.0",
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
"@iobroker/adapter-dev": "^1.2.0",
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/testing": "^4.1.0",
"chai-as-promised": "^7.1.1",
"chai": "^4.4.1",
Expand Down
8 changes: 4 additions & 4 deletions test/baselines/ReleaseScript_TS/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
"@alcalzone/release-script-plugin-iobroker": "^3.7.0",
"@alcalzone/release-script-plugin-license": "^3.7.0",
"@alcalzone/release-script-plugin-manual-review": "^3.7.0",
"@iobroker/adapter-dev": "^1.2.0",
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/testing": "^4.1.0",
"@tsconfig/node18": "^18.2.2",
"@types/chai": "^4.3.11",
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.15",
"@types/node": "^18.19.17",
"@types/proxyquire": "^1.3.31",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^3.2.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"chai-as-promised": "^7.1.1",
"chai": "^4.4.1",
"eslint": "^8.56.0",
Expand Down
8 changes: 4 additions & 4 deletions test/baselines/TS_Prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
"@iobroker/adapter-core": "^3.0.4"
},
"devDependencies": {
"@iobroker/adapter-dev": "^1.2.0",
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/testing": "^4.1.0",
"@tsconfig/node18": "^18.2.2",
"@types/chai": "^4.3.11",
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.15",
"@types/node": "^18.19.17",
"@types/proxyquire": "^1.3.31",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^3.2.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"chai-as-promised": "^7.1.1",
"chai": "^4.4.1",
"eslint": "^8.56.0",
Expand Down
9 changes: 5 additions & 4 deletions test/baselines/TS_SingleQuotes/admin/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react';
import { Theme, withStyles } from '@material-ui/core/styles';
import { withStyles } from '@mui/styles';
import { Theme } from '@mui/material/styles';

import GenericApp from '@iobroker/adapter-react/GenericApp';
import GenericApp from '@iobroker/adapter-react-v5/GenericApp';
import Settings from './components/settings';
import { GenericAppProps, GenericAppSettings } from '@iobroker/adapter-react/types';
import { StyleRules } from '@material-ui/core/styles';
import { GenericAppProps, GenericAppSettings } from '@iobroker/adapter-react-v5/types';
import { StyleRules } from '@mui/styles/withStyles';

const styles = (_theme: Theme): StyleRules => ({
root: {},
Expand Down
25 changes: 14 additions & 11 deletions test/baselines/TS_SingleQuotes/admin/src/components/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import { CreateCSSProperties } from '@material-ui/core/styles/withStyles';
import TextField from '@material-ui/core/TextField';
import Input from '@material-ui/core/Input';
import FormHelperText from '@material-ui/core/FormHelperText';
import FormControl from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';
import MenuItem from '@material-ui/core/MenuItem';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Checkbox from '@material-ui/core/Checkbox';
import I18n from '@iobroker/adapter-react/i18n';
import { withStyles } from '@mui/styles';
import { CreateCSSProperties } from '@mui/styles/withStyles';
import TextField from '@mui/material/TextField';
import Input from '@mui/material/Input';
import FormHelperText from '@mui/material/FormHelperText';
import FormControl from '@mui/material/FormControl';
import Select from '@mui/material/Select';
import MenuItem from '@mui/material/MenuItem';
import FormControlLabel from '@mui/material/FormControlLabel';
import Checkbox from '@mui/material/Checkbox';
import I18n from '@iobroker/adapter-react-v5/i18n';

const styles = (): Record<string, CreateCSSProperties> => ({
input: {
Expand Down Expand Up @@ -71,6 +71,7 @@ class Settings extends React.Component<SettingsProps, SettingsState> {
type={type || 'text'}
onChange={(e) => this.props.onChange(attr, e.target.value)}
margin="normal"
variant="standard"
/>
);
}
Expand All @@ -88,11 +89,13 @@ class Settings extends React.Component<SettingsProps, SettingsState> {
paddingTop: 5,
...style
}}
variant="standard"
>
<Select
value={this.props.native[attr] || '_'}
onChange={(e) => this.props.onChange(attr, e.target.value === '_' ? '' : e.target.value)}
input={<Input name={attr} id={attr + '-helper'} />}
variant="standard"
>
{options.map((item) => (
<MenuItem key={'key-' + item.value} value={item.value || '_'}>
Expand Down
28 changes: 15 additions & 13 deletions test/baselines/TS_SingleQuotes/admin/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { MuiThemeProvider } from '@material-ui/core/styles';
import theme from '@iobroker/adapter-react/Theme';
import Utils from '@iobroker/adapter-react/Components/Utils';
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';
import theme from '@iobroker/adapter-react-v5/Theme';
import Utils from '@iobroker/adapter-react-v5/Components/Utils';
import App from './app';

let themeName = Utils.getThemeName();

function build(): void {
function build(this: any): void {
ReactDOM.render(
<MuiThemeProvider theme={theme(themeName)}>
<App
adapterName="test-adapter"
onThemeChange={(_theme) => {
themeName = _theme;
build();
}}
/>
</MuiThemeProvider>,
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme(themeName)}>
<App
adapterName="test-adapter"
onThemeChange={(_theme) => {
themeName = _theme;
build();
}}
/>
</ThemeProvider>
</StyledEngineProvider>,
document.getElementById('root'),
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/baselines/TS_SingleQuotes/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Created with @iobroker/create-adapter v2.6.1
* Created with @iobroker/create-adapter v2.6.2
*/

// The adapter-core module gives you access to the core ioBroker functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
"type": "free",
"license": "MIT"
},
"creatorVersion": "2.6.1"
"creatorVersion": "2.6.2"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/*
* Created with @iobroker/create-adapter v2.6.1
* Created with @iobroker/create-adapter v2.6.2
*/

// The adapter-core module gives you access to the core ioBroker functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"@iobroker/adapter-core": "^3.0.4"
},
"devDependencies": {
"@iobroker/adapter-dev": "^1.2.0",
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/testing": "^4.1.0",
"@tsconfig/node18": "^18.2.2",
"@types/chai": "^4.3.11",
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.15",
"@types/node": "^18.19.17",
"@types/proxyquire": "^1.3.31",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^3.2.12",
Expand Down
2 changes: 1 addition & 1 deletion test/baselines/adapter_JS_React/.create-adapter.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"type": "free",
"license": "MIT"
},
"creatorVersion": "2.6.1"
"creatorVersion": "2.6.2"
}
6 changes: 3 additions & 3 deletions test/baselines/adapter_JS_React/admin/src/app.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import { withStyles } from "@material-ui/core/styles";
import { withStyles } from "@mui/styles";

import GenericApp from "@iobroker/adapter-react/GenericApp";
import GenericApp from "@iobroker/adapter-react-v5/GenericApp";
import Settings from "./components/settings";

/**
* @type {(_theme: import("@material-ui/core/styles").Theme) => import("@material-ui/styles").StyleRules}
* @type {(_theme: import("@mui/material/styles").Theme) => import("@mui/styles/withStyles").StyleRules}
*/
const styles = (_theme) => ({
root: {},
Expand Down
25 changes: 14 additions & 11 deletions test/baselines/adapter_JS_React/admin/src/components/settings.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from "react";
import { withStyles } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField";
import Input from "@material-ui/core/Input";
import FormHelperText from "@material-ui/core/FormHelperText";
import FormControl from "@material-ui/core/FormControl";
import Select from "@material-ui/core/Select";
import MenuItem from "@material-ui/core/MenuItem";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Checkbox from "@material-ui/core/Checkbox";
import I18n from "@iobroker/adapter-react/i18n";
import { withStyles } from "@mui/styles";
import TextField from "@mui/material/TextField";
import Input from "@mui/material/Input";
import FormHelperText from "@mui/material/FormHelperText";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
import MenuItem from "@mui/material/MenuItem";
import FormControlLabel from "@mui/material/FormControlLabel";
import Checkbox from "@mui/material/Checkbox";
import I18n from "@iobroker/adapter-react-v5/i18n";

/**
* @type {() => Record<string, import("@material-ui/core/styles/withStyles").CreateCSSProperties>}
* @type {() => Record<string, import("@mui/styles/withStyles").CreateCSSProperties>}
*/
const styles = () => ({
input: {
Expand Down Expand Up @@ -81,6 +81,7 @@ class Settings extends React.Component {
type={type || "text"}
onChange={(e) => this.props.onChange(attr, e.target.value)}
margin="normal"
variant="standard"
/>
);
}
Expand All @@ -99,11 +100,13 @@ class Settings extends React.Component {
paddingTop: 5,
...style
}}
variant="standard"
>
<Select
value={this.props.native[attr] || "_"}
onChange={(e) => this.props.onChange(attr, e.target.value === "_" ? "" : e.target.value)}
input={<Input name={attr} id={attr + "-helper"} />}
variant="standard"
>
{options.map((item) => (
<MenuItem key={"key-" + item.value} value={item.value || "_"}>
Expand Down
26 changes: 14 additions & 12 deletions test/baselines/adapter_JS_React/admin/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import React from "react";
import ReactDOM from "react-dom";
import { MuiThemeProvider } from "@material-ui/core/styles";
import theme from "@iobroker/adapter-react/Theme";
import Utils from "@iobroker/adapter-react/Components/Utils";
import { ThemeProvider, StyledEngineProvider } from "@mui/material/styles";
import theme from "@iobroker/adapter-react-v5/Theme";
import Utils from "@iobroker/adapter-react-v5/Components/Utils";
import App from "./app";

let themeName = Utils.getThemeName();

function build() {
ReactDOM.render(
<MuiThemeProvider theme={theme(themeName)}>
<App
adapterName="test-adapter"
onThemeChange={(_theme) => {
themeName = _theme;
build();
}}
/>
</MuiThemeProvider>,
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme(themeName)}>
<App
adapterName="test-adapter"
onThemeChange={(_theme) => {
themeName = _theme;
build();
}}
/>
</ThemeProvider>
</StyledEngineProvider>,
document.getElementById("root"),
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/baselines/adapter_JS_React/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

/*
* Created with @iobroker/create-adapter v2.6.1
* Created with @iobroker/create-adapter v2.6.2
*/

// The adapter-core module gives you access to the core ioBroker functions
Expand Down
8 changes: 5 additions & 3 deletions test/baselines/adapter_JS_React/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
"@iobroker/adapter-core": "^3.0.4"
},
"devDependencies": {
"@iobroker/adapter-dev": "^1.2.0",
"@iobroker/adapter-react": "2.0.22",
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/adapter-react-v5": "^4.9.10",
"@iobroker/testing": "^4.1.0",
"@material-ui/core": "^4.12.4",
"@mui/material": "^5.15.10",
"@mui/styles": "^5.15.10",
"babel-eslint": "^10.1.0",
"chai-as-promised": "^7.1.1",
"chai": "^4.4.1",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"licenseInformation": {
"type": "free"
},
"creatorVersion": "2.6.1"
"creatorVersion": "2.6.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
"@iobroker/adapter-core": "^3.0.4"
},
"devDependencies": {
"@iobroker/adapter-dev": "^1.2.0",
"@iobroker/adapter-dev": "^1.3.0",
"@iobroker/testing": "^4.1.0",
"@tsconfig/node18": "^18.2.2",
"@types/chai": "^4.3.11",
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.15",
"@types/node": "^18.19.17",
"@types/proxyquire": "^1.3.31",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^3.2.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"chai-as-promised": "^7.1.1",
"chai": "^4.4.1",
"eslint": "^8.56.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Created with @iobroker/create-adapter v2.6.1
* Created with @iobroker/create-adapter v2.6.2
*/

// The adapter-core module gives you access to the core ioBroker functions
Expand Down
2 changes: 1 addition & 1 deletion test/baselines/adapter_TS_React/.create-adapter.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"type": "free",
"license": "MIT"
},
"creatorVersion": "2.6.1"
"creatorVersion": "2.6.2"
}
9 changes: 5 additions & 4 deletions test/baselines/adapter_TS_React/admin/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from "react";
import { Theme, withStyles } from "@material-ui/core/styles";
import { withStyles } from "@mui/styles";
import { Theme } from "@mui/material/styles";

import GenericApp from "@iobroker/adapter-react/GenericApp";
import GenericApp from "@iobroker/adapter-react-v5/GenericApp";
import Settings from "./components/settings";
import { GenericAppProps, GenericAppSettings } from "@iobroker/adapter-react/types";
import { StyleRules } from "@material-ui/core/styles";
import { GenericAppProps, GenericAppSettings } from "@iobroker/adapter-react-v5/types";
import { StyleRules } from "@mui/styles/withStyles";

const styles = (_theme: Theme): StyleRules => ({
root: {},
Expand Down
Loading

0 comments on commit c3137ab

Please sign in to comment.