photoprism/frontend/tests/acceptance/library/import.js

27 lines
979 B
JavaScript
Raw Normal View History

import { Selector } from "testcafe";
import testcafeconfig from "../testcafeconfig";
2020-06-04 15:38:46 +02:00
import Page from "../page-model";
2021-01-15 17:02:39 +01:00
fixture`Import file from folder`.page`${testcafeconfig.url}`;
2020-06-04 15:38:46 +02:00
const page = new Page();
2021-01-15 17:02:39 +01:00
test.meta("testID", "library-import-001")("Import files from folder using copy", async (t) => {
await page.openNav();
2021-01-15 17:02:39 +01:00
await t.click(Selector(".nav-labels"));
await page.search("bakery");
await t.expect(Selector("div.no-results").visible).ok();
await page.openNav();
2021-01-15 17:02:39 +01:00
await t
.click(Selector(".nav-library"))
.click(Selector("#tab-library-import"))
2021-02-22 14:23:38 +01:00
.typeText(Selector(".input-import-folder input"), "/B", { replace: true })
.click(Selector("div.v-list__tile__title").nth(0))
2021-01-15 17:02:39 +01:00
.click(Selector(".action-import"))
//TODO replace wait
.wait(60000);
await page.openNav();
await t.click(Selector(".nav-labels")).click(Selector(".action-reload"));
2021-01-15 17:02:39 +01:00
await page.search("bakery");
await t.expect(Selector(".is-label").visible).ok();
});