Skip to content

Commit

Permalink
update(test): fixes for CI bugs on automation tests (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Sep 26, 2024
1 parent 79b9f72 commit 93def28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 0 additions & 6 deletions playwright/PageObjects/ChatsMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,16 +1058,10 @@ export class ChatsMainPage extends MainPage {
const fileEmbedName = fileEmbed.getByTestId("file-embed-name");
const fileEmbedSize = fileEmbed.getByTestId("file-embed-size");
const downloadButton = fileEmbed.getByTestId("file-embed-download-button");
const shareButton = fileEmbed.getByTestId("file-embed-share-button");
const addToFilesButton = fileEmbed.getByTestId(
"file-embed-add-to-files-button",
);
await expect(fileEmbedIcon).toBeVisible();
await expect(fileEmbedName).toHaveText(name);
await expect(fileEmbedSize).toHaveText(size);
await expect(downloadButton).toBeVisible();
await expect(shareButton).toBeVisible();
await expect(addToFilesButton).toBeVisible();
}

async validateImageEmbedInChat(name: string, size: string, sent: boolean) {
Expand Down
2 changes: 1 addition & 1 deletion playwright/specs/02-friends-one-instance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test.describe("Friends tests", () => {
await friendsScreen.goToAllFriendsList();
await expect(friendsScreen.buttonFriendsAll).toHaveCSS(
"background-color",
"color(srgb 0.371765 0.371765 1)",
"rgb(35, 41, 62)",
);
await expect(friendsScreen.buttonFriendsActive).toHaveCSS(
"background-color",
Expand Down
7 changes: 6 additions & 1 deletion playwright/specs/24-files.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,13 @@ test.describe("Files Page Tests", () => {
// Create again the same folder
await filesPage.createNewFolder("NewFolder");

// Validate only one folder is created
const countOfFolders = await page.locator('[data-cy^="folder-"]').count();
// One element located by the count is '[data-cy="folder-list"]' which is the sidebar folder list, therefore only one folder is created
expect(countOfFolders).toEqual(2);

// Toast notification should be displayed
await expect(filesPage.toastNotification).toBeVisible();
await filesPage.toastNotification.last().waitFor({ state: "visible" });
});

test("F10 - User can create subfolders and navigate to parent folder with go back button", async ({
Expand Down

0 comments on commit 93def28

Please sign in to comment.