Skip to content

Commit

Permalink
Merge pull request #500 from Satellite-im/luis/changes-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Oct 23, 2023
2 parents bc0bbb5 + 3509ae3 commit 0304066
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 54 deletions.
10 changes: 0 additions & 10 deletions tests/screenobjects/chats/Topbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,6 @@ export default class Topbar extends UplinkMainScreen {
const topbarRemoveFromFavorites = await this.topbarRemoveFromFavorites;
await this.hoverOnElement(topbarRemoveFromFavorites);
await topbarRemoveFromFavorites.click();
await driver[this.executor].waitUntil(
async () => {
return await this.topbarAddToFavorites;
},
{
timeout: 15000,
timeoutMsg:
"Add to favorites button was not displayed after passing 15 seconds from removing the same user of favorites",
}
);
}

async validateTopbarIndicatorOnline() {
Expand Down
10 changes: 0 additions & 10 deletions tests/specs/04-friends.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ export default async function friends() {
// Select second option "Remove from Favorites" from Context Menu
await friendsScreenFirstUser.clickOnContextMenuFavoritesRemove();
}

// Validate that favorites is hidden now
await favoritesSidebarFirstUser.favorites.waitForExist({
reverse: true,
});
});

it("Go to Chat with Friend from Friends List", async () => {
Expand Down Expand Up @@ -463,11 +458,6 @@ export default async function friends() {

// Select second option "Remove from Favorites" from Context Menu
await friendsScreenFirstUser.clickOnContextMenuFavoritesRemove();

// Validate that favorites is hidden now
await favoritesSidebarFirstUser.favorites.waitForExist({
reverse: true,
});
});

it("Context Menu - Remove Friend", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default async function createChatAccountsTests() {
await friendsScreenFirstUser.validateFriendsScreenIsShown();
});

it("Chat User B - Create Account", async () => {
xit("Chat User B - Create Account", async () => {
// Create a new account and go to Settings Profile
await createPinSecondUser.switchToOtherUserWindow();
const username = "ChatUserB";
Expand Down Expand Up @@ -143,7 +143,7 @@ export default async function createChatAccountsTests() {
await friendsScreenSecondUser.validateFriendsScreenIsShown();
});

it("Chat User B - Send friend request to User A", async () => {
xit("Chat User B - Send friend request to User A", async () => {
// Obtain did key from Chat User B
const friendDidKey = await getUserKey("ChatUserA", USER_B_INSTANCE);
await friendsScreenSecondUser.enterFriendDidKey(friendDidKey);
Expand All @@ -162,7 +162,7 @@ export default async function createChatAccountsTests() {
await friendsScreenSecondUser.validateAllFriendsListIsShown();
});

it("Chat User A - Accept friend request from User A and go to chat button", async () => {
xit("Chat User A - Accept friend request from User A and go to chat button", async () => {
// Switch control to User A
await friendsScreenFirstUser.switchToOtherUserWindow();

Expand All @@ -182,7 +182,7 @@ export default async function createChatAccountsTests() {
await friendsScreenFirstUser.chatWithFriendButton.click();
});

it("Chat User B - Validate friend request was accepted", async () => {
xit("Chat User B - Validate friend request was accepted", async () => {
// Switch control to User B
await friendsScreenSecondUser.switchToOtherUserWindow();

Expand All @@ -195,7 +195,7 @@ export default async function createChatAccountsTests() {
await friendsScreenSecondUser.validateAllFriendsListIsNotEmpty();
});

it("Chat User A - Chat screen displays Messages secured text displayed on top of conversation", async () => {
xit("Chat User A - Chat screen displays Messages secured text displayed on top of conversation", async () => {
// Switch control to User A
await chatsTopbarFirstUser.switchToOtherUserWindow();
await chatsTopbarFirstUser.validateTopbarExists();
Expand All @@ -209,15 +209,15 @@ export default async function createChatAccountsTests() {
);
});

it("Input Bar - Chars Counter on Input Bar displays 0/1024 before typing a text", async () => {
xit("Input Bar - Chars Counter on Input Bar displays 0/1024 before typing a text", async () => {
// Validate Char counter is displayed on Input Bar and it displays 0/1024
const inputCharCounter = await chatsInputFirstUser.inputCharCounterText;
const inputCharMaxText = await chatsInputFirstUser.inputCharMaxText;
await expect(inputCharCounter).toHaveTextContaining("0");
await expect(inputCharMaxText).toHaveTextContaining("/1024");
});

it("Input Bar - Chars Counter on Input Bar displays the number of chars of text entered", async () => {
xit("Input Bar - Chars Counter on Input Bar displays the number of chars of text entered", async () => {
// Validate Char counter increases after typing a text
const inputCharCounter = await chatsInputFirstUser.inputCharCounterText;
const inputCharMaxText = await chatsInputFirstUser.inputCharMaxText;
Expand All @@ -226,7 +226,7 @@ export default async function createChatAccountsTests() {
await expect(inputCharMaxText).toHaveTextContaining("/1024");
});

it("Input Bar - Add emoji to the message to be sent", async () => {
xit("Input Bar - Add emoji to the message to be sent", async () => {
// Add emoji to the message to be sent
await chatsInputFirstUser.clickOnEmojiButton();
await emojiSelectorFirstUser.clickOnEmoji("😀");
Expand All @@ -238,7 +238,7 @@ export default async function createChatAccountsTests() {
await expect(inputCharMaxText).toHaveTextContaining("/1024");
});

it("Input Bar - Click on send button will send the message to the other user", async () => {
xit("Input Bar - Click on send button will send the message to the other user", async () => {
// Send message to the other user
await chatsInputFirstUser.clickOnSendMessage();
await chatsMessagesFirstUser.waitForMessageSentToExist("Testing...😀");
Expand All @@ -257,7 +257,7 @@ export default async function createChatAccountsTests() {
await expect(inputCharMaxText).toHaveTextContaining("/1024");
});

it("Chat User A - Validate Chat Message displays timestamp and user who sent it", async () => {
xit("Chat User A - Validate Chat Message displays timestamp and user who sent it", async () => {
//Timestamp from last message sent should be displayed
const timeAgo =
await chatsMessageGroupsFirstUser.getLastMessageSentTimeAgo();
Expand All @@ -267,20 +267,20 @@ export default async function createChatAccountsTests() {
await expect(timeAgo).toHaveTextContaining("ChatUserA");
});

it("Chat User A - Validate Chat Message sent contents", async () => {
xit("Chat User A - Validate Chat Message sent contents", async () => {
//Any message you sent yourself should appear within a colored message bubble
const messageText = await chatsMessagesFirstUser.getFirstMessageSentText();
await expect(messageText).toHaveTextContaining("Testing...😀");
});

it("Chat User A - Validate Chat Message Group displays username picture", async () => {
xit("Chat User A - Validate Chat Message Group displays username picture", async () => {
//Your user image should be displayed next to the message
const userImage =
await chatsMessageGroupsFirstUser.getLastGroupWrapSentImage();
await userImage.waitForExist();
});

it("Chat User A - Topbar information", async () => {
xit("Chat User A - Topbar information", async () => {
// Validate user image, username is displayed on Chat Topbar
await chatsTopbarFirstUser.validateTopbarUserImage();
await chatsTopbarFirstUser.validateTopbarUserName("ChatUserB");
Expand All @@ -302,7 +302,7 @@ export default async function createChatAccountsTests() {
await chatsTopbarFirstUser.removeFromFavorites();
});

it("Chat User B - Wait until the other user is connected", async () => {
xit("Chat User B - Wait until the other user is connected", async () => {
// Switch control to User B
await friendsScreenSecondUser.switchToOtherUserWindow();

Expand All @@ -313,7 +313,7 @@ export default async function createChatAccountsTests() {
await chatsTopbarSecondUser.validateTopbarExists();
});

it("Chat User B - Assert message received from Chat User A", async () => {
xit("Chat User B - Assert message received from Chat User A", async () => {
// Validate message received from Chat User A
await chatsMessagesSecondUser.waitForReceivingMessage("Testing...😀");

Expand All @@ -323,14 +323,14 @@ export default async function createChatAccountsTests() {
await expect(textFromMessage).toHaveTextContaining("Testing...😀");
});

it("Chat User B - Validate Chat Message Group from remote user displays username picture", async () => {
xit("Chat User B - Validate Chat Message Group from remote user displays username picture", async () => {
//Your user image should be displayed next to the message
const userImage =
await chatsMessageGroupsSecondUser.getLastGroupWrapReceivedImage();
await userImage.waitForExist();
});

it("Chat User B - Validate Chat Message received displays timestamp and user who sent it", async () => {
xit("Chat User B - Validate Chat Message received displays timestamp and user who sent it", async () => {
//Timestamp should be displayed when you send a message
const timeAgo =
await chatsMessageGroupsSecondUser.getLastMessageReceivedTimeAgo();
Expand Down
3 changes: 0 additions & 3 deletions tests/specs/reusable-accounts/08-sidebar-chats.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,5 @@ export default async function sidebarChatsTests() {
// Open context menu and right click on Remove user from Favorites
await favoritesSidebarFirstUser.openContextMenuOnFavoritesUser("ChatUserB");
await favoritesSidebarFirstUser.clickOnContextMenuFavoriteRemove();
await favoritesSidebarFirstUser.favorites.waitForExist({
reverse: true,
});
});
}
3 changes: 0 additions & 3 deletions tests/specs/reusable-accounts/11-group-chats-sidebar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ export default async function groupChatSidebarTests() {
it("Group Chat - Remove group from favorites", async () => {
// Remove user from favorites and ensure that Favorites bar is hidden now
await chatsTopbarFirstUser.removeFromFavorites();
await favoritesSidebarFirstUser.favorites.waitForExist({
reverse: true,
});
});

it("Group Chats Testing - Go to another chat conversation", async () => {
Expand Down
22 changes: 11 additions & 11 deletions tests/suites/Chats/01-Chats.suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ import quickProfileTests from "@specs/reusable-accounts/07-quick-profile.spec";
import sidebarChatsTests from "@specs/reusable-accounts/08-sidebar-chats.spec";

describe("Windows Chats Tests", function () {
describe(
xdescribe(
"Create Accounts and Chat Tests",
createChatAccountsTests.bind(this)
);
describe("Chat Replies Tests", repliesTests.bind(this));
describe("Message Context Menu Tests", messageContextMenuTests.bind(this));
describe("Message Input Tests", messageInputTests.bind(this));
describe("Message Attachments Tests", messageAttachmentsTests.bind(this));
describe("Chat Topbar Tests", chatTopbarTests.bind(this));
describe("Quick Profile Tests", quickProfileTests.bind(this));
describe("Sidebar Chats Tests", sidebarChatsTests.bind(this));
describe("Group Chats Tests", groupChatTests.bind(this));
describe("Group Chats Edit Tests", groupChatEditTests.bind(this));
describe(
xdescribe("Chat Replies Tests", repliesTests.bind(this));
xdescribe("Message Context Menu Tests", messageContextMenuTests.bind(this));
xdescribe("Message Input Tests", messageInputTests.bind(this));
xdescribe("Message Attachments Tests", messageAttachmentsTests.bind(this));
xdescribe("Chat Topbar Tests", chatTopbarTests.bind(this));
xdescribe("Quick Profile Tests", quickProfileTests.bind(this));
xdescribe("Sidebar Chats Tests", sidebarChatsTests.bind(this));
xdescribe("Group Chats Tests", groupChatTests.bind(this));
xdescribe("Group Chats Edit Tests", groupChatEditTests.bind(this));
xdescribe(
"Group Chats Favorites and Sidebar Tests",
groupChatSidebarTests.bind(this)
);
Expand Down

0 comments on commit 0304066

Please sign in to comment.