From 7d8623de89717ac596e5de0267f2474f5a9cf46e Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Tue, 2 Jul 2024 10:39:22 +0200 Subject: [PATCH] Fix `Match system theme` toggle (#12719) * deps: force react-id version * e2e: use checkbox name --- package.json | 3 ++- .../appearance-user-settings-tab/index.ts | 2 +- yarn.lock | 17 +---------------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 8e1fd2ca83..648630a253 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,8 @@ "@types/seedrandom": "3.0.8", "oidc-client-ts": "3.0.1", "jwt-decode": "4.0.0", - "@floating-ui/react": "0.26.11" + "@floating-ui/react": "0.26.11", + "@radix-ui/react-id": "1.1.0" }, "dependencies": { "@babel/runtime": "^7.12.5", diff --git a/playwright/e2e/settings/appearance-user-settings-tab/index.ts b/playwright/e2e/settings/appearance-user-settings-tab/index.ts index 6eabfe11ef..7181e5c9b4 100644 --- a/playwright/e2e/settings/appearance-user-settings-tab/index.ts +++ b/playwright/e2e/settings/appearance-user-settings-tab/index.ts @@ -77,7 +77,7 @@ class Helpers { * Return the system theme toggle */ getMatchSystemThemeCheckbox() { - return this.getThemePanel().getByRole("checkbox"); + return this.getThemePanel().getByRole("checkbox", { name: "Match system theme" }); } /** diff --git a/yarn.lock b/yarn.lock index 180d30b654..9b0b1dbbef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2109,15 +2109,7 @@ "@radix-ui/react-label" "2.0.2" "@radix-ui/react-primitive" "1.0.3" -"@radix-ui/react-id@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.0.1.tgz#73cdc181f650e4df24f0b6a5b7aa426b912c88c0" - integrity sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-use-layout-effect" "1.0.1" - -"@radix-ui/react-id@1.1.0": +"@radix-ui/react-id@1.0.1", "@radix-ui/react-id@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.0.tgz#de47339656594ad722eb87f94a6b25f9cffae0ed" integrity sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA== @@ -2277,13 +2269,6 @@ dependencies: "@radix-ui/react-use-callback-ref" "1.1.0" -"@radix-ui/react-use-layout-effect@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.1.tgz#be8c7bc809b0c8934acf6657b577daf948a75399" - integrity sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-use-layout-effect@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz#3c2c8ce04827b26a39e442ff4888d9212268bd27"