2020-06-04 15:38:46 +02:00
|
|
|
import { Selector } from 'testcafe';
|
|
|
|
import testcafeconfig from '../testcafeconfig';
|
|
|
|
import Page from "../page-model";
|
2020-05-28 10:00:09 +02:00
|
|
|
|
2020-06-04 18:25:29 +02:00
|
|
|
fixture `Import file from folder`
|
|
|
|
.page`${testcafeconfig.url}`;
|
2020-06-04 15:38:46 +02:00
|
|
|
|
|
|
|
const page = new Page();
|
|
|
|
//TODO use upload + delete
|
2020-06-04 18:25:29 +02:00
|
|
|
//TODO check metadata like camera, keywords, location etc are added
|
2020-06-04 15:38:46 +02:00
|
|
|
test('#1 Import files from folder using copy', async t => {
|
|
|
|
await t
|
2020-07-03 14:48:43 +02:00
|
|
|
.click(Selector('.nav-labels'));
|
2020-06-04 15:38:46 +02:00
|
|
|
await page.search('bakery');
|
|
|
|
await t
|
2020-07-15 09:51:16 +02:00
|
|
|
.expect(Selector('h3').withText('Couldn\'t find anything').visible).ok();
|
2020-06-04 15:38:46 +02:00
|
|
|
await t
|
2020-07-03 14:48:43 +02:00
|
|
|
.click(Selector('.nav-library'))
|
|
|
|
//TODO Connecting... error must be moved somewhere else
|
2020-12-24 15:47:34 +01:00
|
|
|
.click(Selector('#tab-library-import'))
|
2020-07-03 14:48:43 +02:00
|
|
|
.click(Selector('.input-import-folder input'), {timeout: 5000})
|
2020-06-04 15:38:46 +02:00
|
|
|
.click(Selector('div.v-list__tile__title').withText('/Bäckerei'))
|
|
|
|
.click(Selector('.action-import'))
|
|
|
|
//TODO replace wait
|
2020-06-05 15:22:16 +02:00
|
|
|
.wait(60000)
|
|
|
|
//.expect(Selector('span').withText('Done.').visible, {timeout: 60000}).ok()
|
2020-07-03 14:48:43 +02:00
|
|
|
.click(Selector('.nav-labels'))
|
2020-06-04 15:38:46 +02:00
|
|
|
.click(Selector('.action-reload'));
|
|
|
|
await page.search('bakery');
|
|
|
|
await t
|
|
|
|
.expect(Selector('.p-label').visible).ok();
|
|
|
|
});
|