2021-01-13 11:05:11 +01:00
|
|
|
import { Selector } from "testcafe";
|
|
|
|
import testcafeconfig from "../testcafeconfig";
|
2022-04-15 15:46:25 +02:00
|
|
|
import Menu from "../../page-model/menu";
|
|
|
|
import Toolbar from "../../page-model/toolbar";
|
|
|
|
import Page from "../../page-model/page";
|
|
|
|
import Library from "../../page-model/library";
|
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
|
|
|
|
2022-04-15 15:46:25 +02:00
|
|
|
const menu = new Menu();
|
|
|
|
const toolbar = new Toolbar();
|
2020-06-04 15:38:46 +02:00
|
|
|
const page = new Page();
|
2022-04-15 15:46:25 +02:00
|
|
|
const library = new Library();
|
|
|
|
|
|
|
|
test.meta("testID", "library-import-001").meta({ type: "smoke" })(
|
|
|
|
"Import files from folder using copy",
|
|
|
|
async (t) => {
|
|
|
|
await menu.openPage("labels");
|
|
|
|
await toolbar.search("bakery");
|
|
|
|
|
|
|
|
await t.expect(Selector("div.no-results").visible).ok();
|
|
|
|
|
|
|
|
await menu.openPage("library");
|
|
|
|
await t
|
|
|
|
.click(library.importTab)
|
|
|
|
.typeText(library.openImportFolderSelect, "/B", { replace: true })
|
|
|
|
.click(page.selectOption.nth(0))
|
|
|
|
.click(library.import)
|
|
|
|
//TODO replace wait
|
|
|
|
.wait(60000);
|
|
|
|
await menu.openPage("labels");
|
|
|
|
await toolbar.triggerToolbarAction("reload");
|
|
|
|
await toolbar.search("bakery");
|
|
|
|
|
|
|
|
await t.expect(Selector(".is-label").visible).ok();
|
|
|
|
}
|
|
|
|
);
|