2021-01-13 11:05:11 +01:00
|
|
|
import { Selector } from "testcafe";
|
|
|
|
import testcafeconfig from "../testcafeconfig";
|
2020-06-04 15:38:46 +02:00
|
|
|
import Page from "../page-model";
|
2020-05-28 10:00:09 +02:00
|
|
|
|
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) => {
|
2021-01-18 20:43:14 +01:00
|
|
|
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("h3").withText("Couldn't find anything").visible).ok();
|
2021-01-18 20:43:14 +01:00
|
|
|
await page.openNav();
|
2021-01-15 17:02:39 +01:00
|
|
|
await t
|
|
|
|
.click(Selector(".nav-library"))
|
|
|
|
.click(Selector("#tab-library-import"))
|
|
|
|
.click(Selector(".input-import-folder input"), { timeout: 5000 })
|
|
|
|
.click(Selector("div.v-list__tile__title").withText("/Bäckerei"))
|
|
|
|
.click(Selector(".action-import"))
|
|
|
|
//TODO replace wait
|
2021-01-18 20:43:14 +01:00
|
|
|
.wait(60000);
|
|
|
|
await page.openNav();
|
|
|
|
await t
|
2021-01-15 17:02:39 +01:00
|
|
|
//.expect(Selector('span').withText('Done.').visible, {timeout: 60000}).ok()
|
|
|
|
.click(Selector(".nav-labels"))
|
|
|
|
.click(Selector(".action-reload"));
|
|
|
|
await page.search("bakery");
|
|
|
|
await t.expect(Selector(".is-label").visible).ok();
|
|
|
|
});
|