Improve test for views

This commit is contained in:
Theresa Gresch 2019-06-22 15:41:44 +02:00
parent dec718aa82
commit 6576f4e2af

View file

@ -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');