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

update(test): fixes for CI bugs on automation tests #165

Merged
merged 1 commit into from
Sep 26, 2024
Merged
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
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
Loading