From 6576f4e2af25cc751ebc584f7ddd8e055821335b Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Sat, 22 Jun 2019 15:41:44 +0200 Subject: [PATCH] Improve test for views --- frontend/tests/acceptance/views.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/tests/acceptance/views.js b/frontend/tests/acceptance/views.js index 28c6f92ac..6a86e62dd 100644 --- a/frontend/tests/acceptance/views.js +++ b/frontend/tests/acceptance/views.js @@ -13,16 +13,17 @@ test('Open photo in fullscreen', async t => { .expect(Selector('#p-photo-viewer').visible).ok() .expect(Selector('img.pswp__img').visible).ok(); }), -test('Open details view', async t => { - await t - .click('#advancedMenu'); - await page.setFilter('view', 'Details'); +test('Open details view via button', async t => { await t + .click('#advancedMenu') + .click(Selector('i').withText('view_column')) .expect(Selector('div.v-image__image').visible).ok() .expect(Selector('div.caption').visible).ok() .expect(Selector('#p-photo-viewer').visible).notOk() + .expect(Selector('i').withText('view_column').exists).notOk() + .expect(Selector('i').withText('view_list').visible).ok() }), -test('Open mosaic view', async t => { +test('Open mosaic view via select', async t => { await t .click('#advancedMenu'); await page.setFilter('view', 'Mosaic'); @@ -32,7 +33,7 @@ test('Open mosaic view', async t => { .expect(Selector('div.caption').exists).notOk() .expect(Selector('#p-photo-viewer').visible).notOk(); }), -test('Open list view', async t => { +test('Open list view via select', async t => { await t .click('#advancedMenu'); await page.setFilter('view', 'List'); @@ -41,7 +42,7 @@ test('Open list view', async t => { .expect(Selector('div.v-image__image').exists).notOk() .expect(Selector('div.p-photo-list').visible).ok(); }), - test('Open tile view', async t => { + test('Open tile view via select', async t => { await t .click('#advancedMenu'); await page.setFilter('view', 'List');