mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Tests: Improve acceptance tests
This commit is contained in:
@@ -71,7 +71,6 @@ test.meta("testID", "states-001").meta({ mode: "public" })("Common: Update state
|
|||||||
|
|
||||||
await album.openAlbumWithUid(AlbumUid);
|
await album.openAlbumWithUid(AlbumUid);
|
||||||
await toolbar.triggerToolbarAction("edit");
|
await toolbar.triggerToolbarAction("edit");
|
||||||
await t.click(albumdialog.category).wait(3000);
|
|
||||||
|
|
||||||
await t
|
await t
|
||||||
.expect(albumdialog.description.value)
|
.expect(albumdialog.description.value)
|
||||||
@@ -103,70 +102,61 @@ test.meta("testID", "states-001").meta({ mode: "public" })("Common: Update state
|
|||||||
.notContains("Earth");
|
.notContains("Earth");
|
||||||
});
|
});
|
||||||
|
|
||||||
test.meta("testID", "states-002").meta({ mode: "public" })(
|
test.meta("testID", "states-002").meta({ mode: "public" })("Common: Create, Edit, delete sharing link for state", async (t) => {
|
||||||
"Common: Create, Edit, delete sharing link for state",
|
await page.testCreateEditDeleteSharingLink("states");
|
||||||
async (t) => {
|
});
|
||||||
await page.testCreateEditDeleteSharingLink("states");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
test.meta("testID", "states-003").meta({ mode: "public" })(
|
test.meta("testID", "states-003").meta({ mode: "public" })("Common: Create/delete album-clone from state", async (t) => {
|
||||||
"Common: Create/delete album-clone from state",
|
await menu.openPage("albums");
|
||||||
async (t) => {
|
const AlbumCount = await album.getAlbumCount("all");
|
||||||
await menu.openPage("albums");
|
await toolbar.search("Holiday");
|
||||||
const AlbumCount = await album.getAlbumCount("all");
|
const HolidayAlbumUid = await album.getNthAlbumUid("all", 0);
|
||||||
await toolbar.search("Holiday");
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
||||||
const HolidayAlbumUid = await album.getNthAlbumUid("all", 0);
|
const InitialPhotoCountHoliday = await photo.getPhotoCount("all");
|
||||||
await album.openAlbumWithUid(HolidayAlbumUid);
|
await menu.openPage("states");
|
||||||
const InitialPhotoCountHoliday = await photo.getPhotoCount("all");
|
await toolbar.search("Canada");
|
||||||
await menu.openPage("states");
|
const FirstStateUid = await album.getNthAlbumUid("all", 0);
|
||||||
await toolbar.search("Canada");
|
await album.openAlbumWithUid(FirstStateUid);
|
||||||
const FirstStateUid = await album.getNthAlbumUid("all", 0);
|
const PhotoCountInState = await photo.getPhotoCount("all");
|
||||||
await album.openAlbumWithUid(FirstStateUid);
|
const FirstPhotoUid = await photo.getNthPhotoUid("image", 0);
|
||||||
const PhotoCountInState = await photo.getPhotoCount("all");
|
const SecondPhotoUid = await photo.getNthPhotoUid("image", 1);
|
||||||
const FirstPhotoUid = await photo.getNthPhotoUid("image", 0);
|
await menu.openPage("states");
|
||||||
const SecondPhotoUid = await photo.getNthPhotoUid("image", 1);
|
await album.selectAlbumFromUID(FirstStateUid);
|
||||||
await menu.openPage("states");
|
await contextmenu.triggerContextMenuAction("clone", ["NotYetExistingAlbumForState", "Holiday"]);
|
||||||
await album.selectAlbumFromUID(FirstStateUid);
|
await menu.openPage("albums");
|
||||||
await contextmenu.triggerContextMenuAction("clone", ["NotYetExistingAlbumForState", "Holiday"]);
|
const AlbumCountAfterCreation = await album.getAlbumCount("all");
|
||||||
await menu.openPage("albums");
|
|
||||||
const AlbumCountAfterCreation = await album.getAlbumCount("all");
|
|
||||||
|
|
||||||
await t.expect(AlbumCountAfterCreation).eql(AlbumCount + 1);
|
await t.expect(AlbumCountAfterCreation).eql(AlbumCount + 1);
|
||||||
|
|
||||||
await toolbar.search("NotYetExistingAlbumForState");
|
await toolbar.search("NotYetExistingAlbumForState");
|
||||||
const AlbumUid = await album.getNthAlbumUid("all", 0);
|
const AlbumUid = await album.getNthAlbumUid("all", 0);
|
||||||
await album.openAlbumWithUid(AlbumUid);
|
await album.openAlbumWithUid(AlbumUid);
|
||||||
const PhotoCountInAlbum = await photo.getPhotoCount("all");
|
const PhotoCountInAlbum = await photo.getPhotoCount("all");
|
||||||
|
|
||||||
await t.expect(PhotoCountInAlbum).eql(PhotoCountInState);
|
await t.expect(PhotoCountInAlbum).eql(PhotoCountInState);
|
||||||
|
|
||||||
await photo.checkPhotoVisibility(FirstPhotoUid, true);
|
await photo.checkPhotoVisibility(FirstPhotoUid, true);
|
||||||
await photo.checkPhotoVisibility(SecondPhotoUid, true);
|
await photo.checkPhotoVisibility(SecondPhotoUid, true);
|
||||||
await menu.openPage("albums");
|
await menu.openPage("albums");
|
||||||
await album.selectAlbumFromUID(AlbumUid);
|
await album.selectAlbumFromUID(AlbumUid);
|
||||||
await contextmenu.triggerContextMenuAction("delete", "");
|
await contextmenu.triggerContextMenuAction("delete", "");
|
||||||
const AlbumCountAfterDelete = await album.getAlbumCount("all");
|
const AlbumCountAfterDelete = await album.getAlbumCount("all");
|
||||||
|
|
||||||
await t.expect(AlbumCountAfterDelete).eql(AlbumCount);
|
await t.expect(AlbumCountAfterDelete).eql(AlbumCount);
|
||||||
await album.openAlbumWithUid(HolidayAlbumUid);
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
||||||
await photo.selectPhotoFromUID(FirstPhotoUid);
|
await photo.selectPhotoFromUID(FirstPhotoUid);
|
||||||
await photo.selectPhotoFromUID(SecondPhotoUid);
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
||||||
await contextmenu.triggerContextMenuAction("remove", "");
|
await contextmenu.triggerContextMenuAction("remove", "");
|
||||||
const PhotoCountHolidayAfterDelete = await photo.getPhotoCount("all");
|
const PhotoCountHolidayAfterDelete = await photo.getPhotoCount("all");
|
||||||
|
|
||||||
await t.expect(PhotoCountHolidayAfterDelete).eql(InitialPhotoCountHoliday);
|
await t.expect(PhotoCountHolidayAfterDelete).eql(InitialPhotoCountHoliday);
|
||||||
|
|
||||||
await menu.openPage("states");
|
await menu.openPage("states");
|
||||||
await album.openAlbumWithUid(FirstStateUid);
|
await album.openAlbumWithUid(FirstStateUid);
|
||||||
await photo.checkPhotoVisibility(FirstPhotoUid, true);
|
await photo.checkPhotoVisibility(FirstPhotoUid, true);
|
||||||
await photo.checkPhotoVisibility(SecondPhotoUid, true);
|
await photo.checkPhotoVisibility(SecondPhotoUid, true);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
test.meta("testID", "states-004").meta({ type: "short", mode: "public" })(
|
test.meta("testID", "states-004").meta({ type: "short", mode: "public" })("Common: Set album cover from States Page", async (t) => {
|
||||||
"Common: Set album cover from States Page",
|
await page.testSetAlbumCover("states");
|
||||||
async (t) => {
|
});
|
||||||
await page.testSetAlbumCover("states");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|||||||
Reference in New Issue
Block a user