Tests: Update acceptance tests to run on mobile
This commit is contained in:
parent
20fe4b032d
commit
ffed466b09
3 changed files with 11 additions and 10 deletions
|
@ -27,8 +27,6 @@ test.meta("testID", "albums-002")("Update album", async (t) => {
|
|||
if (t.browser.platform === "mobile") {
|
||||
await t.navigateTo("/albums?q=Holiday");
|
||||
} else { await page.search("Holiday");}
|
||||
//.typeText(Selector(".p-albums-search input"), "Holiday")
|
||||
//.pressKey("enter");
|
||||
const AlbumUid = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
||||
await t
|
||||
.expect(Selector("button.action-title-edit").nth(0).innerText)
|
||||
|
|
|
@ -131,9 +131,10 @@ test.meta("testID", "labels-002")("Rename Label", async (t) => {
|
|||
test.meta("testID", "labels-003")("Add label to album", async (t) => {
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-albums"))
|
||||
.typeText(Selector(".p-albums-search input"), "Christmas")
|
||||
.pressKey("enter");
|
||||
.click(Selector(".nav-albums"));
|
||||
if (t.browser.platform === "mobile") {
|
||||
await t.navigateTo("/albums?q=Christmas");
|
||||
} else { await page.search("Christmas");}
|
||||
const AlbumUid = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
||||
await t.click(Selector("a.is-album").withAttribute("data-uid", AlbumUid));
|
||||
const PhotoCount = await Selector("div.is-photo").count;
|
||||
|
@ -162,7 +163,6 @@ test.meta("testID", "labels-003")("Add label to album", async (t) => {
|
|||
await page.selectPhotoFromUID(SecondPhotoLandscape);
|
||||
await page.selectPhotoFromUID(ThirdPhotoLandscape);
|
||||
await page.removeSelected();
|
||||
await t.click(".action-reload");
|
||||
const PhotoCountAfterDelete = await Selector("div.is-photo", { timeout: 5000 }).count;
|
||||
await t.expect(PhotoCountAfterDelete).eql(PhotoCountAfterAdd - 3);
|
||||
});
|
||||
|
|
|
@ -9,7 +9,9 @@ const page = new Page();
|
|||
test.meta("testID", "originals-001")("Add original files to album", async (t) => {
|
||||
await page.openNav();
|
||||
await t.click(Selector(".nav-albums"));
|
||||
await t.typeText(Selector(".p-albums-search input"), "KanadaVacation").pressKey("enter");
|
||||
if (t.browser.platform === "mobile") {
|
||||
await t.navigateTo("/albums?q=KanadaVacation");
|
||||
} else { await page.search("KanadaVacation");}
|
||||
await t.expect(Selector("h3").innerText).eql("Couldn't find anything");
|
||||
await page.openNav();
|
||||
await t
|
||||
|
@ -41,9 +43,10 @@ test.meta("testID", "originals-001")("Add original files to album", async (t) =>
|
|||
await page.addSelectedToAlbum("KanadaVacation");
|
||||
await page.openNav();
|
||||
await t
|
||||
.click(Selector(".nav-albums"))
|
||||
.typeText(Selector(".p-albums-search input"), "KanadaVacation")
|
||||
.pressKey("enter");
|
||||
.click(Selector(".nav-albums"));
|
||||
if (t.browser.platform === "mobile") {
|
||||
await t.navigateTo("/albums?q=KanadaVacation");
|
||||
} else { await page.search("KanadaVacation");}
|
||||
const AlbumUid = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
||||
await t.click(Selector("a.is-album").nth(0));
|
||||
const PhotoCountAfterAdd = await Selector("div.is-photo", { timeout: 5000 }).count;
|
||||
|
|
Loading…
Reference in a new issue