Frontend: Update acceptance tests
This commit is contained in:
parent
e80435a8ec
commit
8f421f6864
|
@ -7,14 +7,15 @@ fixture`Test components`
|
|||
|
||||
const page = new Page();
|
||||
|
||||
/*test('#1 Test filter options', async t => {
|
||||
test('#1 Test filter options', async t => {
|
||||
await t
|
||||
.click('button.p-expand-search')
|
||||
.click(Selector('div.p-countries-select'))
|
||||
.expect(Selector('div[role="listitem"]]').nth(0).innerText).notContains('object')
|
||||
.expect(Selector('div[role="listitem"]]').nth(0).innerText).notContains('Botswana')
|
||||
.expect(Selector('div[role="listitem"]]').nth(0).innerText).notContains('Animal');
|
||||
});*/
|
||||
.expect(Selector('body').withText('object Object').exists).notOk()
|
||||
.click('.p-navigation-albums')
|
||||
.click(Selector('div.p-album').nth(0))
|
||||
.click('button.p-expand-search')
|
||||
.expect(Selector('body').withText('object Object').exists).notOk();
|
||||
});
|
||||
|
||||
test('#2 Fullscreen mode', async t => {
|
||||
await t
|
||||
|
|
|
@ -17,10 +17,7 @@ test('#1 Add files to album', async t => {
|
|||
.expect(Selector('h3').innerText).eql('No albums matched your search');
|
||||
await t
|
||||
.click(Selector('div.p-navigation-library + div'))
|
||||
.click(Selector('.p-navigation-files'));
|
||||
const FirstItem = await Selector('div.v-card__title').nth(0).innerText;
|
||||
await t
|
||||
.expect(FirstItem).contains('Vacation')
|
||||
.click(Selector('.p-navigation-files'))
|
||||
.click(Selector('button').withText('Vacation'));
|
||||
const FirstItemInVacation = await Selector('div.v-card__title').nth(0).innerText;
|
||||
const KanadaUid = await Selector('div.v-card__title').nth(0).getAttribute('data-uid');
|
||||
|
|
|
@ -84,7 +84,7 @@ test('#2 Rename Label', async t => {
|
|||
await page.search('zebra');
|
||||
const LabelZebra = await Selector('div.p-label').nth(0).getAttribute('data-uid');
|
||||
await t
|
||||
.click(Selector('div.p-label').withAttribute('data-uid', LabelZebra));
|
||||
.click(Selector('div.p-label a').nth(0));
|
||||
const FirstPhotoZebra = await Selector('div.p-photo').nth(0).getAttribute('data-uid');
|
||||
const SecondPhotoZebra = await Selector('div.p-photo').nth(1).getAttribute('data-uid');
|
||||
await t
|
||||
|
|
|
@ -21,8 +21,8 @@ test('#1 Import files from folder using copy', async t => {
|
|||
.click(Selector('div.v-list__tile__title').withText('/Bäckerei'))
|
||||
.click(Selector('.action-import'))
|
||||
//TODO replace wait
|
||||
.wait(30000)
|
||||
.expect(Selector('span').withText('Done.').visible, {timeout: 60000}).ok()
|
||||
.wait(60000)
|
||||
//.expect(Selector('span').withText('Done.').visible, {timeout: 60000}).ok()
|
||||
.click(Selector('.p-navigation-labels'))
|
||||
.click(Selector('.action-reload'));
|
||||
await page.search('bakery');
|
||||
|
|
|
@ -69,13 +69,13 @@ export default class Page {
|
|||
|
||||
async selectNthPhoto(nPhoto) {
|
||||
await t
|
||||
.hover(Selector('div[class="v-image__image v-image__image--cover"]', {timeout:4000}).nth(nPhoto))
|
||||
.hover(Selector('.p-photo', {timeout:4000}).nth(nPhoto))
|
||||
.click(Selector('.t-select.t-off'));
|
||||
}
|
||||
|
||||
async unselectPhoto(nPhoto) {
|
||||
await t
|
||||
.hover(Selector('div[class="v-image__image v-image__image--cover"]', {timeout:4000}).nth(nPhoto))
|
||||
.hover(Selector('.p-photo', {timeout:4000}).nth(nPhoto))
|
||||
.click(Selector('.t-select.t-on'));
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ test('#1 Settings', async t => {
|
|||
.click(Selector('.input-share input'))
|
||||
.click(Selector('.input-places input'))
|
||||
.click(Selector('.input-private input'))
|
||||
.click(Selector('.input-review input'));
|
||||
.click(Selector('.input-review input'))
|
||||
.click(Selector('.p-navigation-photos'));
|
||||
|
||||
await t.eval(() => location.reload());
|
||||
await page.openNav();
|
||||
|
|
Loading…
Reference in a new issue