Skip to content

Commit

Permalink
test(update): fix dev settings and input bar test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm committed May 8, 2024
1 parent 6e4d72b commit dcdbac0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
8 changes: 8 additions & 0 deletions tests/helpers/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,14 @@ export async function getUplinkWindowHandle() {

// Key Combinations Commands

export async function keyboardShortcutSelectAll() {
if (process.env.DRIVER === WINDOWS_DRIVER) {
await robot.keyTap("a", ["control"]);
} else if (process.env.DRIVER === MACOS_DRIVER) {
await robot.keyTap("a", ["command"]);
}
}

export async function keyboardShortcutPaste() {
if (process.env.DRIVER === WINDOWS_DRIVER) {
await robot.keyTap("v", ["control"]);
Expand Down
9 changes: 9 additions & 0 deletions tests/screenobjects/chats/InputBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
getUplinkWindowHandle,
selectFileOnMacos,
selectFileOnWindows,
keyboardShortcutSelectAll,
} from "@helpers/commands";
import UplinkMainScreen from "@screenobjects/UplinkMainScreen";
import { selectorContainer } from "@screenobjects/AppScreen";
Expand Down Expand Up @@ -128,6 +129,14 @@ class InputBar extends UplinkMainScreen {
await inputText.clearValue();
}

async clearLongInputBar() {
const inputText = await this.inputText;
await inputText.click();
await keyboardShortcutSelectAll();
await this.typeMessageOnInput("a");
await inputText.clearValue();
}

async clickOnEmojiButton() {
const addEmoji = await this.emojiButton;
await this.hoverOnElement(addEmoji);
Expand Down
5 changes: 0 additions & 5 deletions tests/specs/13-settings-developer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ export default async function settingsDeveloperTests() {

// 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
if (currentDriver === MACOS_DRIVER) {
await maximizeWindow();
}
await SettingsDeveloperScreen.waitForIsShown(true);

// Validate EXPERIMENTAL FEATURES section
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/reusable-accounts/04-message-input.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default async function chatInputTests() {
);

// Clear input bar to finish test
await InputBar.clearInputBar();
await InputBar.clearLongInputBar();
});

it("Emoji Suggested List - Displays expected data", async () => {
Expand Down

0 comments on commit dcdbac0

Please sign in to comment.