|
|
|
|
@@ -24,86 +24,81 @@ const albumdialog = new AlbumDialog();
|
|
|
|
|
const photoedit = new PhotoEdit();
|
|
|
|
|
const notifies = new Notifies();
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-001").meta({ type: "short", mode: "public" })(
|
|
|
|
|
"Common: Create/delete album on /albums",
|
|
|
|
|
async (t) => {
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
const AlbumCount = await album.getAlbumCount("all");
|
|
|
|
|
await toolbar.triggerToolbarAction("add");
|
|
|
|
|
const AlbumCountAfterCreate = await album.getAlbumCount("all");
|
|
|
|
|
const NewAlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
test.meta("testID", "albums-001").meta({ type: "short", mode: "public" })("Common: Create/delete album on /albums", async (t) => {
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
const AlbumCount = await album.getAlbumCount("all");
|
|
|
|
|
await toolbar.triggerToolbarAction("add");
|
|
|
|
|
const AlbumCountAfterCreate = await album.getAlbumCount("all");
|
|
|
|
|
const NewAlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
|
|
|
|
|
await t.expect(AlbumCountAfterCreate).eql(AlbumCount + 1);
|
|
|
|
|
await t.expect(AlbumCountAfterCreate).eql(AlbumCount + 1);
|
|
|
|
|
|
|
|
|
|
await album.selectAlbumFromUID(NewAlbumUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("delete", "");
|
|
|
|
|
const AlbumCountAfterDelete = await album.getAlbumCount("all");
|
|
|
|
|
await album.selectAlbumFromUID(NewAlbumUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("delete", "");
|
|
|
|
|
const AlbumCountAfterDelete = await album.getAlbumCount("all");
|
|
|
|
|
|
|
|
|
|
await t.expect(AlbumCountAfterDelete).eql(AlbumCountAfterCreate - 1);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
await t.expect(AlbumCountAfterDelete).eql(AlbumCountAfterCreate - 1);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-002").meta({ type: "short", mode: "public" })(
|
|
|
|
|
"Common: Create/delete album during add to album",
|
|
|
|
|
async (t) => {
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
const AlbumCount = await album.getAlbumCount("all");
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
const FirstPhotoUid = await photo.getNthPhotoUid("image", 0);
|
|
|
|
|
const SecondPhotoUid = await photo.getNthPhotoUid("image", 1);
|
|
|
|
|
test.meta("testID", "albums-002").meta({ type: "short", mode: "public" })("Common: Create/delete album during add to album", async (t) => {
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
const AlbumCount = await album.getAlbumCount("all");
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
const FirstPhotoUid = await photo.getNthPhotoUid("image", 0);
|
|
|
|
|
const SecondPhotoUid = await photo.getNthPhotoUid("image", 1);
|
|
|
|
|
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("NotYetExistingAlbum").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("NotYetExistingAlbum").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await photo.selectPhotoFromUID(FirstPhotoUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("album", "NotYetExistingAlbum");
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await photo.selectPhotoFromUID(FirstPhotoUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("album", "NotYetExistingAlbum");
|
|
|
|
|
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("NotYetExistingAlbum").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("NotYetExistingAlbum").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
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("NotYetExistingAlbum");
|
|
|
|
|
const AlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.openAlbumWithUid(AlbumUid);
|
|
|
|
|
await toolbar.triggerToolbarAction("delete");
|
|
|
|
|
await t.navigateTo("/library/albums");
|
|
|
|
|
const AlbumCountAfterDelete = await album.getAlbumCount("all");
|
|
|
|
|
await toolbar.search("NotYetExistingAlbum");
|
|
|
|
|
const AlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.openAlbumWithUid(AlbumUid);
|
|
|
|
|
await toolbar.triggerToolbarAction("delete");
|
|
|
|
|
await t.navigateTo("/library/albums");
|
|
|
|
|
await notifies.waitForAlbumsToLoad(7000);
|
|
|
|
|
const AlbumCountAfterDelete = await album.getAlbumCount("all");
|
|
|
|
|
|
|
|
|
|
await t.expect(AlbumCountAfterDelete).eql(AlbumCount);
|
|
|
|
|
await t.expect(AlbumCountAfterDelete).eql(AlbumCount);
|
|
|
|
|
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("NotYetExistingAlbum").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("NotYetExistingAlbum").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-003").meta({ type: "short", mode: "public" })("Common: Update album details", async (t) => {
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
@@ -116,11 +111,7 @@ test.meta("testID", "albums-003").meta({ type: "short", mode: "public" })("Commo
|
|
|
|
|
|
|
|
|
|
await t.expect(albumdialog.description.value).eql("").expect(albumdialog.category.value).eql("");
|
|
|
|
|
|
|
|
|
|
await t
|
|
|
|
|
.typeText(albumdialog.description, "All my animals")
|
|
|
|
|
.typeText(albumdialog.category, "Pets")
|
|
|
|
|
.pressKey("enter")
|
|
|
|
|
.click(albumdialog.dialogSave);
|
|
|
|
|
await t.typeText(albumdialog.description, "All my animals").typeText(albumdialog.category, "Pets").pressKey("enter").click(albumdialog.dialogSave);
|
|
|
|
|
|
|
|
|
|
await t.expect(page.cardTitle.nth(0).innerText).contains("Animals");
|
|
|
|
|
|
|
|
|
|
@@ -131,153 +122,142 @@ test.meta("testID", "albums-003").meta({ type: "short", mode: "public" })("Commo
|
|
|
|
|
await t.expect(albumdialog.description.value).eql("All my animals").expect(albumdialog.category.value).eql("Pets");
|
|
|
|
|
|
|
|
|
|
await t.click(albumdialog.description).pressKey("ctrl+a delete");
|
|
|
|
|
await t
|
|
|
|
|
.click(albumdialog.category)
|
|
|
|
|
.click(albumdialog.category)
|
|
|
|
|
.pressKey("ctrl+a delete")
|
|
|
|
|
.click(Selector("form.form-album-edit i.mdi-bookmark"));
|
|
|
|
|
await t.click(albumdialog.category).click(albumdialog.category).pressKey("ctrl+a delete").click(Selector("form.form-album-edit i.mdi-bookmark"));
|
|
|
|
|
await t.expect(albumdialog.category.value).eql("");
|
|
|
|
|
await t.click(albumdialog.dialogSave);
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
|
|
|
|
|
await t
|
|
|
|
|
.expect(Selector("div").withText("Holiday").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("div").withText("Animals").exists)
|
|
|
|
|
.notOk();
|
|
|
|
|
await t.expect(Selector("div").withText("Holiday").visible).ok().expect(Selector("div").withText("Animals").exists).notOk();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-004").meta({ type: "short", mode: "public" })(
|
|
|
|
|
"Common: Add/Remove Photos to/from multiple albums",
|
|
|
|
|
async (t) => {
|
|
|
|
|
// Get initial counts for both Holiday and Christmas albums
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await notifies.waitForPhotosToLoad(2000);
|
|
|
|
|
await toolbar.search("Holiday");
|
|
|
|
|
const HolidayAlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
|
|
|
|
const HolidayPhotoCount = await photo.getPhotoCount("all");
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await toolbar.search("Christmas");
|
|
|
|
|
const ChristmasAlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
const ChristmasPhotoCount = await photo.getPhotoCount("all");
|
|
|
|
|
test.meta("testID", "albums-004").meta({ type: "short", mode: "public" })("Common: Add/Remove Photos to/from multiple albums", async (t) => {
|
|
|
|
|
// Get initial counts for both Holiday and Christmas albums
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await notifies.waitForPhotosToLoad(2000);
|
|
|
|
|
await toolbar.search("Holiday");
|
|
|
|
|
const HolidayAlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
|
|
|
|
const HolidayPhotoCount = await photo.getPhotoCount("all");
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await toolbar.search("Christmas");
|
|
|
|
|
const ChristmasAlbumUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
const ChristmasPhotoCount = await photo.getPhotoCount("all");
|
|
|
|
|
|
|
|
|
|
// Select photos to add to albums
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
const FirstPhotoUid = await photo.getNthPhotoUid("image", 0);
|
|
|
|
|
const SecondPhotoUid = await photo.getNthPhotoUid("image", 1);
|
|
|
|
|
// Select photos to add to albums
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
const FirstPhotoUid = await photo.getNthPhotoUid("image", 0);
|
|
|
|
|
const SecondPhotoUid = await photo.getNthPhotoUid("image", 1);
|
|
|
|
|
|
|
|
|
|
// Verify photos are not in any albums initially
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
// Verify photos are not in any albums initially
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
|
|
|
|
|
// Select both photos and add to multiple albums simultaneously
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await photoviewer.openPhotoViewer("uid", FirstPhotoUid);
|
|
|
|
|
await photoviewer.triggerPhotoViewerAction("select-toggle");
|
|
|
|
|
await photoviewer.triggerPhotoViewerAction("close-button");
|
|
|
|
|
await contextmenu.triggerContextMenuAction("album", ["Holiday", "Christmas", "Food"]);
|
|
|
|
|
// Select both photos and add to multiple albums simultaneously
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await photoviewer.openPhotoViewer("uid", FirstPhotoUid);
|
|
|
|
|
await photoviewer.triggerPhotoViewerAction("select-toggle");
|
|
|
|
|
await photoviewer.triggerPhotoViewerAction("close-button");
|
|
|
|
|
await contextmenu.triggerContextMenuAction("album", ["Holiday", "Christmas", "Food"]);
|
|
|
|
|
|
|
|
|
|
// Verify photos were added to Holiday album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
|
|
|
|
const HolidayPhotoCountAfterAdd = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(HolidayPhotoCountAfterAdd).eql(HolidayPhotoCount + 2);
|
|
|
|
|
// Verify photos were added to Holiday album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
|
|
|
|
const HolidayPhotoCountAfterAdd = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(HolidayPhotoCountAfterAdd).eql(HolidayPhotoCount + 2);
|
|
|
|
|
|
|
|
|
|
// Verify photos were added to Christmas album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
const ChristmasPhotoCountAfterAdd = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(ChristmasPhotoCountAfterAdd).eql(ChristmasPhotoCount + 2);
|
|
|
|
|
// Verify photos were added to Christmas album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
const ChristmasPhotoCountAfterAdd = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(ChristmasPhotoCountAfterAdd).eql(ChristmasPhotoCount + 2);
|
|
|
|
|
|
|
|
|
|
// Verify photo info shows all albums
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Food").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
// Verify photo info shows all albums
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Food").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
|
|
|
|
|
// Remove photos from Holiday album and verify count
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
|
|
|
|
await photo.selectPhotoFromUID(FirstPhotoUid);
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("remove", "");
|
|
|
|
|
const HolidayPhotoCountAfterRemove = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(HolidayPhotoCountAfterRemove).eql(HolidayPhotoCountAfterAdd - 2);
|
|
|
|
|
// Remove photos from Holiday album and verify count
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(HolidayAlbumUid);
|
|
|
|
|
await photo.selectPhotoFromUID(FirstPhotoUid);
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("remove", "");
|
|
|
|
|
const HolidayPhotoCountAfterRemove = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(HolidayPhotoCountAfterRemove).eql(HolidayPhotoCountAfterAdd - 2);
|
|
|
|
|
|
|
|
|
|
// Verify photos are still in Christmas album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
const ChristmasPhotoCountAfterHolidayRemove = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(ChristmasPhotoCountAfterHolidayRemove).eql(ChristmasPhotoCountAfterAdd);
|
|
|
|
|
// Verify photos are still in Christmas album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
const ChristmasPhotoCountAfterHolidayRemove = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(ChristmasPhotoCountAfterHolidayRemove).eql(ChristmasPhotoCountAfterAdd);
|
|
|
|
|
|
|
|
|
|
// Verify photo info shows only Christmas album now
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
// Verify photo info shows only Christmas album now
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
|
|
|
|
|
// Remove photos from Christmas album to clean up
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
await photo.selectPhotoFromUID(FirstPhotoUid);
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("remove", "");
|
|
|
|
|
const ChristmasPhotoCountAfterRemove = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(ChristmasPhotoCountAfterRemove).eql(ChristmasPhotoCount);
|
|
|
|
|
// Remove photos from Christmas album to clean up
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.openAlbumWithUid(ChristmasAlbumUid);
|
|
|
|
|
await photo.selectPhotoFromUID(FirstPhotoUid);
|
|
|
|
|
await photo.selectPhotoFromUID(SecondPhotoUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("remove", "");
|
|
|
|
|
const ChristmasPhotoCountAfterRemove = await photo.getPhotoCount("all");
|
|
|
|
|
await t.expect(ChristmasPhotoCountAfterRemove).eql(ChristmasPhotoCount);
|
|
|
|
|
|
|
|
|
|
// Delete Food album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await toolbar.search("Food");
|
|
|
|
|
const FoodUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.selectAlbumFromUID(FoodUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("delete", "");
|
|
|
|
|
// Delete Food album
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await toolbar.search("Food");
|
|
|
|
|
const FoodUid = await album.getNthAlbumUid("all", 0);
|
|
|
|
|
await album.selectAlbumFromUID(FoodUid);
|
|
|
|
|
await contextmenu.triggerContextMenuAction("delete", "");
|
|
|
|
|
|
|
|
|
|
// Final verification that photos are not in any albums
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Food").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
// Final verification that photos are not in any albums
|
|
|
|
|
await menu.openPage("browse");
|
|
|
|
|
await toolbar.search("photo:true");
|
|
|
|
|
await page.clickCardTitleOfUID(FirstPhotoUid);
|
|
|
|
|
await t
|
|
|
|
|
.click(photoedit.infoTab)
|
|
|
|
|
.expect(Selector("td").withText("Albums").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Food").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Holiday").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.expect(Selector("td").withText("Christmas").visible)
|
|
|
|
|
.notOk()
|
|
|
|
|
.click(photoedit.dialogClose);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-004-duplicate").meta({ type: "short", mode: "public" })(
|
|
|
|
|
"Common: Album duplication when selecting from dropdown then typing same name",
|
|
|
|
|
@@ -341,11 +321,7 @@ test.meta("testID", "albums-006").meta({ mode: "public" })("Common: Test album a
|
|
|
|
|
await contextmenu.openContextMenu();
|
|
|
|
|
await t.click(Selector("button.action-album")).click(Selector(".input-albums input"));
|
|
|
|
|
|
|
|
|
|
await t
|
|
|
|
|
.expect(page.selectOption.withText("Holiday").visible)
|
|
|
|
|
.ok()
|
|
|
|
|
.expect(page.selectOption.withText("Christmas").visible)
|
|
|
|
|
.ok();
|
|
|
|
|
await t.expect(page.selectOption.withText("Holiday").visible).ok().expect(page.selectOption.withText("Christmas").visible).ok();
|
|
|
|
|
|
|
|
|
|
await t.typeText(Selector(".input-albums input"), "C", { replace: true });
|
|
|
|
|
|
|
|
|
|
@@ -358,24 +334,15 @@ test.meta("testID", "albums-006").meta({ mode: "public" })("Common: Test album a
|
|
|
|
|
.ok();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-007").meta({ type: "short", mode: "public" })(
|
|
|
|
|
"Common: Create, Edit, delete sharing link",
|
|
|
|
|
async (t) => {
|
|
|
|
|
await page.testCreateEditDeleteSharingLink("albums");
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
test.meta("testID", "albums-007").meta({ type: "short", mode: "public" })("Common: Create, Edit, delete sharing link", async (t) => {
|
|
|
|
|
await page.testCreateEditDeleteSharingLink("albums");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-008").meta({ type: "short", mode: "public" })(
|
|
|
|
|
"Common: Verify album sort options",
|
|
|
|
|
async (t) => {
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.checkSortOptions("album");
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
test.meta("testID", "albums-008").meta({ type: "short", mode: "public" })("Common: Verify album sort options", async (t) => {
|
|
|
|
|
await menu.openPage("albums");
|
|
|
|
|
await album.checkSortOptions("album");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test.meta("testID", "albums-009").meta({ type: "short", mode: "public" })(
|
|
|
|
|
"Common: Set album cover from Albums Page",
|
|
|
|
|
async (t) => {
|
|
|
|
|
await page.testSetAlbumCover("albums");
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
test.meta("testID", "albums-009").meta({ type: "short", mode: "public" })("Common: Set album cover from Albums Page", async (t) => {
|
|
|
|
|
await page.testSetAlbumCover("albums");
|
|
|
|
|
});
|
|
|
|
|
|