mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Fixing theme switch helper
Summary: Fixing flakiness in the test helper. Test Plan: Existing Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: georgegevoian Differential Revision: https://phab.getgrist.com/D4051
This commit is contained in:
parent
e01ebe1ae8
commit
c6f93f6870
@ -3141,14 +3141,15 @@ export async function setGristTheme(options: {
|
|||||||
await openProfileSettingsPage();
|
await openProfileSettingsPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
const syncWithOSCheckbox = await driver.find('.test-theme-config-sync-with-os');
|
await scrollIntoView(driver.find('.test-theme-config-sync-with-os'));
|
||||||
const isSyncWithOSChecked = await syncWithOSCheckbox.getAttribute('checked') === 'true';
|
const isSyncWithOSChecked = await driver.find('.test-theme-config-sync-with-os').getAttribute('checked') === 'true';
|
||||||
if (syncWithOS !== isSyncWithOSChecked) {
|
if (syncWithOS !== isSyncWithOSChecked) {
|
||||||
await syncWithOSCheckbox.click();
|
await driver.find('.test-theme-config-sync-with-os').click();
|
||||||
await waitForServer();
|
await waitForServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!syncWithOS) {
|
if (!syncWithOS) {
|
||||||
|
await scrollIntoView(driver.find('.test-theme-config-appearance .test-select-open'));
|
||||||
await driver.find('.test-theme-config-appearance .test-select-open').click();
|
await driver.find('.test-theme-config-appearance .test-select-open').click();
|
||||||
await driver.findContent('.test-select-menu li', appearance === 'light' ? 'Light' : 'Dark')
|
await driver.findContent('.test-select-menu li', appearance === 'light' ? 'Light' : 'Dark')
|
||||||
.click();
|
.click();
|
||||||
|
Loading…
Reference in New Issue
Block a user