Tests: Update acceptance tests to run on mobile
This commit is contained in:
parent
1c13087302
commit
afca678d80
2 changed files with 15 additions and 7 deletions
|
@ -7,6 +7,7 @@ fixture`Test albums`.page`${testcafeconfig.url}`;
|
||||||
const page = new Page();
|
const page = new Page();
|
||||||
|
|
||||||
test.meta("testID", "albums-001")("Create/delete album", async (t) => {
|
test.meta("testID", "albums-001")("Create/delete album", async (t) => {
|
||||||
|
await page.openNav();
|
||||||
await t.click(Selector(".nav-albums"));
|
await t.click(Selector(".nav-albums"));
|
||||||
const countAlbums = await Selector("a.is-album").count;
|
const countAlbums = await Selector("a.is-album").count;
|
||||||
await t.click(Selector("button.action-add"));
|
await t.click(Selector("button.action-add"));
|
||||||
|
@ -20,6 +21,7 @@ test.meta("testID", "albums-001")("Create/delete album", async (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.meta("testID", "albums-002")("Update album", async (t) => {
|
test.meta("testID", "albums-002")("Update album", async (t) => {
|
||||||
|
await page.openNav();
|
||||||
await t
|
await t
|
||||||
.click(Selector(".nav-albums"))
|
.click(Selector(".nav-albums"))
|
||||||
.typeText(Selector(".p-albums-search input"), "Holiday")
|
.typeText(Selector(".p-albums-search input"), "Holiday")
|
||||||
|
@ -44,7 +46,9 @@ test.meta("testID", "albums-002")("Update album", async (t) => {
|
||||||
.expect(Selector(".v-card__text").nth(0).innerText)
|
.expect(Selector(".v-card__text").nth(0).innerText)
|
||||||
.contains("All my animals")
|
.contains("All my animals")
|
||||||
.expect(Selector("div").withText("Animals").exists)
|
.expect(Selector("div").withText("Animals").exists)
|
||||||
.ok()
|
.ok();
|
||||||
|
await page.openNav();
|
||||||
|
await t
|
||||||
.click(Selector(".nav-browse"));
|
.click(Selector(".nav-browse"));
|
||||||
await page.search("photo:true");
|
await page.search("photo:true");
|
||||||
const FirstPhotoUid = await Selector("div.is-photo.type-image").nth(0).getAttribute("data-uid");
|
const FirstPhotoUid = await Selector("div.is-photo.type-image").nth(0).getAttribute("data-uid");
|
||||||
|
@ -52,13 +56,16 @@ test.meta("testID", "albums-002")("Update album", async (t) => {
|
||||||
await page.selectFromUIDInFullscreen(FirstPhotoUid);
|
await page.selectFromUIDInFullscreen(FirstPhotoUid);
|
||||||
await page.selectPhotoFromUID(SecondPhotoUid);
|
await page.selectPhotoFromUID(SecondPhotoUid);
|
||||||
await page.addSelectedToAlbum("Animals");
|
await page.addSelectedToAlbum("Animals");
|
||||||
|
await page.openNav();
|
||||||
await t.click(Selector(".nav-albums"));
|
await t.click(Selector(".nav-albums"));
|
||||||
await t
|
await t
|
||||||
.click(Selector(".input-category i"))
|
.click(Selector(".input-category i"))
|
||||||
.click(Selector('div[role="listitem"]').withText("Family"));
|
.click(Selector('div[role="listitem"]').withText("Family"));
|
||||||
await t
|
await t
|
||||||
.expect(Selector("button.action-title-edit").nth(0).innerText)
|
.expect(Selector("button.action-title-edit").nth(0).innerText)
|
||||||
.contains("Christmas")
|
.contains("Christmas");
|
||||||
|
await page.openNav();
|
||||||
|
await t
|
||||||
.click(Selector(".nav-albums"))
|
.click(Selector(".nav-albums"))
|
||||||
.click(".action-reload")
|
.click(".action-reload")
|
||||||
.click(Selector(".input-category i"))
|
.click(Selector(".input-category i"))
|
||||||
|
@ -87,7 +94,9 @@ test.meta("testID", "albums-002")("Update album", async (t) => {
|
||||||
.pressKey("ctrl+a delete")
|
.pressKey("ctrl+a delete")
|
||||||
.pressKey("enter")
|
.pressKey("enter")
|
||||||
.click(".action-confirm")
|
.click(".action-confirm")
|
||||||
.click(".action-reload")
|
.click(".action-reload");
|
||||||
|
await page.openNav();
|
||||||
|
await t
|
||||||
.click(Selector(".nav-albums"))
|
.click(Selector(".nav-albums"))
|
||||||
.expect(Selector("div").withText("Holiday").visible)
|
.expect(Selector("div").withText("Holiday").visible)
|
||||||
.ok()
|
.ok()
|
||||||
|
@ -96,6 +105,7 @@ test.meta("testID", "albums-002")("Update album", async (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.meta("testID", "albums-003")("Download album", async (t) => {
|
test.meta("testID", "albums-003")("Download album", async (t) => {
|
||||||
|
await page.openNav();
|
||||||
await t.click(Selector(".nav-albums"));
|
await t.click(Selector(".nav-albums"));
|
||||||
const FirstAlbum = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
const FirstAlbum = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
||||||
await page.selectFromUID(FirstAlbum);
|
await page.selectFromUID(FirstAlbum);
|
||||||
|
@ -121,6 +131,7 @@ test.meta("testID", "albums-004")("View folders", async (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.meta("testID", "albums-005")("View calendar", async (t) => {
|
test.meta("testID", "albums-005")("View calendar", async (t) => {
|
||||||
|
await page.openNav();
|
||||||
await t
|
await t
|
||||||
.click(Selector(".nav-calendar"))
|
.click(Selector(".nav-calendar"))
|
||||||
.expect(Selector("a").withText("May 2019").visible)
|
.expect(Selector("a").withText("May 2019").visible)
|
||||||
|
@ -131,6 +142,7 @@ test.meta("testID", "albums-005")("View calendar", async (t) => {
|
||||||
|
|
||||||
//TODO test that sharing link works as expected
|
//TODO test that sharing link works as expected
|
||||||
test.meta("testID", "albums-006")("Create, Edit, delete sharing link", async (t) => {
|
test.meta("testID", "albums-006")("Create, Edit, delete sharing link", async (t) => {
|
||||||
|
await page.openNav();
|
||||||
await t.click(Selector(".nav-albums"));
|
await t.click(Selector(".nav-albums"));
|
||||||
const FirstAlbum = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
const FirstAlbum = await Selector("a.is-album").nth(0).getAttribute("data-uid");
|
||||||
await page.selectFromUID(FirstAlbum);
|
await page.selectFromUID(FirstAlbum);
|
||||||
|
|
|
@ -8,7 +8,6 @@ const page = new Page();
|
||||||
|
|
||||||
test.meta("testID", "components-001")("Test filter options", async (t) => {
|
test.meta("testID", "components-001")("Test filter options", async (t) => {
|
||||||
await t
|
await t
|
||||||
.click("button.p-expand-search")
|
|
||||||
.expect(Selector("body").withText("object Object").exists)
|
.expect(Selector("body").withText("object Object").exists)
|
||||||
.notOk();
|
.notOk();
|
||||||
});
|
});
|
||||||
|
@ -23,7 +22,6 @@ test.meta("testID", "components-002")("Fullscreen mode", async (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.meta("testID", "components-003")("Mosaic view", async (t) => {
|
test.meta("testID", "components-003")("Mosaic view", async (t) => {
|
||||||
await t.click("button.p-expand-search");
|
|
||||||
await page.setFilter("view", "Mosaic");
|
await page.setFilter("view", "Mosaic");
|
||||||
await t
|
await t
|
||||||
.expect(Selector("div.v-image__image").visible)
|
.expect(Selector("div.v-image__image").visible)
|
||||||
|
@ -37,7 +35,6 @@ test.meta("testID", "components-003")("Mosaic view", async (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.meta("testID", "components-004")("List view", async (t) => {
|
test.meta("testID", "components-004")("List view", async (t) => {
|
||||||
await t.click("button.p-expand-search");
|
|
||||||
await page.setFilter("view", "List");
|
await page.setFilter("view", "List");
|
||||||
await t
|
await t
|
||||||
.expect(Selector("table.v-datatable").visible)
|
.expect(Selector("table.v-datatable").visible)
|
||||||
|
@ -47,7 +44,6 @@ test.meta("testID", "components-004")("List view", async (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.meta("testID", "components-005")("#Card view", async (t) => {
|
test.meta("testID", "components-005")("#Card view", async (t) => {
|
||||||
await t.click("button.p-expand-search");
|
|
||||||
await page.setFilter("view", "Cards");
|
await page.setFilter("view", "Cards");
|
||||||
await t
|
await t
|
||||||
.expect(Selector("div.v-image__image").visible)
|
.expect(Selector("div.v-image__image").visible)
|
||||||
|
|
Loading…
Reference in a new issue