Skip to content

Commit

Permalink
Fix lint errors; Disable cypress tests; Enable linting in Drone.
Browse files Browse the repository at this point in the history
  • Loading branch information
proAlexandr committed Aug 13, 2019
1 parent f421314 commit b379d9c
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 25 deletions.
46 changes: 26 additions & 20 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,31 @@ steps:
- git clone https://github.com/${DRONE_REPO}.git .
- git checkout $DRONE_COMMIT

- name: cypress
image: cypress/included:3.3.1
environment:
SENTRY_DSN: ''
GA_TRACKING_ID: ''
- name: lint
image: node:10.16
commands:
- npm install
- npm run test:cypress:onhost
- npm run lint

- name: upload-diffs
image: proalexandr/minio-zip:2019-05-29_3.0-r7
environment:
MC_HOST_pixelpoint:
from_secret: mc_host
commands:
- export DIFF_FILENAME=diff-$(date +%s).zip
- find cypress/snapshots -name '*.diff.png' | zip -0 $DIFF_FILENAME -@
- mc cp $DIFF_FILENAME pixelpoint/kf-test-diffs/
- echo "You can download a diff file, https://$(echo $MC_HOST_pixelpoint | cut -d"@" -f2)/kf-test-diffs/$DIFF_FILENAME"
when:
status:
- failure
# TODO: Fix different font rendering on different operation systems
# - name: cypress
# image: cypress/included:3.3.1
# environment:
# SENTRY_DSN: ''
# GA_TRACKING_ID: ''
# commands:
# - npm install
# - npm run test:cypress:onhost

# - name: upload-diffs
# image: proalexandr/minio-zip:2019-05-29_3.0-r7
# environment:
# MC_HOST_pixelpoint:
# from_secret: mc_host
# commands:
# - export DIFF_FILENAME=diff-$(date +%s).zip
# - find cypress/snapshots -name '*.diff.png' | zip -0 $DIFF_FILENAME -@
# - mc cp $DIFF_FILENAME pixelpoint/kf-test-diffs/
# - echo "You can download a diff file, https://$(echo $MC_HOST_pixelpoint | cut -d"@" -f2)/kf-test-diffs/$DIFF_FILENAME"
# when:
# status:
# - failure
10 changes: 9 additions & 1 deletion src/renderer/components/Clusters.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="{ page: true, clusters: true, clusters_empty: clustersCount === 0, 'clusters_not-found': !filteredClusterIds.length }">
<div :class="className">
<template v-if="clustersCount">
<Header>
<SearchInput v-model="query" size="s" />
Expand Down Expand Up @@ -75,6 +75,14 @@ export default {
}
},
computed: {
className() {
return {
page: true,
clusters: true,
clusters_empty: this.clustersCount === 0,
'clusters_not-found': !this.filteredClusterIds.length
}
},
clustersToRender() {
return this.filteredClusterIds
.map(id => this.clustersById[id])
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/components/shared/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ $font-sizes: (
// border exists always to prevent twitches
border: $border-width solid transparent;
transition: background-color $hover-transition-speed, color $hover-transition-speed, border-color $hover-transition-speed;
transition: background-color $hover-transition-speed,
color $hover-transition-speed,
border-color $hover-transition-speed;
& > span + svg,
& > svg + span {
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/shared/SearchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
}
</script>

<!-- eslint-disable max-len -->
<style lang="scss">
@import "../../assets/styles/variables";

Expand Down Expand Up @@ -66,3 +67,4 @@ export default {
}
}
</style>
<!-- eslint-enable max-len -->
2 changes: 1 addition & 1 deletion src/renderer/components/shared/form/BaseInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
value: { type: null, default: undefined },
size: { type: String, default: 'm', validator: val => ['s', 'm'].includes(val) },
inline: { type: Boolean, default: false },
invalid: { type: Boolean, default: false },
invalid: { type: Boolean, default: false }
},
computed: {
className() {
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/components/shared/form/ValidationErrors.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<template>
<div v-if="attribute.$error" class="validation-errors">
<div v-if="attribute.required === false" class="validation-errors__error">Field is required.</div>
<div v-if="attribute.integer === false" class="validation-errors__error">Field must be an integer.</div>
<div v-if="attribute.between === false" class="validation-errors__error">Field must be between specific values.</div>
<div v-if="attribute.integer === false" class="validation-errors__error">Field must be an integer.</div>
<div v-if="attribute.between === false" class="validation-errors__error">
Field must be between specific values.
</div>
</div>
</template>

Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/shared/icons/IconArrow.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- eslint-disable max-len -->
<template>
<svg width="25" height="18" xmlns="http://www.w3.org/2000/svg" class="icon icon_arrow">
<path
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/components/shared/icons/IconArrowDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- eslint-disable max-len -->
<template>
<svg v-if="thin" width="9" height="15" xmlns="http://www.w3.org/2000/svg" :class="className">
<path
Expand All @@ -15,6 +16,7 @@
/>
</svg>
</template>
<!-- eslint-enable max-len -->

<script>
const TOS = ['top', 'bottom', 'left', 'right']
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/shared/icons/IconCross.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- eslint-disable max-len -->
<template>
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/shared/icons/IconMagnifier.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- eslint-disable max-len -->
<template>
<svg width="17" height="16" xmlns="http://www.w3.org/2000/svg" class="icon icon_magnifier">
<path
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/shared/icons/IconPause.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- eslint-disable max-len -->
<template>
<svg width="10" height="12" xmlns="http://www.w3.org/2000/svg" class="icon icon_pause">
<path
Expand Down

0 comments on commit b379d9c

Please sign in to comment.