diff --git a/ts/components/dialog/EditProfilePictureModal.tsx b/ts/components/dialog/EditProfilePictureModal.tsx
index 7f69082f6..2c21bf535 100644
--- a/ts/components/dialog/EditProfilePictureModal.tsx
+++ b/ts/components/dialog/EditProfilePictureModal.tsx
@@ -116,7 +116,12 @@ export const EditProfilePictureModal = (props: EditProfilePictureModalProps) =>
showHeader={true}
showExitIcon={true}
>
-
+
{newAvatarObjectUrl || avatarPath ? (
buttonType={SessionButtonType.Simple}
onClick={handleUpload}
disabled={newAvatarObjectUrl === avatarPath}
+ dataTestId="save-button-profile-update"
/>
{
await waitForTestIdWithText(windowA, 'copy-button-profile-update', 'Copy');
await clickOnTestIdWithText(windowA, 'image-upload-section');
+ await clickOnTestIdWithText(windowA, 'image-upload-click');
await clickOnTestIdWithText(windowA, 'save-button-profile-update');
await waitForTestIdWithText(windowA, 'loading-spinner');
- await waitForTestIdWithText(windowA, 'copy-button-profile-update', 'Copy');
- await clickOnTestIdWithText(windowA, 'modal-close-button');
-
- await sleepFor(500);
+ await sleepFor(5000);
const leftpaneAvatarContainer = await waitForTestIdWithText(windowB, 'leftpane-primary-avatar');
await sleepFor(500);
const screenshot = await leftpaneAvatarContainer.screenshot({
diff --git a/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg b/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg
index 06f76803d..1cd8d20b1 100644
Binary files a/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg and b/ts/test/automation/linked_device_user.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg differ
diff --git a/ts/test/automation/setup/beforeEach.ts b/ts/test/automation/setup/beforeEach.ts
index f47f97418..6ba353549 100644
--- a/ts/test/automation/setup/beforeEach.ts
+++ b/ts/test/automation/setup/beforeEach.ts
@@ -1,5 +1,5 @@
import { Page } from '@playwright/test';
-import { readdirSync, rmdirSync } from 'fs-extra';
+import { readdirSync, rm } from 'fs-extra';
import { join } from 'path';
import { homedir } from 'os';
import { isLinux, isMacOS } from '../../../OS';
@@ -25,9 +25,9 @@ function cleanUpOtherTest() {
alreadyCleanedWaiting = true;
const parentFolderOfAllDataPath = isMacOS()
- ? '~/Library/Application Support/'
+ ? join(homedir(), 'Library', 'Application Support')
: isLinux()
- ? `${homedir()}/.config/`
+ ? join(homedir(), '.config')
: null;
if (!parentFolderOfAllDataPath) {
throw new Error('Only macOS is currrently supported ');
@@ -43,7 +43,7 @@ function cleanUpOtherTest() {
allAppDataPath.map(folder => {
const pathToRemove = join(parentFolderOfAllDataPath, folder);
- rmdirSync(pathToRemove, { recursive: true });
+ rm(pathToRemove, { recursive: true }, () => pathToRemove);
});
console.info('...done');
}
diff --git a/ts/test/automation/user_actions.spec.ts b/ts/test/automation/user_actions.spec.ts
index d26476440..cc93bdd3f 100644
--- a/ts/test/automation/user_actions.spec.ts
+++ b/ts/test/automation/user_actions.spec.ts
@@ -132,7 +132,7 @@ sessionTestOneWindow('Change username', async ([window]) => {
await window.click('.session-icon-button.small');
});
-sessionTestOneWindow('Change avatar', async ([window]) => {
+sessionTestOneWindow('Change profile picture', async ([window]) => {
await newUser(window, 'Alice');
// Open profile
await clickOnTestIdWithText(window, 'leftpane-primary-avatar');
@@ -140,13 +140,11 @@ sessionTestOneWindow('Change avatar', async ([window]) => {
await waitForTestIdWithText(window, 'copy-button-profile-update', 'Copy');
await clickOnTestIdWithText(window, 'image-upload-section');
+ await clickOnTestIdWithText(window, 'image-upload-click');
await clickOnTestIdWithText(window, 'save-button-profile-update');
await waitForTestIdWithText(window, 'loading-spinner');
- await waitForTestIdWithText(window, 'copy-button-profile-update', 'Copy');
- await clickOnTestIdWithText(window, 'modal-close-button');
-
- await sleepFor(500);
+ await sleepFor(5000);
const leftpaneAvatarContainer = await waitForTestIdWithText(window, 'leftpane-primary-avatar');
await sleepFor(500);
const screenshot = await leftpaneAvatarContainer.screenshot({
diff --git a/ts/test/automation/user_actions.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg b/ts/test/automation/user_actions.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg
index 079323ef7..79defdd42 100644
Binary files a/ts/test/automation/user_actions.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg and b/ts/test/automation/user_actions.spec.ts-snapshots/avatar-updated-blue-darwin.jpeg differ