Skip to content

Commit

Permalink
Merge from v4.42.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ngeissel committed May 21, 2024
2 parents a5abacd + 09a7987 commit 04b4aa4
Show file tree
Hide file tree
Showing 56 changed files with 1,052 additions and 6,396 deletions.
54 changes: 52 additions & 2 deletions front/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,62 @@
{
"extends": ["preact", "prettier", "plugin:cypress/recommended", "plugin:compat/recommended"],
"rules": {
"jest/consistent-test-it": "off",
"jest/expect-expect": "off",
"jest/max-expects": "off",
"jest/max-nested-describe": "off",
"jest/no-alias-methods": "off",
"jest/no-commented-out-tests": "off",
"jest/no-conditional-expect": "off",
"jest/no-conditional-in-test": "off",
"jest/no-confusing-set-timeout": "off",
"jest/no-deprecated-functions": "off",
"jest/no-disabled-tests": "off",
"jest/no-done-callback": "off",
"jest/no-duplicate-hooks": "off",
"jest/no-export": "off",
"jest/no-focused-tests": "off",
"jest/no-hooks": "off",
"jest/no-identical-title": "off",
"jest/no-interpolation-in-snapshots": "off",
"jest/no-jasmine-globals": "off",
"jest/no-large-snapshots": "off",
"jest/no-mocks-import": "off",
"jest/no-restricted-jest-methods": "off",
"jest/no-restricted-matchers": "off",
"jest/no-standalone-expect": "off",
"jest/no-test-prefixes": "off",
"jest/no-test-return-statement": "off",
"jest/no-untyped-mock-factory": "off",
"jest/prefer-called-with": "off",
"jest/prefer-comparison-matcher": "off",
"jest/prefer-each": "off",
"jest/prefer-equality-matcher": "off",
"jest/prefer-expect-assertions": "off",
"jest/prefer-expect-resolves": "off",
"jest/prefer-hooks-in-order": "off",
"jest/prefer-hooks-on-top": "off",
"jest/prefer-importing-jest-globals": "off",
"jest/prefer-lowercase-title": "off",
"jest/prefer-mock-promise-shorthand": "off",
"jest/prefer-snapshot-hint": "off",
"jest/prefer-spy-on": "off",
"jest/prefer-strict-equal": "off",
"jest/prefer-to-be": "off",
"jest/prefer-to-contain": "off",
"jest/prefer-to-have-length": "off",
"jest/prefer-todo": "off",
"jest/require-hook": "off",
"jest/require-to-throw-message": "off",
"jest/require-top-level-describe": "off",
"jest/valid-describe-callback": "off",
"jest/valid-expect": "off",
"jest/valid-expect-in-promise": "off",
"jest/valid-title": "off",
"react/jsx-indent-props": ["error", 2],
"brace-style": ["error", "1tbs"],
"no-useless-concat": "error",
"prefer-template": "error",
"jest/expect-expect": "off",
"jest/valid-expect": "off",
"no-async-promise-executor": "off",
"react/jsx-key": "off",
"promise/prefer-await-to-then": "warn",
Expand Down
10 changes: 2 additions & 8 deletions front/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,15 @@

## CLI Commands

``` bash
```bash
# install dependencies
npm install

# serve with hot reload at localhost:1444
npm run dev
npm start

# build for production with minification
npm run build

# test the production build locally
npm run serve

# run tests with jest and preact-render-spy
npm run test
```

For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).
2 changes: 1 addition & 1 deletion front/cypress/e2e/routes/dashboard/Dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Dashboard', () => {
it('Should add new boxes', () => {
cy.contains('.btn-primary', 'dashboard.addBoxButton').click();
cy.get('select').then(inputs => {
cy.wrap(inputs[0]).select('user-presence');
cy.wrap(inputs[1]).select('user-presence');
});
cy.contains('.btn-outline-primary', 'dashboard.editDashboardSaveButton').click();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('Dashboard Humidity Box', () => {
name: 'Test',
type: 'test',
selector: 'test',
visibility: 'private',
boxes: [
[],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('Dashboard Temperature Box', () => {
name: 'Test',
type: 'test',
selector: 'test',
visibility: 'private',
boxes: [
[],
[
Expand Down
18 changes: 0 additions & 18 deletions front/cypress/e2e/routes/scene/Scene.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ describe('Scene view', () => {
.click(0, 0, { force: true });
});

// I don't know why, but I'm unable to get this button with
// the text. Using the class but it's not recommended otherwise!!
cy.get('.btn-success').then(buttons => {
cy.wrap(buttons[1]).click();
});

cy.get('div[class*="-control"]').then(inputs => {
cy.wrap(inputs[1])
.click(0, 0, { force: true })
Expand Down Expand Up @@ -138,12 +132,6 @@ describe('Scene view', () => {
.click(0, 0, { force: true });
});

// I don't know why, but I'm unable to get this button with
// the text. Using the class but it's not recommended otherwise!!
cy.get('.btn-success').then(buttons => {
cy.wrap(buttons[1]).click();
});

cy.wait('@loadDevices');
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(100);
Expand Down Expand Up @@ -176,12 +164,6 @@ describe('Scene view', () => {
.click(0, 0, { force: true });
});

// I don't know why, but I'm unable to get this button with
// the text. Using the class but it's not recommended otherwise!!
cy.get('.btn-success').then(buttons => {
cy.wrap(buttons[1]).click();
});

cy.get('select').then(selects => {
cy.wrap(selects[0]).select('contains');
cy.wrap(selects[1]).select('start');
Expand Down
Loading

0 comments on commit 04b4aa4

Please sign in to comment.