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

chore(appium): try test #677

Closed
wants to merge 4 commits into from
Closed
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
5 changes: 5 additions & 0 deletions tests/screenobjects/chats/InputBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ class InputBar extends UplinkMainScreen {
return $(SELECTORS.UPLOAD_BUTTON_LOCAL_DISK);
}

public async getInputBarPlaceholderText() {
const inputText = await this.inputText;
return inputText.getAttribute('placeholderValue');
}

async clearInputBar() {
const inputText = await this.inputText;
await inputText.clearValue();
Expand Down
10 changes: 10 additions & 0 deletions tests/specs/reusable-accounts/04-message-input.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ export default async function messageInputTests() {
await expect(messageContents).toHaveText("Bolds1");
});

it('should have the correct placeholder text', async () => {
await InputBar.inputText.waitForDisplayed();
// Retrieve the placeholder text
const actualPlaceholderText = await InputBar.getInputBarPlaceholderText();
// Define expected placeholder text
const expectedPlaceholderText = 'Say something...';
// Assert that the actual placeholder text matches the expected placeholder text
expect(actualPlaceholderText).toEqual(expectedPlaceholderText);
});

it("Chat Input Text - Validate texts with __ markdown are sent in bolds", async () => {
// With Chat User A, send a message with __ markdown
await InputBar.typeMessageOnInput("__Bolds2__");
Expand Down
Loading