[add] cypress.io e2e testing

This commit is contained in:
andy 2019-08-01 22:07:11 +01:00
parent 53c8fbc228
commit d2dd404ac2
26 changed files with 1952 additions and 173 deletions

View file

@ -18,7 +18,7 @@
:enable-resize-watcher="true">
<v-list class="pa-0">
<v-list-item avatar tag="div">
<v-list-item tag="div">
<v-list-item-avatar >
<v-btn icon @click="session">
<v-avatar size="36">
@ -62,7 +62,7 @@
</v-btn>
</template >
<v-list>
<v-list-item to="/session" avatar ripple>
<v-list-item to="/session" ripple>
<v-list-item-title >Session</v-list-item-title>
</v-list-item>
<v-list-item @click="logout()">

View file

@ -29,7 +29,7 @@
<v-list-item
v-for="(mime,index) in items" :key="index"
avatar dense ripple
dense ripple
@click="setItem(mime,index)"
>
@ -85,6 +85,6 @@
},
created:function(){
console.log("qd-mimelist",this.$MimeTypes.list())
//console.log("qd-mimelist",this.$MimeTypes.list())
}
}</script>

View file

@ -20,7 +20,7 @@ for nav drawer
<v-list-item v-if="!mini" v-for="subItem in item.children" v-bind:key="subItem.text"
:prepend-icon="subItem.icon"
:to="subItem.href" avatar ripple >
:to="subItem.href" ripple >
<v-list-item-avatar>
<v-icon>{{ subItem.icon }}</v-icon>
</v-list-item-avatar>

View file

@ -26,10 +26,10 @@
<v-data-table
:headers="headers"
:items="items"
:item="items"
:search="search"
v-model="selected"
select-all
show-select
class="elevation-1"
:no-data-text="noDataMsg"
>

View file

@ -30,7 +30,7 @@
<v-list style="height: 300px; overflow-y: auto;">
<v-list-item
v-for="index in edittabs.sorted(q)" :key="index"
avatar dense ripple
dense ripple
@click="setItem(index)" :inactive="index == current"
>
<v-list-item-avatar :title="edittabs.items[index].contentType">

View file

@ -34,7 +34,7 @@
</v-layout>
<v-layout align-center justify-center column fill-height xs1 amber lighten-5>
<v-btn @click="clear()"
<v-btn @click="clear()" id="btn-clear"
>Clear</v-btn>
<v-btn @click="reset()"
>Reset</v-btn>

View file

@ -137,7 +137,7 @@
},
// execute imediatly
run(){
console.log("run:",this.xq);
this.showResult= true;
this.start = performance.now();
HTTPNE.post("eval/execute",Qs.stringify({xq:this.xq}))

View file

@ -1,5 +1,6 @@
(:~
: vue-poc thumbnail api.
: vue-poc XQuery evalution api.
: eval/execute: evaluate form arg return as json
:
: @author Andy Bunce may-2017
:)
@ -21,6 +22,7 @@ declare
%output:method("json")
function vue-api:eval($xq )
{
let $a:=trace($xq,"EXEC")
let $r:=util:query($xq,())
return vue-api:response($r,$xq)
};

View file

@ -34,7 +34,7 @@
:items="items"
:search="search"
v-model="selected"
select-all
show-select
class="elevation-1"
no-data-text="No Jobs currently running"
>

View file

@ -34,7 +34,7 @@
:items="items"
:search="search"
v-model="selected"
select-all
show-select
class="elevation-1"
no-data-text="No Jobs currently running"
>

View file

@ -1,49 +1,74 @@
<!DOCTYPE html>
<template id="documentation">
<v-container fluid>
<v-toolbar dense >
<v-toolbar-title>documentation</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn
icon
:loading="loading"
@click="get()"
:disabled="loading"
>
<v-icon>refresh</v-icon>
</v-btn>
<a href="/vue-poc/api/xqdocjob" target="doc">json</a>
</v-toolbar>
<v-container fluid grid-list-md>
<v-data-iterator
:items="items"
:items-per-page.sync="itemsPerPage"
:search="search"
hide-default-footer
>
<v-container fluid grid-list-md>
<v-layout row wrap >
<v-flex height="80px"
xs2
v-for="item in items"
:key="item.id"
>
<v-card :hover="true" >
<v-toolbar color="blue lighten-3" dense>
<v-card-title >{{ item.name }}</v-card-title>
</v-toolbar>
<v-card-text>{{ item.id }}</v-card-text>
<v-card-text>{{ item.created | formatDate }}</v-card-text>
<v-card-actions>
<a :href="item.href" target="_new">go</a>
</v-card-actions>
<template v-slot:header>
<v-toolbar
dark
color="blue darken-3"
class="mb-1"
>
<v-toolbar-title>XQDocs</v-toolbar-title>
<v-spacer></v-spacer>
<v-text-field
v-model="search"
clearable
flat
solo-inverted
hide-details
prepend-inner-icon="search"
label="Search"
></v-text-field>
<v-spacer></v-spacer>
<v-btn @click="get" icon :loading="loading"
:disabled="loading"
><v-icon>refresh</v-icon></v-btn>
</v-toolbar>
</template>
<template v-slot:default="props">
<v-layout wrap>
<v-flex
v-for="item in props.items"
:key="item.name"
xs12
sm6
md4
lg3
>
<v-card :hover="true" >
<v-toolbar color="blue lighten-3" dense>
<v-card-title >{{ item.name }}</v-card-title>
</v-toolbar>
<v-card-text>{{ item.id }}</v-card-text>
<v-card-text>{{ item.created | formatDate }}</v-card-text>
<v-card-actions>
<a :href="item.href" target="_new">go</a>
</v-card-actions>
</v-card>
</v-flex>
</v-flex>
</v-layout>
</v-container>
</v-container>
</template>
</v-data-iterator>
</v-container>
</template>
<script>{
data: function(){
return {
message: 'Hello Vue.js!',
itemsPerPage: 100,
page: 1,
items:[],
search: '',
filter: {},
loading: false
}
},

View file

@ -1,86 +1,88 @@
<!DOCTYPE html>
<template id="entity">
<v-card>
<v-toolbar >
<v-toolbar-title>
<v-breadcrumbs :items="[{text:'Entities',to:'/entity'}]" >
<template slot="item" slot-scope="props">
<v-breadcrumbs-item :to="props.item.to" :disabled="props.item.disabled" :exact="true">
{{ props.item.text }}
</v-breadcrumbs-item>
</template>
</v-breadcrumbs>
</v-toolbar-title>
<v-text-field prepend-icon="filter_list" label="Filter..." v-model="q" type="search"
hide-details single-line @keyup.enter="setfilter"
clearable></v-text-field>
<v-spacer></v-spacer>
<v-btn @click="getItems" icon
:loading="loading"
:disabled="loading"
><v-icon>refresh</v-icon></v-btn>
<vp-entitylink entity="entity"></vp-entitylink>
</v-toolbar>
<v-container fluid grid-list-md>
<v-container fluid grid-list-md>
<v-data-iterator
content-tag="v-layout"
row
wrap
:loading="loading"
:items="items"
:items="items"
:items-per-page.sync="itemsPerPage"
:search="q"
:rows-per-page-items="rowsPerPageItems"
:pagination.sync="pagination"
hide-default-footer
select-all
:value="selected"
>
<v-flex
slot="item"
slot-scope="props"
xs12
sm6
md4
lg3
>
<template v-slot:header>
<v-toolbar >
<v-toolbar-title>
<v-breadcrumbs :items="[{text:'Entities',to:'/entity'}]" >
<template slot="item" slot-scope="props">
<v-breadcrumbs-item :to="props.item.to" :disabled="props.item.disabled" :exact="true">
{{ props.item.text }}
</v-breadcrumbs-item>
</template>
</v-breadcrumbs>
</v-toolbar-title>
<v-text-field prepend-icon="filter_list" label="Filter..." v-model="q" type="search"
hide-details single-line @keyup.enter="setfilter"
clearable></v-text-field>
<v-spacer></v-spacer>
<v-btn @click="getItems" icon
:loading="loading"
:disabled="loading"
><v-icon>refresh</v-icon></v-btn>
<vp-entitylink entity="entity"></vp-entitylink>
</v-toolbar>
</template>
<template v-slot:default="props">
<v-layout wrap>
<v-flex
v-for="item in props.items"
:key="item.name"
xs12
sm6
md4
lg3
>
<v-card :hover="true" active-class="default-class qd-active" height="200px" max-height="200px">
<v-toolbar color="blue lighten-3" dense>
<v-toolbar-title>
<router-link :to="{path:'entity/'+ props.item.name}">
<router-link :to="{path:'entity/'+ item.name}">
<v-icon>{{ props.item.iconclass }}</v-icon> {{ props.item.name }}
<v-icon>{{ item.iconclass }}</v-icon> {{ item.name }}
</v-toolbar-title>
</v-card-title>
</v-toolbar>
<v-card-text >{{ props.item.description }}</<v-card-text>
<v-card-text >{{ item.description }}</<v-card-text>
<v-card-actions green>
Fields
<v-badge >
<span slot="badge">{{ props.item.nfields }}</span>
<span slot="badge">{{ item.nfields }}</span>
Fields
</v-badge>
</v-card-actions>
</v-card>
</v-flex>
</v-layout>
</template>
</v-data-iterator>
</v-container>
</v-card>
</template>
<script>{
data: function(){
return {
q: '',
items: [],
itemsPerPage: 100,
page: 1,
items:[],
search: '',
filter: {},
loading: false,
rowsPerPageItems: [4, 8, 20],
pagination: {
rowsPerPage: 20
},
q: '',
selected:[]
}
},

View file

@ -15,6 +15,6 @@
"qs": "6.4.0",
"localforage": "1.7.1",
"momentjs": "2.18.1",
"vuetify-jsonschema-form": "0.24.1"
"vuetify-jsonschema-form": "0.27.1"
}
}

View file

@ -1,4 +1,4 @@
// generated 2019-07-28T23:09:34.827+01:00
// generated 2019-08-01T21:43:37.847+01:00
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/components/qd-autoheight.vue
Vue.component('qd-autoheight',{template:`
@ -183,7 +183,7 @@ Vue.component('qd-mimelist',{template:`
<v-card-text>
<v-list style="height: 300px; overflow-y: auto;">
<v-list-item v-for="(mime,index) in items" :key="index" avatar dense ripple @click="setItem(mime,index)">
<v-list-item v-for="(mime,index) in items" :key="index" dense ripple @click="setItem(mime,index)">
<v-list-item-avatar>
<v-icon v-if="false">check_circle</v-icon>
<v-icon v-else>insert_drive_file</v-icon>
@ -235,7 +235,7 @@ Vue.component('qd-mimelist',{template:`
},
created:function(){
console.log("qd-mimelist",this.$MimeTypes.list())
//console.log("qd-mimelist",this.$MimeTypes.list())
}
}
);
@ -253,7 +253,7 @@ Vue.component('qd-navlist',{template:`
</v-list-item>
</template>
<v-list-item v-if="!mini" v-for="subItem in item.children" v-bind:key="subItem.text" :prepend-icon="subItem.icon" :to="subItem.href" avatar ripple>
<v-list-item v-if="!mini" v-for="subItem in item.children" v-bind:key="subItem.text" :prepend-icon="subItem.icon" :to="subItem.href" ripple>
<v-list-item-avatar>
<v-icon>{{ subItem.icon }}</v-icon>
</v-list-item-avatar>
@ -393,7 +393,7 @@ Vue.component('qd-table',{template:`
<span>{{ entity }}</span>
</v-toolbar>
<v-data-table :headers="headers" :items="items" :search="search" v-model="selected" select-all class="elevation-1" :no-data-text="noDataMsg">
<v-data-table :headers="headers" :item="items" :search="search" v-model="selected" show-select class="elevation-1" :no-data-text="noDataMsg">
<template slot="items" slot-scope="props">
<td>
<v-checkbox primary hide-details v-model="props.selected"></v-checkbox>
@ -474,7 +474,7 @@ Vue.component('qd-tablist',{template:`
</v-toolbar>
<v-card-text>
<v-list style="height: 300px; overflow-y: auto;">
<v-list-item v-for="index in edittabs.sorted(q)" :key="index" avatar dense ripple @click="setItem(index)" :inactive="index == current">
<v-list-item v-for="index in edittabs.sorted(q)" :key="index" dense ripple @click="setItem(index)" :inactive="index == current">
<v-list-item-avatar :title="edittabs.items[index].contentType">
<v-icon v-if="index == current">check_circle</v-icon>
<v-icon v-else>insert_drive_file</v-icon>
@ -789,7 +789,7 @@ Vue.component('vp-paramform',{template:`
</v-layout>
<v-layout align-center justify-center column fill-height xs1 amber lighten-5>
<v-btn @click="clear()">Clear</v-btn>
<v-btn @click="clear()" id="btn-clear">Clear</v-btn>
<v-btn @click="reset()">Reset</v-btn>
</v-layout>
</v-layout>
@ -3146,7 +3146,7 @@ const Eval=Vue.extend({template:`
},
// execute imediatly
run(){
console.log("run:",this.xq);
this.showResult= true;
this.start = performance.now();
HTTPNE.post("eval/execute",Qs.stringify({xq:this.xq}))
@ -4378,7 +4378,7 @@ const Jobs=Vue.extend({template:`
<v-icon>{{ autorefresh?'refresh':'arrow_downward' }}</v-icon>
</v-btn>
</v-toolbar>
<v-data-table :headers="headers" :items="items" :search="search" v-model="selected" select-all class="elevation-1" no-data-text="No Jobs currently running">
<v-data-table :headers="headers" :items="items" :search="search" v-model="selected" show-select class="elevation-1" no-data-text="No Jobs currently running">
<template slot="items" slot-scope="props">
<td class="vtop">
<v-checkbox primary hide-details v-model="props.selected"></v-checkbox>
@ -4470,7 +4470,7 @@ const Services=Vue.extend({template:`
<v-icon>{{ autorefresh?'refresh':'arrow_downward' }}</v-icon>
</v-btn>
</v-toolbar>
<v-data-table :headers="headers" :items="items" :search="search" v-model="selected" select-all class="elevation-1" no-data-text="No Jobs currently running">
<v-data-table :headers="headers" :items="items" :search="search" v-model="selected" show-select class="elevation-1" no-data-text="No Jobs currently running">
<template slot="items" slot-scope="props">
<td class="vtop">
<v-checkbox primary hide-details v-model="props.selected"></v-checkbox>
@ -4674,40 +4674,48 @@ const Leaflet=Vue.extend({template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/model/documentation.vue
const Documentation=Vue.extend({template:`
<v-container fluid>
<v-toolbar dense>
<v-toolbar-title>documentation</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon :loading="loading" @click="get()" :disabled="loading">
<v-icon>refresh</v-icon>
</v-btn>
<a href="/vue-poc/api/xqdocjob" target="doc">json</a>
</v-toolbar>
<v-container fluid grid-list-md>
<v-data-iterator :items="items" :items-per-page.sync="itemsPerPage" :search="search" hide-default-footer>
<v-container fluid grid-list-md>
<v-layout row wrap>
<v-flex height="80px" xs2 v-for="item in items" :key="item.id">
<v-card :hover="true">
<v-toolbar color="blue lighten-3" dense>
<v-card-title>{{ item.name }}</v-card-title>
</v-toolbar>
<v-card-text>{{ item.id }}</v-card-text>
<v-card-text>{{ item.created | formatDate }}</v-card-text>
<v-card-actions>
<a :href="item.href" target="_new">go</a>
</v-card-actions>
<template v-slot:header>
<v-toolbar dark color="blue darken-3" class="mb-1">
<v-toolbar-title>XQDocs</v-toolbar-title>
<v-spacer></v-spacer>
<v-text-field v-model="search" clearable flat solo-inverted hide-details prepend-inner-icon="search" label="Search"></v-text-field>
<v-spacer></v-spacer>
<v-btn @click="get" icon :loading="loading" :disabled="loading"><v-icon>refresh</v-icon></v-btn>
</v-toolbar>
</template>
<template v-slot:default="props">
<v-layout wrap>
<v-flex v-for="item in props.items" :key="item.name" xs12 sm6 md4 lg3>
<v-card :hover="true">
<v-toolbar color="blue lighten-3" dense>
<v-card-title>{{ item.name }}</v-card-title>
</v-toolbar>
<v-card-text>{{ item.id }}</v-card-text>
<v-card-text>{{ item.created | formatDate }}</v-card-text>
<v-card-actions>
<a :href="item.href" target="_new">go</a>
</v-card-actions>
</v-card>
</v-flex>
</v-flex>
</v-layout>
</v-container>
</v-container>
</template>
</v-data-iterator>
</v-container>
`,
data: function(){
return {
message: 'Hello Vue.js!',
itemsPerPage: 100,
page: 1,
items:[],
search: '',
filter: {},
loading: false
}
},
@ -4735,63 +4743,69 @@ const Documentation=Vue.extend({template:`
// src: file:///C:/Users/andy/git/vue-poc/src/vue-poc/features/model/entity.vue
const Entity=Vue.extend({template:`
<v-card>
<v-toolbar>
<v-toolbar-title>
<v-breadcrumbs :items="[{text:'Entities',to:'/entity'}]">
<template slot="item" slot-scope="props">
<v-breadcrumbs-item :to="props.item.to" :disabled="props.item.disabled" :exact="true">
{{ props.item.text }}
</v-breadcrumbs-item>
</template>
</v-breadcrumbs>
</v-toolbar-title>
<v-text-field prepend-icon="filter_list" label="Filter..." v-model="q" type="search" hide-details single-line @keyup.enter="setfilter" clearable></v-text-field>
<v-spacer></v-spacer>
<v-btn @click="getItems" icon :loading="loading" :disabled="loading"><v-icon>refresh</v-icon></v-btn>
<vp-entitylink entity="entity"></vp-entitylink>
</v-toolbar>
<v-container fluid grid-list-md>
<v-container fluid grid-list-md>
<v-data-iterator content-tag="v-layout" row wrap :loading="loading" :items="items" :search="q" :rows-per-page-items="rowsPerPageItems" :pagination.sync="pagination" select-all :value="selected">
<v-flex slot="item" slot-scope="props" xs12 sm6 md4 lg3>
<v-data-iterator :items="items" :items-per-page.sync="itemsPerPage" :search="q" hide-default-footer select-all :value="selected">
<template v-slot:header>
<v-toolbar>
<v-toolbar-title>
<v-breadcrumbs :items="[{text:'Entities',to:'/entity'}]">
<template slot="item" slot-scope="props">
<v-breadcrumbs-item :to="props.item.to" :disabled="props.item.disabled" :exact="true">
{{ props.item.text }}
</v-breadcrumbs-item>
</template>
</v-breadcrumbs>
</v-toolbar-title>
<v-text-field prepend-icon="filter_list" label="Filter..." v-model="q" type="search" hide-details single-line @keyup.enter="setfilter" clearable></v-text-field>
<v-spacer></v-spacer>
<v-btn @click="getItems" icon :loading="loading" :disabled="loading"><v-icon>refresh</v-icon></v-btn>
<vp-entitylink entity="entity"></vp-entitylink>
</v-toolbar>
</template>
<template v-slot:default="props">
<v-layout wrap>
<v-flex v-for="item in props.items" :key="item.name" xs12 sm6 md4 lg3>
<v-card :hover="true" active-class="default-class qd-active" height="200px" max-height="200px">
<v-toolbar color="blue lighten-3" dense>
<v-toolbar-title>
<router-link :to="{path:'entity/'+ props.item.name}">
<router-link :to="{path:'entity/'+ item.name}">
<v-icon>{{ props.item.iconclass }}</v-icon> {{ props.item.name }}
<v-icon>{{ item.iconclass }}</v-icon> {{ item.name }}
</router-link></v-toolbar-title>
</v-toolbar>
<v-card-text>{{ props.item.description }}<!--<v-card-text-->
<v-card-text>{{ item.description }}<!--<v-card-text-->
<v-card-actions green>
Fields
<v-badge>
<span slot="badge">{{ props.item.nfields }}</span>
<span slot="badge">{{ item.nfields }}</span>
Fields
</v-badge>
</v-card-actions>
</v-card-text></v-card>
</v-flex>
</v-layout>
</template>
</v-data-iterator>
</v-container>
</v-card>
`,
data: function(){
return {
q: '',
items: [],
itemsPerPage: 100,
page: 1,
items:[],
search: '',
filter: {},
loading: false,
rowsPerPageItems: [4, 8, 20],
pagination: {
rowsPerPage: 20
},
q: '',
selected:[]
}
},
@ -7467,7 +7481,7 @@ const Vuepoc=Vue.extend({template:`
<v-navigation-drawer app :mini-variant.sync="mini" v-model="drawer" :enable-resize-watcher="true">
<v-list class="pa-0">
<v-list-item avatar tag="div">
<v-list-item tag="div">
<v-list-item-avatar>
<v-btn icon @click="session">
<v-avatar size="36">
@ -7509,7 +7523,7 @@ const Vuepoc=Vue.extend({template:`
</v-btn>
</template>
<v-list>
<v-list-item to="/session" avatar ripple>
<v-list-item to="/session" ripple>
<v-list-item-title>Session</v-list-item-title>
</v-list-item>
<v-list-item @click="logout()">

View file

@ -10,11 +10,11 @@
<link rel="shortcut icon" href="/vue-poc/ui/icon.png"/>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"/>
<link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons"/>
<link rel="stylesheet" href="//unpkg.com/vuetify@2.0.2/dist/vuetify.min.css" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/vuetify@2.0.4/dist/vuetify.min.css" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/@riophae/vue-treeselect@0.0.29/dist/vue-treeselect.min.css"/>
<link rel="stylesheet" href="/vue-poc/ui/prism/prism.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css"/>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@koumoul/vuetify-jsonschema-form@0.24.1/dist/main.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@koumoul/vuetify-jsonschema-form@0.27.1/dist/main.css" />
<link href="/vue-poc/ui/app.css" rel="stylesheet" type="text/css"/>
<link href="/vue-poc/ui/svg/d3-svg.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/vis/4.20.1/vis-timeline-graph2d.min.css" />
@ -39,7 +39,7 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.1/axios.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vuex@3.1.0/dist/vuex.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/qs/6.4.0/qs.js" crossorigin="anonymous" ></script>
<script src="//unpkg.com/vuetify@2.0.2/dist/vuetify.min.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vuetify@2.0.4/dist/vuetify.min.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ext-language_tools.js" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ext-linking.js" crossorigin="anonymous" charset="utf-8"></script>
@ -59,7 +59,7 @@
<script src="//unpkg.com/leaflet@1.0.3/dist/leaflet.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue2-leaflet@1.0.2/dist/vue2-leaflet.js" crossorigin="anonymous"></script>
<script src="//cdn.jsdelivr.net/npm/@koumoul/vuetify-jsonschema-form@0.24.1/dist/main.js" crossorigin="anonymous"></script>
<script src="//cdn.jsdelivr.net/npm/@koumoul/vuetify-jsonschema-form@0.27.1/dist/main.js" crossorigin="anonymous"></script>
<script src="//unpkg.com/vue-native-websocket@2.0.8/dist/build.js" crossorigin="anonymous"></script>
<script src="/vue-poc/ui/svg/d3-svg.js"></script>

1
tests/cypress/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/node_modules/

View file

@ -0,0 +1,6 @@
{
"baseUrl": "http://localhost:8984/vue-poc",
"viewportWidth": 1600,
"viewportHeight": 800
}

1
tests/cypress/cypress/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/screenshots/

View file

@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}

View file

@ -0,0 +1,42 @@
/**
* @author andy bunce
* @description Cypress vue-poc
*/
//This is where your test suite starts
describe('My First Test', function () {
//This function will execute before each test (i.e it())
beforeEach(function () {
cy.log('I run before every test in every spec file!!!!!!')
})
//Here you actually writes your test (it() is similar to @Test annotaion of TestNG)
it('home', function () {
//Click on type button
cy.visit('/ui')
cy.screenshot()
}),
it('about', function () {
//Click on type button
cy.visit('/ui/about')
cy.screenshot()
}),
it('documentation', function () {
//Click on type button
cy.visit('/ui/documentation')
cy.screenshot()
})
})

View file

@ -0,0 +1,27 @@
/**
* @author andy bunce
* @description Cypress vue-poc
*/
//This is where your test suite starts
describe('validate tests', function () {
//This function will execute before each test (i.e it())
beforeEach(function () {
cy.log('I run before every test in every spec file!!!!!!')
})
//Here you actually writes your test (it() is similar to @Test annotaion of TestNG)
it('validate', function () {
//Click on type button
cy.visit('/ui/validate')
cy.screenshot("validate/validate")
cy.get("#btn-clear").click()
cy.screenshot("validate/clear")
})
})

View file

@ -0,0 +1,17 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}

View file

@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This is will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

View file

@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')

1578
tests/cypress/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
{
"name": "vue-poc",
"version": "1.0.0",
"description": "vue-poc e2e tests",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"cypress": "^3.4.1"
}
}