Skip to content

Commit

Permalink
test(update): only maximize on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm committed May 8, 2024
1 parent b6253ba commit 6e4d72b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
12 changes: 9 additions & 3 deletions tests/specs/12-settings-licenses.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
require("module-alias/register");
import { maximizeWindow, scrollDown } from "@helpers/commands";
import { maximizeWindow } from "@helpers/commands";
import { MACOS_DRIVER } from "@helpers/constants";
import SettingsAboutScreen from "@screenobjects/settings/SettingsAboutScreen";
import SettingsLicensesScreen from "@screenobjects/settings/SettingsLicenses";

export default async function settingsLicensesTests() {
it("Settings Licenses - Validate header and description texts and license button are present", async () => {
// Change screen to be full size
await maximizeWindow();
const currentDriver = await SettingsAboutScreen.getCurrentDriver();
if (currentDriver === MACOS_DRIVER) {
await maximizeWindow();
}

// Go to Settings Licenses Screen
await SettingsAboutScreen.goToLicensesSettings();

// Change screen to not be full size and validate settings screen is displayed
await maximizeWindow();
if (currentDriver === MACOS_DRIVER) {
await maximizeWindow();
}
await SettingsLicensesScreen.waitForIsShown(true);

// Validate the header and description texts from MIT license
Expand Down
9 changes: 7 additions & 2 deletions tests/specs/13-settings-developer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ import WebInspector from "@screenobjects/developer/WebInspector";
export default async function settingsDeveloperTests() {
it("Settings Developer - Validate headers and descriptions from Settings Sections", async () => {
// Change screen to be full size
await maximizeWindow();
const currentDriver = await SettingsLicensesScreen.getCurrentDriver();
if (currentDriver === MACOS_DRIVER) {
await maximizeWindow();
}

// Go to Settings Screen and finally select the Settings Screen to validate
await SettingsLicensesScreen.goToDeveloperSettings();

// Change screen to not be full size and validate settings screen is displayed
await maximizeWindow();
if (currentDriver === MACOS_DRIVER) {
await maximizeWindow();
}
await SettingsDeveloperScreen.waitForIsShown(true);

// Validate EXPERIMENTAL FEATURES section
Expand Down

0 comments on commit 6e4d72b

Please sign in to comment.