Tests: Refactor acceptance tests

This commit is contained in:
theresa 2022-10-31 09:54:50 +01:00
parent 69682de32d
commit 62882535e2
2 changed files with 19 additions and 19 deletions

View file

@ -66,7 +66,7 @@ test.meta("testID", "sharing-001").meta({ mode: "auth" })(
await t.click(Selector("div.v-toolbar__title a").withText("Albums"));
const AlbumCount = await album.getAlbumCount("all");
await t.expect(AlbumCount).eql(2);
await t.expect(AlbumCount).eql(3);
await menu.openPage("folders");
const FolderCount = await album.getAlbumCount("all");

View file

@ -159,35 +159,35 @@ test.meta("testID", "labels-003").meta({ mode: "public" })(
await album.openAlbumWithUid(AlbumUid);
const PhotoCount = await photo.getPhotoCount("all");
await menu.openPage("labels");
await toolbar.search("landscape");
const LabelLandscape = await label.getNthLabeltUid(1);
await label.openLabelWithUid(LabelLandscape);
const FirstPhotoLandscape = await photo.getNthPhotoUid("all", 0);
const SecondPhotoLandscape = await photo.getNthPhotoUid("all", 1);
const ThirdPhotoLandscape = await photo.getNthPhotoUid("all", 2);
const FourthPhotoLandscape = await photo.getNthPhotoUid("all", 3);
const FifthPhotoLandscape = await photo.getNthPhotoUid("all", 4);
const SixthPhotoLandscape = await photo.getNthPhotoUid("all", 5);
await toolbar.search("sunglasses");
const LabelSunglasses = await label.getNthLabeltUid(0);
await label.openLabelWithUid(LabelSunglasses);
const FirstPhotoSunglasses = await photo.getNthPhotoUid("all", 0);
const SecondPhotoSunglasses = await photo.getNthPhotoUid("all", 1);
const ThirdPhotoSunglasses = await photo.getNthPhotoUid("all", 2);
const FourthPhotoSunglasses = await photo.getNthPhotoUid("all", 3);
const FifthPhotoSunglasses = await photo.getNthPhotoUid("all", 4);
await menu.openPage("labels");
await label.triggerHoverAction("uid", LabelLandscape, "select");
await label.triggerHoverAction("uid", LabelSunglasses, "select");
await contextmenu.checkContextMenuCount("1");
await contextmenu.triggerContextMenuAction("album", "Christmas");
await menu.openPage("albums");
await album.openAlbumWithUid(AlbumUid);
const PhotoCountAfterAdd = await photo.getPhotoCount("all");
await t.expect(PhotoCountAfterAdd).eql(PhotoCount + 6);
await t.expect(PhotoCountAfterAdd).eql(PhotoCount + 5);
await photo.triggerHoverAction("uid", FirstPhotoSunglasses, "select");
await photo.triggerHoverAction("uid", SecondPhotoSunglasses, "select");
await photo.triggerHoverAction("uid", ThirdPhotoSunglasses, "select");
await photo.triggerHoverAction("uid", FourthPhotoSunglasses, "select");
await photo.triggerHoverAction("uid", FifthPhotoSunglasses, "select");
await photo.triggerHoverAction("uid", FirstPhotoLandscape, "select");
await photo.triggerHoverAction("uid", SecondPhotoLandscape, "select");
await photo.triggerHoverAction("uid", ThirdPhotoLandscape, "select");
await photo.triggerHoverAction("uid", FourthPhotoLandscape, "select");
await photo.triggerHoverAction("uid", FifthPhotoLandscape, "select");
await photo.triggerHoverAction("uid", SixthPhotoLandscape, "select");
await contextmenu.triggerContextMenuAction("remove", "");
const PhotoCountAfterDelete = await photo.getPhotoCount("all");
await t.expect(PhotoCountAfterDelete).eql(PhotoCountAfterAdd - 6);
await t.expect(PhotoCountAfterDelete).eql(PhotoCountAfterAdd - 5);
}
);