mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACS-12501] Added test for XAT-19797 (#5349)
* [ACS-12501] Added test for XAT-19797 * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * [ACS-12501] review fixes 1 * [ACS-12501] changed the expect for XAT-19797 --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
df92e11d9a
commit
2309486ff2
@@ -1,3 +1,9 @@
|
||||
{
|
||||
"all": {}
|
||||
"all": {},
|
||||
"firefox": {
|
||||
"XAT-19797": "https://hyland.atlassian.net/browse/ACS-12501"
|
||||
},
|
||||
"webkit": {
|
||||
"XAT-19797": "https://hyland.atlassian.net/browse/ACS-12501"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ test.describe('Info Drawer - General', () => {
|
||||
let nodesApi: NodesApi;
|
||||
|
||||
const username = `user1-${Utils.random()}`;
|
||||
const file19797Name = `file19797-${Utils.random()}.txt`;
|
||||
|
||||
test.beforeAll(async () => {
|
||||
try {
|
||||
@@ -40,6 +41,9 @@ test.describe('Info Drawer - General', () => {
|
||||
fileActionsApi = await FileActionsApi.initialize(username, username);
|
||||
trashcanApi = await TrashcanApi.initialize(username, username);
|
||||
nodesApi = await NodesApi.initialize(username, username);
|
||||
|
||||
await nodesApi.createFile(file19797Name);
|
||||
await fileActionsApi.waitForNodes(file19797Name, { expect: 1 });
|
||||
} catch (error) {
|
||||
console.error(`beforeAll failed: ${error}`);
|
||||
}
|
||||
@@ -79,4 +83,19 @@ test.describe('Info Drawer - General', () => {
|
||||
await personalFiles.reload({ waitUntil: 'load' });
|
||||
await expect(personalFiles.infoDrawer.infoDrawerPanel).toBeHidden();
|
||||
});
|
||||
|
||||
test('[XAT-19797] Double clicking name of a node copies the name to the clipboard', async ({ personalFiles }) => {
|
||||
await personalFiles.page.context().grantPermissions(['clipboard-read', 'clipboard-write']);
|
||||
await personalFiles.navigate();
|
||||
await expect(personalFiles.dataTable.getRowByName(file19797Name)).toBeVisible();
|
||||
await personalFiles.dataTable.selectItems(file19797Name);
|
||||
await personalFiles.acaHeader.viewDetails.click();
|
||||
await expect(personalFiles.infoDrawer.infoDrawerPanel).toBeVisible();
|
||||
await personalFiles.infoDrawer.generalInfoNameField.waitFor();
|
||||
await personalFiles.infoDrawer.generalInfoNameField.dblclick({ force: true });
|
||||
await expect.soft(personalFiles.snackBar.message).toHaveText('Value copied to clipboard');
|
||||
|
||||
const clipboardText = await personalFiles.page.evaluate(() => navigator.clipboard.readText());
|
||||
expect(clipboardText).toBe(file19797Name);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user