[ACS-12817] review fixes 1

This commit is contained in:
Adam Świderski
2026-09-16 14:57:37 +02:00
committed by Adam Świderski
parent d130d56855
commit da05018744
2 changed files with 7 additions and 3 deletions
@@ -53,7 +53,7 @@ test.describe('Copy actions', () => {
}); });
test.beforeEach(async ({ personalFiles, page }) => { test.beforeEach(async ({ personalFiles, page }) => {
const sourceFileRandom = `${Utils.random()}`; const sourceFileRandom = Utils.random();
sourceFile = `source-file-${sourceFileRandom}`; sourceFile = `source-file-${sourceFileRandom}`;
sourceFileWorkingCopy = `source-file-${sourceFileRandom} (Working Copy)`; sourceFileWorkingCopy = `source-file-${sourceFileRandom} (Working Copy)`;
sourceFileInsideFolder = `source-file-inside-folder-${Utils.random()}.txt`; sourceFileInsideFolder = `source-file-inside-folder-${Utils.random()}.txt`;
@@ -125,7 +125,7 @@ test.describe('Copy actions', () => {
test('[XAT-4944] Copy a file with a name that already exists on the destination', async ({ personalFiles }) => { test('[XAT-4944] Copy a file with a name that already exists on the destination', async ({ personalFiles }) => {
await nodesApi.createFile(sourceFile, destinationFolderId); await nodesApi.createFile(sourceFile, destinationFolderId);
const expectedNameForCopiedFile = `${sourceFile + '-1'}`; const expectedNameForCopiedFile = `${sourceFile}-1`;
await Utils.reloadPageIfRowNotVisible(personalFiles, sourceFile); await Utils.reloadPageIfRowNotVisible(personalFiles, sourceFile);
await copyContentInPersonalFiles(personalFiles, [sourceFile], destinationFolder); await copyContentInPersonalFiles(personalFiles, [sourceFile], destinationFolder);
expect.soft(await personalFiles.dataTable.isItemPresent(sourceFile)).toBe(true); expect.soft(await personalFiles.dataTable.isItemPresent(sourceFile)).toBe(true);
@@ -73,6 +73,7 @@ test.describe('Edit offline - on Personal Files', () => {
personalFiles.matMenu.clickMenuItem('Edit Offline') personalFiles.matMenu.clickMenuItem('Edit Offline')
]); ]);
expect(download.suggestedFilename()).toBe(file5304); expect(download.suggestedFilename()).toBe(file5304);
expect(await fileActionsApi.isFileCheckedOutWithRetry(file5304Id, true), `${file5304} is not locked`).toBe(true);
}); });
}); });
@@ -133,10 +134,12 @@ test.describe('Edit offline - on Personal Files', () => {
test.describe('[XAT-20171] Cancel Editing option should not persists after uploading a new file version', () => { test.describe('[XAT-20171] Cancel Editing option should not persists after uploading a new file version', () => {
const file20171 = `file-20171-${Utils.random()}`; const file20171 = `file-20171-${Utils.random()}`;
let fileLocked20171Id: string;
test.beforeAll(async () => { test.beforeAll(async () => {
try { try {
await fileActionsApi.uploadFileWithRename(TEST_FILES.PNG_FILE.path, file20171); fileLocked20171Id = (await fileActionsApi.uploadFileWithRename(TEST_FILES.PNG_FILE.path, file20171)).entry.id;
await nodesApi.checkoutNodes([fileLocked20171Id]);
} catch (error) { } catch (error) {
console.error(`beforeAll failed : ${error}`); console.error(`beforeAll failed : ${error}`);
} }
@@ -160,6 +163,7 @@ test.describe('Edit offline - on Personal Files', () => {
await personalFiles.dataTable.selectItems(TEST_FILES.PNG_FILE.name); await personalFiles.dataTable.selectItems(TEST_FILES.PNG_FILE.name);
await personalFiles.acaHeader.clickMoreActions(); await personalFiles.acaHeader.clickMoreActions();
await expect(personalFiles.matMenu.getButtonByText('Upload New Version')).toBeVisible(); await expect(personalFiles.matMenu.getButtonByText('Upload New Version')).toBeVisible();
await expect(personalFiles.matMenu.getButtonByText('Cancel Editing')).toBeHidden();
}); });
}); });
}); });