Replaced ids from acceptance tests with descriptive classes
This commit is contained in:
parent
3e404f9385
commit
644e930575
4 changed files with 18 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<v-form ref="form" autocomplete="off" class="p-photo-search" lazy-validation @submit.prevent="filterChange" dense>
|
||||
<v-toolbar flat color="blue-grey lighten-4">
|
||||
<v-text-field class="pt-3 pr-3"
|
||||
<v-text-field class="pt-3 pr-3 p-search-field"
|
||||
autocomplete="off"
|
||||
single-line
|
||||
label="Search"
|
||||
|
@ -11,7 +11,6 @@
|
|||
@click:clear="clearQuery"
|
||||
v-model="filter.q"
|
||||
@keyup.enter.native="filterChange"
|
||||
id="search"
|
||||
></v-text-field>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
@ -36,7 +35,7 @@
|
|||
<v-icon>view_module</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-btn icon @click.stop="searchExpanded = !searchExpanded" id="advancedMenu">
|
||||
<v-btn icon @click.stop="searchExpanded = !searchExpanded" class="p-expand-search">
|
||||
<v-icon>{{ searchExpanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
@ -47,7 +46,7 @@
|
|||
v-show="searchExpanded">
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 sm6 md3 pa-2 id="countriesFlex">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-countries-select">
|
||||
<v-select @change="dropdownChange"
|
||||
label="Country"
|
||||
flat solo hide-details
|
||||
|
@ -58,7 +57,7 @@
|
|||
:items="options.countries">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3 pa-2 id="cameraFlex">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-camera-select">
|
||||
<v-select @change="dropdownChange"
|
||||
label="Camera"
|
||||
flat solo hide-details
|
||||
|
@ -69,7 +68,7 @@
|
|||
:items="options.cameras">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3 pa-2 id="viewFlex">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-view-select">
|
||||
<v-select @change="dropdownChange"
|
||||
label="View"
|
||||
flat solo hide-details
|
||||
|
@ -79,7 +78,7 @@
|
|||
id="viewSelect">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md3 pa-2 id="timeFlex">
|
||||
<v-flex xs12 sm6 md3 pa-2 class="p-time-select">
|
||||
<v-select @change="dropdownChange"
|
||||
label="Sort By"
|
||||
flat solo hide-details
|
||||
|
|
|
@ -16,7 +16,7 @@ const page = new Page();
|
|||
|
||||
test('Test camera filter', async t => {
|
||||
await t
|
||||
.click('#advancedMenu');
|
||||
.click('button.p-expand-search');
|
||||
logger.clear();
|
||||
await page.setFilter('camera', 'iPhone 6');
|
||||
const request = await logger.requests[1];
|
||||
|
@ -27,7 +27,7 @@ test('Test camera filter', async t => {
|
|||
}),
|
||||
test('Test time filter', async t => {
|
||||
await t
|
||||
.click('#advancedMenu');
|
||||
.click('button.p-expand-search');
|
||||
logger.clear();
|
||||
await page.setFilter('time', 'Oldest');
|
||||
const request2 = await logger.requests[0];
|
||||
|
@ -38,7 +38,7 @@ test('Test camera filter', async t => {
|
|||
}),
|
||||
test('Test countries filter', async t => {
|
||||
await t
|
||||
.click('#advancedMenu');
|
||||
.click('button.p-expand-search');
|
||||
logger.clear();
|
||||
await page.setFilter('countries', 'Cuba');
|
||||
const request3 = await logger.requests[0];
|
||||
|
|
|
@ -2,11 +2,11 @@ import { Selector, t } from 'testcafe';
|
|||
|
||||
export default class Page {
|
||||
constructor() {
|
||||
this.view = Selector('#viewFlex', {timeout: 15000});
|
||||
this.camera = Selector('#cameraFlex', {timeout: 15000});
|
||||
this.countries = Selector('#countriesFlex', {timeout: 15000});
|
||||
this.time = Selector('#timeFlex', {timeout: 15000});
|
||||
this.search1 = Selector('#search', {timeout: 15000});
|
||||
this.view = Selector('div.p-view-select', {timeout: 15000});
|
||||
this.camera = Selector('div.p-camera-select', {timeout: 15000});
|
||||
this.countries = Selector('div.p-countries-select', {timeout: 15000});
|
||||
this.time = Selector('div.p-time-select', {timeout: 15000});
|
||||
this.search1 = Selector('div.p-search-field input', {timeout: 15000});
|
||||
}
|
||||
|
||||
async setFilter(filter, option) {
|
||||
|
|
|
@ -15,7 +15,7 @@ test('Open photo in fullscreen', async t => {
|
|||
}),
|
||||
test('Open details view via button', async t => {
|
||||
await t
|
||||
.click('#advancedMenu')
|
||||
.click('button.p-expand-search')
|
||||
.click(Selector('i').withText('view_column'))
|
||||
.expect(Selector('div.v-image__image').visible).ok()
|
||||
.expect(Selector('div.caption').visible).ok()
|
||||
|
@ -25,7 +25,7 @@ test('Open details view via button', async t => {
|
|||
}),
|
||||
test('Open mosaic view via select', async t => {
|
||||
await t
|
||||
.click('#advancedMenu');
|
||||
.click('button.p-expand-search');
|
||||
await page.setFilter('view', 'Mosaic');
|
||||
await t
|
||||
.expect(Selector('div.v-image__image').visible).ok()
|
||||
|
@ -35,7 +35,7 @@ test('Open mosaic view via select', async t => {
|
|||
}),
|
||||
test('Open list view via select', async t => {
|
||||
await t
|
||||
.click('#advancedMenu');
|
||||
.click('button.p-expand-search');
|
||||
await page.setFilter('view', 'List');
|
||||
await t
|
||||
.expect(Selector('table.v-datatable').visible).ok()
|
||||
|
@ -44,7 +44,7 @@ test('Open list view via select', async t => {
|
|||
}),
|
||||
test('Open tile view via select', async t => {
|
||||
await t
|
||||
.click('#advancedMenu');
|
||||
.click('button.p-expand-search');
|
||||
await page.setFilter('view', 'List');
|
||||
await t
|
||||
.expect(Selector('div.p-photo-list').visible).ok();
|
||||
|
|
Loading…
Reference in a new issue