mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-8064] Migrate actions-favorites tests to Playwright (#3871)
* ACS-8064 Migrate actions-favorites tests to Playwright
This commit is contained in:
@@ -115,4 +115,16 @@ export class FavoritesPageApi {
|
||||
return await Utils.retryCall(favoriteFiles);
|
||||
} catch {}
|
||||
}
|
||||
|
||||
async removeFavoritesByIds(username: string, ids: string[]): Promise<void> {
|
||||
try {
|
||||
if (ids && ids.length > 0) {
|
||||
for (const id of ids) {
|
||||
await this.apiService.favorites.deleteFavorite(username, id);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('FavoritesApi: removeFavoritesByIds failed ', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -103,4 +103,12 @@ export class PersonalFilesPage extends BasePage {
|
||||
await this.contentNodeSelector.selectDestination(destinationName);
|
||||
await this.contentNodeSelector.actionButton.click();
|
||||
}
|
||||
|
||||
async selectItemsAndToggleFavorite(item: string[], action: 'Favorite' | 'Remove Favorite') {
|
||||
for (const itemToSelect of item) {
|
||||
await this.dataTable.selectItem(itemToSelect);
|
||||
}
|
||||
await this.acaHeader.clickMoreActions();
|
||||
await this.matMenu.clickMenuItem(action);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user