Tests: Adapt acceptance tests to changes
This commit is contained in:
parent
c86d57cdaf
commit
f7cc802e6c
3 changed files with 16 additions and 37 deletions
|
@ -13,24 +13,7 @@ test.meta("testID", "authentication-000")(
|
|||
}
|
||||
);
|
||||
|
||||
test.meta("testID", "people-001")("Faces tab preselected when subjects empty", async (t) => {
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-people"))
|
||||
.expect(Selector("#tab-people_faces > a").hasClass("v-tabs__item--active"))
|
||||
.ok()
|
||||
.expect(Selector("#tab-people > a").hasClass("v-tabs__item--active"))
|
||||
.notOk()
|
||||
.click(Selector("#tab-people > a"))
|
||||
.expect(Selector("#tab-people_faces > a").hasClass("v-tabs__item--active"))
|
||||
.notOk()
|
||||
.expect(Selector("#tab-people > a").hasClass("v-tabs__item--active"))
|
||||
.ok();
|
||||
const countSubjects = await Selector("a.is-subject").count;
|
||||
await t.expect(countSubjects).eql(0);
|
||||
});
|
||||
|
||||
test.meta("testID", "people-002")("Add + Rename", async (t) => {
|
||||
test.meta("testID", "people-001")("Add + Rename", async (t) => {
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-people"))
|
||||
|
@ -57,6 +40,8 @@ test.meta("testID", "people-002")("Add + Rename", async (t) => {
|
|||
.expect(Selector("div").withAttribute("data-id", FirstFaceID).exists)
|
||||
.notOk()
|
||||
.click(Selector("#tab-people > a"));
|
||||
await t.eval(() => location.reload());
|
||||
await t.wait(6000);
|
||||
const countSubjectsAfterAdd = await Selector("a.is-subject").count;
|
||||
await t
|
||||
.expect(countSubjectsAfterAdd)
|
||||
|
@ -113,7 +98,7 @@ test.meta("testID", "people-002")("Add + Rename", async (t) => {
|
|||
await t.expect(countPhotosSubjectAfterRename).eql(countPhotosSubject);
|
||||
});
|
||||
|
||||
test.meta("testID", "people-003")("Add + Reject + Star", async (t) => {
|
||||
test.meta("testID", "people-002")("Add + Reject + Star", async (t) => {
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-people"))
|
||||
|
@ -173,9 +158,7 @@ test.meta("testID", "people-003")("Add + Reject + Star", async (t) => {
|
|||
.eql(NicoleUID);
|
||||
});
|
||||
|
||||
test.meta("testID", "people-004")("Remove face", async (t) => {
|
||||
await page.openNav();
|
||||
await t.click(Selector(".nav-browse"));
|
||||
test.meta("testID", "people-003")("Remove face", async (t) => {
|
||||
await page.search("face:new");
|
||||
const FirstPhoto = await Selector("div.is-photo").nth(0).getAttribute("data-uid");
|
||||
await page.toggleSelectNthPhoto(0);
|
||||
|
@ -235,7 +218,7 @@ test.meta("testID", "people-004")("Remove face", async (t) => {
|
|||
await t.expect(MarkerCountAfterRemove).eql(MarkerCount - 1);
|
||||
});
|
||||
|
||||
test.meta("testID", "people-005")("Hide face", async (t) => {
|
||||
test.meta("testID", "people-004")("Hide face", async (t) => {
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-people"))
|
||||
|
@ -266,11 +249,9 @@ test.meta("testID", "people-005")("Hide face", async (t) => {
|
|||
.ok();
|
||||
});
|
||||
|
||||
test.meta("testID", "people-006")("Hide person", async (t) => {
|
||||
test.meta("testID", "people-005")("Hide person", async (t) => {
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-people"))
|
||||
.click(Selector("#tab-people > a"));
|
||||
await t.click(Selector(".nav-people")).click(Selector("#tab-people > a"));
|
||||
const FirstPerson = await Selector("a.is-subject").nth(0).getAttribute("data-uid");
|
||||
await t
|
||||
.hover(Selector("a[data-uid=" + FirstPerson + "]"))
|
||||
|
|
|
@ -230,7 +230,6 @@ test.meta("testID", "photos-007")("Edit photo/video", async (t) => {
|
|||
|
||||
const FirstPhotoTitle = await Selector(".input-title input").value;
|
||||
const FirstPhotoLocalTime = await Selector(".input-local-time input").value;
|
||||
const FirstPhotoUTCTime = await Selector(".input-utc-time input").value;
|
||||
const FirstPhotoDay = await Selector(".input-day input").value;
|
||||
const FirstPhotoMonth = await Selector(".input-month input").value;
|
||||
const FirstPhotoYear = await Selector(".input-year input").value;
|
||||
|
@ -297,7 +296,7 @@ test.meta("testID", "photos-007")("Edit photo/video", async (t) => {
|
|||
"07",
|
||||
"2019",
|
||||
"04:30:30",
|
||||
"01:30:30",
|
||||
"",
|
||||
"Europe/Moscow",
|
||||
"Albania",
|
||||
"-1",
|
||||
|
|
|
@ -13,12 +13,12 @@ test.meta("testID", "states-001")("Update state", async (t) => {
|
|||
const AlbumUid = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
||||
await t
|
||||
.expect(Selector("button.action-title-edit").nth(0).innerText)
|
||||
.contains("Canada")
|
||||
.contains("British Columbia")
|
||||
.click(Selector(".action-title-edit").nth(0))
|
||||
.expect(Selector(".input-title input").value)
|
||||
.eql("British Columbia / Canada")
|
||||
.eql("British Columbia")
|
||||
.expect(Selector(".input-location input").value)
|
||||
.eql("")
|
||||
.eql("Canada")
|
||||
.typeText(Selector(".input-title input"), "Wonderland", { replace: true })
|
||||
.typeText(Selector(".input-location input"), "Earth", { replace: true })
|
||||
.expect(Selector(".input-description textarea").value)
|
||||
|
@ -69,9 +69,7 @@ test.meta("testID", "states-001")("Update state", async (t) => {
|
|||
.click(Selector(".input-description textarea"))
|
||||
.pressKey("ctrl+a delete")
|
||||
.pressKey("enter")
|
||||
.click(Selector(".input-location input"))
|
||||
.pressKey("ctrl+a delete")
|
||||
.pressKey("enter")
|
||||
.typeText(Selector(".input-location input"), "Canada", { replace: true })
|
||||
.click(".action-confirm");
|
||||
await page.openNav();
|
||||
await t.click(Selector(".nav-states"));
|
||||
|
@ -165,7 +163,8 @@ test.meta("testID", "states-004")("Create/delete album during add to album", asy
|
|||
const countAlbums = await Selector("a.is-album").count;
|
||||
await page.openNav();
|
||||
await t.click(Selector(".nav-places + div")).click(Selector(".nav-states"));
|
||||
const FirstMoment = await Selector("a.is-album").nth(2).getAttribute("data-uid");
|
||||
await page.search("Canada");
|
||||
const FirstMoment = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
||||
await t.click(Selector("a.is-album").withAttribute("data-uid", FirstMoment));
|
||||
const PhotoCountInMoment = await Selector("div.is-photo").count;
|
||||
const FirstPhoto = await Selector("div.is-photo.type-image").nth(0).getAttribute("data-uid");
|
||||
|
@ -209,5 +208,5 @@ test.meta("testID", "states-004")("Create/delete album during add to album", asy
|
|||
test.meta("testID", "states-005")("Delete states button visible", async (t) => {
|
||||
await page.openNav();
|
||||
await t.click(Selector(".nav-places + div")).click(Selector(".nav-states"));
|
||||
await page.checkButtonVisibility("delete", false, false);
|
||||
await page.checkButtonVisibility("delete", true, false);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue