Skip to content

[pull] master from GladysAssistant:master #197

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

Open
wants to merge 127 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
5b2027e
User can now have 1, 2 or 3 columns on dashboard (#2097)
Terdious Oct 4, 2024
b65b18c
Calendar: Save last range selected (#2121)
bertrandda Oct 4, 2024
3728087
Upgrade socket.io dependencies to improve Gladys Plus client reconnec…
Pierre-Gilles Oct 7, 2024
f0a3c12
Dashboard: Add binary charts + allow user to rename chart feature lab…
Terdious Oct 7, 2024
2b8e274
4.46.0
Pierre-Gilles Oct 7, 2024
7b512fb
Fix: Use custom feature name in non-binary charts (#2126)
Terdious Oct 9, 2024
e0e2d37
Chart: Dynamically adjust height based on number of features (#2117)
Terdious Oct 9, 2024
bc41ef3
Gladys Plus: Increase ackTimeout to 60s (#2128)
Pierre-Gilles Oct 11, 2024
7fce024
4.46.1
Pierre-Gilles Oct 11, 2024
e27288e
Fix: Device label in Chart & Device widget can be empty (#2127)
Terdious Oct 11, 2024
c302b7f
Fix: Rollback socket-io to old version to prevent Gladys Plus disconn…
Pierre-Gilles Oct 12, 2024
4f7dd42
4.46.2
Pierre-Gilles Oct 12, 2024
2764363
Zigbee2mqtt: new LixeeTIC expose: EASF03 (#2131)
William-De71 Oct 14, 2024
f77c5d5
Remove arm/v7 builds (#2134)
Pierre-Gilles Oct 14, 2024
31815a7
Scene: Fix responsive on tablets for scheduled trigger (#2136)
Pierre-Gilles Oct 14, 2024
8d2fc30
Scene: Change log level for checkCalendarTrigger (#2137)
Pierre-Gilles Oct 14, 2024
a000b56
Camera: Replace ffmpeg-fluent by native commands (#2132)
Pierre-Gilles Oct 14, 2024
749cfe1
Upgrade DuckDB to 1.1.1 (#2144)
Pierre-Gilles Oct 25, 2024
35864b5
Zigbee2mqtt: Add pilot wire mode (#2140)
William-De71 Oct 25, 2024
e6d4272
Homekit: Handle devices with multiple time the same features (#2139)
bertrandda Oct 25, 2024
68cbddb
Backup : When restoring backup, clean DuckDB WAL file before writing …
Pierre-Gilles Oct 25, 2024
b8ab133
4.47.0
Pierre-Gilles Oct 25, 2024
cbf5f82
Clean DuckDB schema on restore (#2147)
Pierre-Gilles Oct 28, 2024
b247c81
Ask AI in scene (#2129)
Pierre-Gilles Oct 28, 2024
14151cc
Scene: Save tag filters & search in URL (#2148)
Pierre-Gilles Oct 28, 2024
d46ba5b
Scene: Add Pilot Wire Mode in trigger & device set value action (#2149)
William-De71 Oct 31, 2024
01e7779
DuckDB: Properly close all connections & database on shutdown (#2151)
Pierre-Gilles Oct 31, 2024
df91742
Camera: Add TCP transport for RTSP stream (#2150)
Pierre-Gilles Oct 31, 2024
38a2613
Chart: Fix binary query, return first value (#2153)
Pierre-Gilles Nov 1, 2024
3188ddf
4.48.0
Pierre-Gilles Nov 1, 2024
19445e5
Zigbee2mqtt: Add Develco IOMZB-110 (#2152)
William-De71 Nov 4, 2024
216f637
Zigbee2mqtt: Hide Coordinator in discovery (#2155)
cicoub13 Nov 4, 2024
c102bbb
Fix translation in user back/left home trigger (#2162)
Pierre-Gilles Nov 8, 2024
37f76c4
ChatGPT: Add "NO_RESPONSE" option in case no answer is needed (#2163)
Pierre-Gilles Nov 8, 2024
c524f73
Get users should stop returning internal attributes if requested (#2158)
bnematzadeh Nov 8, 2024
70c64b2
Scene: Device state change trigger should update value in case presen…
Pierre-Gilles Nov 8, 2024
2540927
Scene: Device state trigger can now check that condition was valid fo…
Pierre-Gilles Nov 8, 2024
68cdb6c
Dashboard: Add push button feature (#2165)
Pierre-Gilles Nov 11, 2024
adc1df0
Scene: add new action send zigbee2mqtt msg (#2160)
William-De71 Nov 11, 2024
922fd9f
Zigbee2mqtt: Add specific features to Lixee TIC devices (#2141)
William-De71 Nov 11, 2024
8b1c577
4.49.0
Pierre-Gilles Nov 11, 2024
5b57c1d
Zigbee2mqtt: Adding IKEA e1524/e1810 (#2120)
paddyponchero Nov 11, 2024
7a24976
Fix get session request to only display the session of the currently …
bnematzadeh Nov 11, 2024
4f31ae6
LAN Manager: Should save a 0 once if a device is not discovered (#2164)
Pierre-Gilles Nov 22, 2024
8fff0ca
Add Airplay speaker integration (#2143)
bertrandda Nov 22, 2024
1643043
Camera: Fix order of argument -rtsp_transport in ffmpeg command (#2173)
cailholm Nov 28, 2024
5182656
Improve LAN Manager wording (#2174)
Pierre-Gilles Nov 28, 2024
88f8b13
Add new Free Mobile SMS integration (#2157)
William-De71 Nov 28, 2024
e99548f
4.50.0
Pierre-Gilles Nov 28, 2024
530ab3e
Free mobile: Fix wrong path (#2175)
Pierre-Gilles Nov 28, 2024
6a1779d
4.50.1
Pierre-Gilles Nov 28, 2024
dfff5d2
Improve mobile view on scene list (#2176)
Pierre-Gilles Dec 2, 2024
9aecc6f
Fix local Zigbee2mqtt version to 1.42.0 (#2180)
Pierre-Gilles Dec 6, 2024
2038265
4.50.2
Pierre-Gilles Dec 6, 2024
7a14929
ZwaveJS: Add support to the Central Scene command class (#2178)
sescandell Dec 9, 2024
f85f2bf
Upgrade axios to fix request chunked response (#2182)
bertrandda Dec 9, 2024
e38bbde
Zigbee2mqtt: Add smart doorbell HEIMAN HS2DB (#2184)
William-De71 Dec 10, 2024
f961aef
Zigbee2mqtt : Lixee TIC, migrate selector & external_id (#2181)
William-De71 Dec 10, 2024
e9b3211
Fix builds: Stop re-installing npm (#2195)
Pierre-Gilles Jan 9, 2025
d6461e0
Zigbee2mqtt: Add Aqara WXKG15LM (#2192)
William-De71 Jan 13, 2025
f416866
Fix MQTT auto-reconnect with custom topic issues + update mqtt librar…
Terdious Jan 17, 2025
6326203
4.51.0
Pierre-Gilles Jan 20, 2025
04c1528
Slugify selector: Remove leading & trailing dash (#2202)
Pierre-Gilles Jan 20, 2025
6829fac
Chart: Fix timezone issues (#2203)
Pierre-Gilles Jan 23, 2025
110db18
Fix validation issue when creating a new user and forgetting the pass…
Pierre-Gilles Jan 23, 2025
43dac59
Chart: color cannot be null, fix bug on edit, move & remove of device…
Pierre-Gilles Jan 23, 2025
68db725
Gladys Plus: Improve error handling on login page (#2208)
Pierre-Gilles Jan 23, 2025
6fa77fc
Call to local admin routes should be checked in Gladys Plus as well (…
Pierre-Gilles Jan 23, 2025
17e8c7b
Scene: Add 4 random characters at the end of selectors to avoid dupli…
Pierre-Gilles Jan 24, 2025
4df3ab3
Chart: Improve yAxis label formatting for small & large numbers (#2206)
Pierre-Gilles Jan 24, 2025
66c3dbb
Adjust temperature & humidity widgets for finer increments (#2200)
Terdious Jan 24, 2025
e7f7a14
Performance: Add a promise cache for pending get requests (#2211)
Pierre-Gilles Jan 24, 2025
c56d552
Fix slider: should be full width (#2212)
Pierre-Gilles Jan 24, 2025
f947056
Chart: Rollback smart rounding of values, only keep small number part…
Pierre-Gilles Jan 31, 2025
6eae46e
Scene: Fix search lag on list (#2215)
Pierre-Gilles Jan 31, 2025
90757c1
4.52.0
Pierre-Gilles Jan 31, 2025
892aa4a
Header: Close dropdown when clicking outside (#2219)
Pierre-Gilles Feb 6, 2025
5c7a51e
Make the title optional in the device and scene widgets. (#2220)
William-De71 Feb 7, 2025
61a86db
Scene: Fix tag selection bugs & move order_dir to URL (#2217)
Pierre-Gilles Feb 7, 2025
3c64cf5
Chart: Add more units to the list of "when down is positive" (#2221)
Pierre-Gilles Feb 7, 2025
f6ad30c
Chart: Increase max value before scientific display to 10e9 (#2222)
Pierre-Gilles Feb 7, 2025
6edd550
ZWaveJS: Add support for Battery, Illuminance, Binary Sensor, Alarm S…
sescandell Feb 10, 2025
5e87201
Chart: Close interval dropdown when clicking outside (#2224)
Pierre-Gilles Feb 10, 2025
b93b318
Scene: Search should check without accents (#2225)
Pierre-Gilles Feb 10, 2025
bb02178
Scene: When duplicating a scene, prefill the title with "Copy of {{pr…
Pierre-Gilles Feb 10, 2025
587e49c
Integration List: Fix scroll to top bug (#2227)
Pierre-Gilles Feb 10, 2025
b47e712
Camera: Sort rooms by name in select (#2229)
Pierre-Gilles Feb 10, 2025
af68a6b
Chart: Add last twelve hours interval (#2231)
Pierre-Gilles Feb 14, 2025
d21d3bf
System: When vacuum is finished, it should display a message in the U…
Pierre-Gilles Feb 14, 2025
2bdd32b
Dashboard: When websocket connection is restored, refresh widgets (#2…
Pierre-Gilles Feb 14, 2025
957ef1c
4.53.0
Pierre-Gilles Feb 14, 2025
5986e77
Upgrade to Node 22 (#2234)
Pierre-Gilles Feb 17, 2025
9dacf53
Clean old open-zwave integration (#2237)
Pierre-Gilles Feb 17, 2025
d1a0d9e
ZwaveJS / MQTT : Better handle MQTT reconnection when broker is unava…
Pierre-Gilles Feb 20, 2025
511f4b9
Do not set selector if it already exists (#2243)
Pierre-Gilles Feb 28, 2025
5d5d90f
Send reset password link to Telegram or NextCloud talk if configured …
Pierre-Gilles Feb 28, 2025
d2859f2
Zigbee2mqtt: Add power, current & energy features for Tuya PJ-1203A (…
cicoub13 Feb 28, 2025
e1ec520
MQTT : Add better validation errors on create device form (#2244)
Pierre-Gilles Feb 28, 2025
ee4d9ad
Improve battery low notification (#2245)
Pierre-Gilles Feb 28, 2025
034dc5a
4.54.0
Pierre-Gilles Mar 3, 2025
0d87f04
Dashboard Chart: Fix missing device feature unit when editing a chart…
Pierre-Gilles Mar 3, 2025
aae243a
Chat: Enable switch control via user commands (#2247)
Pierre-Gilles Mar 7, 2025
9504847
Redirect German users to English documentation (#2249)
Pierre-Gilles Mar 7, 2025
045d5b3
Increase camera image resolution to 1280px (#2248)
Pierre-Gilles Mar 17, 2025
c947fea
CallMeBot integration for WhatsApp & Signal messages (#2250)
Pierre-Gilles Mar 17, 2025
808aa79
Scene: Add condition "If... Then... Else..." (#2239)
Pierre-Gilles Mar 17, 2025
bcdece0
4.55.0
Pierre-Gilles Mar 17, 2025
da08d48
Scene: Fix crash on start scene action (#2251)
Pierre-Gilles Mar 17, 2025
9f643ec
4.55.1
Pierre-Gilles Mar 17, 2025
26c47f7
Scene: Fix variables in action http request (#2253)
Pierre-Gilles Mar 18, 2025
e764dd8
4.55.2
Pierre-Gilles Mar 18, 2025
8bd0f3d
Zigbee2mqtt: Add Tuya Rain RB-SRAIN01 (#2241)
cicoub13 Mar 21, 2025
6136a56
Gladys Plus : Faster load time + get message if the instance is disco…
Pierre-Gilles Mar 24, 2025
cdb7893
Fix "undefined" on some screens during slow load (#2258)
Pierre-Gilles Mar 24, 2025
660f2da
Fix Netatmo service: Replace axios with undici for HTTP/2 support (#2…
Terdious Mar 26, 2025
409d9c4
House.arm : Fix flaky test (#2263)
Pierre-Gilles Mar 26, 2025
32f5e2a
4.56.0
Pierre-Gilles Mar 27, 2025
dcea2ef
Revert "Gladys Plus : Faster load time + get message if the instance …
Pierre-Gilles Mar 30, 2025
eb9c117
4.56.1
Pierre-Gilles Mar 30, 2025
b0c5415
Add upgrade Gladys button (#2267)
Pierre-Gilles Apr 4, 2025
8608c8b
Homekit: Add shutter/curtain (#2266)
bertrandda Apr 4, 2025
ec15e34
Scene: Should fix variable bug after deleting an action (#2273)
Pierre-Gilles Apr 18, 2025
a004bcc
Dashboard: Fix flicker when coming back on a tab after a long time (#…
Pierre-Gilles Apr 18, 2025
3444f90
Dashboard: Widget "Devices in room" is now deprecated (#2276)
Pierre-Gilles Apr 18, 2025
3e07130
Homekit: Fix live update for dynamic numeric value types (#2272)
bertrandda Apr 18, 2025
4185cb8
Scene: Add volume setting when talking on speaker (#2179)
bertrandda Apr 18, 2025
7a922ce
4.57.0
Pierre-Gilles Apr 18, 2025
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "Gladys Assistant - Node.js",
"image": "mcr.microsoft.com/devcontainers/javascript-node:18",
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
"forwardPorts": [1443, 1444],
"extensions": [
"dbaeumer.vscode-eslint",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
platforms:
description: 'Docker platform to build'
required: true
default: 'linux/amd64,linux/arm/v7,linux/arm64/v8'
default: 'linux/amd64,linux/arm64/v8'

jobs:
build-front:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-master-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
sudo npm install typescript node-gyp -g
- name: 📦 Install NPM front packages
working-directory: ./front
run: |
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
sudo apt-get install -y libudev-dev sqlite3 openssl python-is-python3
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
sudo npm install typescript node-gyp -g
- name: 📦 Install NPM server packages
working-directory: ./server
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
sudo npm install typescript node-gyp -g
- name: 📦 Install NPM front packages
working-directory: ./front
run: |
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
sudo apt-get install -y libudev-dev sqlite3 openssl python-is-python3
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
sudo npm install typescript node-gyp -g
- name: 📦 Install NPM server packages
working-directory: ./server
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
sudo npm install typescript node-gyp -g
- name: 📦 Install NPM front packages
working-directory: ./front
run: |
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
sudo apt-get install -y libudev-dev sqlite3 openssl python-is-python3
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
sudo npm install typescript node-gyp -g
- name: 📦 Install NPM server packages
working-directory: ./server
run: |
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
with:
context: .
file: ./docker/Dockerfile.buildx
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
platforms: linux/amd64,linux/arm64/v8
push: true
pull: true
tags: ${{ steps.docker_meta.outputs.tags }}
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG TARGET
ARG VERSION
ARG BUILD_DATE

FROM ${TARGET}/node:18-slim
FROM ${TARGET}/node:22-slim

LABEL \
org.label-schema.build-date=$BUILD_DATE \
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.buildx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# STEP 1
# Prepare server package*.json files
FROM node:18-slim as json-files
FROM node:22-slim as json-files
COPY ./server /json-files/server
WORKDIR /json-files/server/
RUN find . -type f \! -name "package*.json" -exec rm -r {} \;
Expand All @@ -9,7 +9,7 @@ COPY ./server/utils /json-files/server/utils

# STEP 3
# Gladys Bundle
FROM node:18-slim as gladys
FROM node:22-slim as gladys

# System dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down
28 changes: 15 additions & 13 deletions front/cypress/e2e/routes/0-signup/SignUp.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ describe('Sign-up', () => {
// Email
cy.wrap(inputs[3]).type(tony.email);
// Password
cy.wrap(inputs[4]).type('short');
cy.wrap(inputs[4]).as('passwordInput');
cy.get('@passwordInput').clear();
cy.get('@passwordInput').type('short');
// Password retype
cy.wrap(inputs[5]).type('short');
});
Expand All @@ -77,9 +79,9 @@ describe('Sign-up', () => {
// Fill form
cy.get('input:visible').then(inputs => {
// Password
cy.wrap(inputs[4])
.clear()
.type(tony.password);
cy.wrap(inputs[4]).as('passwordInput');
cy.get('@passwordInput').clear();
cy.get('@passwordInput').type(tony.password);
});

// Submit empty form
Expand All @@ -98,9 +100,9 @@ describe('Sign-up', () => {
// Fill form
cy.get('input:visible').then(inputs => {
// Password
cy.wrap(inputs[5])
.clear()
.type(tony.password);
cy.wrap(inputs[5]).as('passwordConfirmInput');
cy.get('@passwordConfirmInput').clear();
cy.get('@passwordConfirmInput').type(tony.password);
});

// Store access token
Expand Down Expand Up @@ -138,15 +140,15 @@ describe('Sign-up', () => {
// Fill form
cy.get('input:visible').then(inputs => {
// House name
cy.wrap(inputs[0])
.clear()
.type(house.name);
cy.wrap(inputs[0]).as('houseNameInput');
cy.get('@houseNameInput').clear();
cy.get('@houseNameInput').type(house.name);

// Room
house.rooms.forEach(room => {
cy.wrap(inputs[1])
.clear()
.type(room.name);
cy.wrap(inputs[1]).as('roomInput');
cy.get('@roomInput').clear();
cy.get('@roomInput').type(room.name);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,26 @@ describe('Bluetooth device edit', () => {
.should('exist')
.parent('.card')
.within(() => {
// Input name
cy.get('input')
.first()
.clear()
.type('New name');
.as('nameInput');
cy.get('@nameInput').clear();
cy.get('@nameInput').type('New name');

// Select room
cy.get('select').select(rooms[0].name);
cy.get('#featureName_0')
.clear()
.type('Sensor');

// Feature name
cy.get('#featureName_0').as('featureInput');
cy.get('@featureInput').clear();
cy.get('@featureInput').type('Sensor');

cy.get('#keep_history_0').should(keepHistoryValueBegin);
cy.get('[class="custom-switch-indicator"]').click();
cy.get('#keep_history_0').should(keepHistoryValueAfter);

cy.contains('button', 'integration.bluetooth.device.saveButton').click();
});
});

it('Check updated device', () => {
cy.contains('button', 'global.backButton').click();

const { rooms } = Cypress.env('house');
cy.contains('.card-header', 'New name')
.should('exist')
.parent('.card')
.within(() => {
cy.get('input').should('have.value', 'New name');
cy.get('select option:selected').should('have.text', rooms[0].name);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ describe('Bluetooth device list', () => {
.parent('.card')
.within(() => {
cy.get('input').should('have.value', device.name);
cy.get('select').should('have.value', '');
});
});

Expand All @@ -49,9 +48,10 @@ describe('Bluetooth device list', () => {
.should('exist')
.parent('.card')
.within(() => {
cy.get('input')
.clear()
.type('New name');
cy.get('input').as('deviceInput');

cy.get('@deviceInput').clear();
cy.get('@deviceInput').type('New name');
cy.get('select').select(rooms[0].name);

cy.get('.card-header').should('have.text', 'New name');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ describe('Bluetooth discover', () => {
}
).as('scan');

cy.contains('integration.bluetooth.discover.scanButton')
.should('have.class', 'btn-outline-primary')
.click()
.should('have.class', 'btn-outline-danger');
// Start scan
cy.contains('integration.bluetooth.discover.scanButton').as('scanButton');
cy.get('@scanButton').should('have.class', 'btn-outline-primary');
cy.get('@scanButton').click();
cy.get('@scanButton').should('have.class', 'btn-outline-danger');

cy.wait('@scan')
.its('request.body')
Expand All @@ -65,10 +66,11 @@ describe('Bluetooth discover', () => {
}
);

cy.contains('integration.bluetooth.discover.scanButton')
.should('have.class', 'btn-outline-danger')
.click()
.should('have.class', 'btn-outline-primary');
// Manual stop scan
cy.contains('integration.bluetooth.discover.scanButton').as('scanButton');
cy.get('@scanButton').should('have.class', 'btn-outline-danger');
cy.get('@scanButton').click();
cy.get('@scanButton').should('have.class', 'btn-outline-primary');
});

it('Auto stop scan', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ describe('Bluetooth scanner', () => {
cy.get('input[type=number]').should('be.disabled');

// Check all buttons are enabled
cy.contains('button', 'integration.bluetooth.setup.saveLabel')
.should('not.be.disabled')
.first()
// Submit new config
.click()
.should('be.disabled');
cy.contains('button', 'integration.bluetooth.setup.saveLabel').as('saveButton');
cy.get('@saveButton').should('not.be.disabled');
cy.get('@saveButton').first();
cy.get('@saveButton').click();
cy.get('@saveButton').should('be.disabled');

cy.wait('@saveStatus');
});
Expand Down Expand Up @@ -98,12 +97,11 @@ describe('Bluetooth scanner', () => {
cy.get('input[type=number]').type('{selectall}2');

// Check all buttons are enabled
cy.contains('button', 'integration.bluetooth.setup.saveLabel')
.should('not.be.disabled')
.first()
// Submit new config
.click()
.should('be.disabled');
cy.contains('button', 'integration.bluetooth.setup.saveLabel').as('saveButton');
cy.get('@saveButton').should('not.be.disabled');
cy.get('@saveButton').first();
cy.get('@saveButton').click();
cy.get('@saveButton').should('be.disabled');

cy.wait('@saveStatus');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ describe('Broadlink edit remote', () => {
cy.get('.card-body').within(() => {
// Check device name
cy.get('input')
.should('have.value', 'Light Remote')
.should('not.be.disabled');
.first()
.as('nameInput');
cy.get('@nameInput').clear();
cy.get('@nameInput').type('New name');
cy.get('@nameInput').should('have.value', 'New name');
// Check selects
cy.get('select')
.should('have.length', 3)
Expand Down Expand Up @@ -113,10 +116,10 @@ describe('Broadlink edit remote', () => {
{ learn: true }
).as('learnMode');

cy.contains('button', 'integration.broadlink.setup.learnAllLabel')
.should('not.be.disabled')
.click()
.should('not.exist');
cy.contains('button', 'integration.broadlink.setup.learnAllLabel').as('learnButton');

cy.get('@learnButton').should('not.be.disabled');
cy.get('@learnButton').click();

cy.contains('button', 'integration.broadlink.setup.quitLearnModeLabel')
.should('exist')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ describe('Broadlink edit remote - learn all', () => {
cy.contains('.card-header', 'Light Remote').should('exist');
cy.get('.card-body').within(() => {
// Check device name
cy.get('input')
cy.get('input').as('nameInput');
cy.get('@nameInput')
.should('have.value', 'Light Remote')
.should('not.be.disabled');
// Check selects
Expand Down Expand Up @@ -112,11 +113,10 @@ describe('Broadlink edit remote - learn all', () => {
{ learn: true }
).as('learnMode');

cy.contains('button', 'integration.broadlink.setup.learnAllLabel')
.should('not.be.disabled')
.click()
.should('not.exist');

// Learn all mode button
cy.contains('button', 'integration.broadlink.setup.learnAllLabel').as('learnButton');
cy.get('@learnButton').should('not.be.disabled');
cy.get('@learnButton').click();
cy.contains('button', 'integration.broadlink.setup.quitLearnModeLabel')
.should('exist')
.should('not.be.disabled');
Expand All @@ -138,10 +138,12 @@ describe('Broadlink edit remote - learn all', () => {

cy.get('.tag-info').should('be.length', 0);

cy.get('.tag-secondary')
.should('be.length', 1)
cy.get('.tag-secondary').as('tagSecondary');
cy.get('@tagSecondary').should('be.length', 1);
cy.get('@tagSecondary')
.first()
.i18n('deviceFeatureCategory.light.binary');
.as('firstTag');
cy.get('@firstTag').i18n('deviceFeatureCategory.light.binary');
});

[
Expand Down
Loading