Skip to content
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

screenobject(update): fix tests failing on CI for accessibility #685

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/helpers/commandsNewUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import SettingsProfileScreen from "@screenobjects/settings/SettingsProfileScreen
import WelcomeScreen from "@screenobjects/welcome-screen/WelcomeScreen";
import {
activateFirstApplication,
activateSecondApplication,
getUserKey,
launchSecondApplication,
launchThirdApplication,
Expand Down
4 changes: 2 additions & 2 deletions tests/screenobjects/settings/SettingsBaseScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class SettingsBaseScreen extends UplinkMainScreen {
}

public get accessibilityButton() {
return $(SELECTORS.ACCESSIBILITY_BUTTON);
return this.settingsLayout.$(SELECTORS.ACCESSIBILITY_BUTTON);
}

public get audioButton() {
Expand Down Expand Up @@ -108,7 +108,7 @@ export default class SettingsBaseScreen extends UplinkMainScreen {
}

public get settingsSearchInput() {
return $(SELECTORS.SETTINGS_SEARCH_INPUT);
return this.settingsLayout.$(SELECTORS.SETTINGS_SEARCH_INPUT);
}

async goToAboutSettings() {
Expand Down
6 changes: 2 additions & 4 deletions tests/specs/10-settings-accessibility.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@ export default async function settingsAccessibilityTests() {
);
});

// Skip test that needs rework because it is clicking on a switch slider from MacOS configuration instead of Uplink - Settings Accessibility Screen
xit("Settings Accessibility - Click on slider switch to enable Open Dyslexic option", async () => {
it("Settings Accessibility - Click on slider switch to enable Open Dyslexic option", async () => {
// Click on the Open Dyslexic switch slider from the Settings Accessibility Screen
await SettingsAccessibilityScreen.clickOnOpenDyslexic();

// Validate that toggle has now value = "1" (enabled)
await SettingsAccessibilityScreen.validateOpenDyslexicIsEnabled();
});

// Skip test that needs rework because it is clicking on a switch slider from MacOS configuration instead of Uplink - Settings Accessibility Screen
xit("Settings Audio - Click on slider switches to disable the options", async () => {
it("Settings Audio - Click on slider switches to disable the options", async () => {
// Click again on the switch slider from Open Dyslexic option in Settings Accessibility Screen
await SettingsAccessibilityScreen.clickOnOpenDyslexic();

Expand Down
Loading