npm eslint --fix .
This commit is contained in:
parent
6bea363b9d
commit
2c2b84d31d
@ -10,6 +10,12 @@ export default Vue.component('tab-switcher', {
|
|||||||
active: this.$slots.default.findIndex(_ => _.tag)
|
active: this.$slots.default.findIndex(_ => _.tag)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeUpdate () {
|
||||||
|
const currentSlot = this.$slots.default[this.active]
|
||||||
|
if (!currentSlot.tag) {
|
||||||
|
this.active = this.$slots.default.findIndex(_ => _.tag)
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
activateTab (index, dataset) {
|
activateTab (index, dataset) {
|
||||||
return () => {
|
return () => {
|
||||||
@ -20,12 +26,6 @@ export default Vue.component('tab-switcher', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpdate () {
|
|
||||||
const currentSlot = this.$slots.default[this.active]
|
|
||||||
if (!currentSlot.tag) {
|
|
||||||
this.active = this.$slots.default.findIndex(_ => _.tag)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
render (h) {
|
render (h) {
|
||||||
const tabs = this.$slots.default
|
const tabs = this.$slots.default
|
||||||
.map((slot, index) => {
|
.map((slot, index) => {
|
||||||
|
@ -14,29 +14,6 @@ const withLoadMore = ({
|
|||||||
const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames)
|
const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames)
|
||||||
|
|
||||||
return Vue.component('withLoadMore', {
|
return Vue.component('withLoadMore', {
|
||||||
render (createElement) {
|
|
||||||
const props = {
|
|
||||||
props: {
|
|
||||||
...this.$props,
|
|
||||||
[childPropName]: this.entries
|
|
||||||
},
|
|
||||||
on: this.$listeners,
|
|
||||||
scopedSlots: this.$scopedSlots
|
|
||||||
}
|
|
||||||
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
|
||||||
return (
|
|
||||||
<div class="with-load-more">
|
|
||||||
<WrappedComponent {...props}>
|
|
||||||
{children}
|
|
||||||
</WrappedComponent>
|
|
||||||
<div class="with-load-more-footer">
|
|
||||||
{this.error && <a onClick={this.fetchEntries} class="alert error">{this.$t('general.generic_error')}</a>}
|
|
||||||
{!this.error && this.loading && <i class="icon-spin3 animate-spin"/>}
|
|
||||||
{!this.error && !this.loading && !this.bottomedOut && <a onClick={this.fetchEntries}>{this.$t('general.more')}</a>}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
},
|
|
||||||
props,
|
props,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@ -87,6 +64,29 @@ const withLoadMore = ({
|
|||||||
this.fetchEntries()
|
this.fetchEntries()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
render (createElement) {
|
||||||
|
const props = {
|
||||||
|
props: {
|
||||||
|
...this.$props,
|
||||||
|
[childPropName]: this.entries
|
||||||
|
},
|
||||||
|
on: this.$listeners,
|
||||||
|
scopedSlots: this.$scopedSlots
|
||||||
|
}
|
||||||
|
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
||||||
|
return (
|
||||||
|
<div class="with-load-more">
|
||||||
|
<WrappedComponent {...props}>
|
||||||
|
{children}
|
||||||
|
</WrappedComponent>
|
||||||
|
<div class="with-load-more-footer">
|
||||||
|
{this.error && <a onClick={this.fetchEntries} class="alert error">{this.$t('general.generic_error')}</a>}
|
||||||
|
{!this.error && this.loading && <i class="icon-spin3 animate-spin"/>}
|
||||||
|
{!this.error && !this.loading && !this.bottomedOut && <a onClick={this.fetchEntries}>{this.$t('general.more')}</a>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -17,35 +17,6 @@ const withSubscription = ({
|
|||||||
...props,
|
...props,
|
||||||
'refresh' // boolean saying to force-fetch data whenever created
|
'refresh' // boolean saying to force-fetch data whenever created
|
||||||
],
|
],
|
||||||
render (createElement) {
|
|
||||||
if (!this.error && !this.loading) {
|
|
||||||
const props = {
|
|
||||||
props: {
|
|
||||||
...this.$props,
|
|
||||||
[childPropName]: this.fetchedData
|
|
||||||
},
|
|
||||||
on: this.$listeners,
|
|
||||||
scopedSlots: this.$scopedSlots
|
|
||||||
}
|
|
||||||
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
|
||||||
return (
|
|
||||||
<div class="with-subscription">
|
|
||||||
<WrappedComponent {...props}>
|
|
||||||
{children}
|
|
||||||
</WrappedComponent>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<div class="with-subscription-loading">
|
|
||||||
{this.error
|
|
||||||
? <a onClick={this.fetchData} class="alert error">{this.$t('general.generic_error')}</a>
|
|
||||||
: <i class="icon-spin3 animate-spin"/>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -77,6 +48,35 @@ const withSubscription = ({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
render (createElement) {
|
||||||
|
if (!this.error && !this.loading) {
|
||||||
|
const props = {
|
||||||
|
props: {
|
||||||
|
...this.$props,
|
||||||
|
[childPropName]: this.fetchedData
|
||||||
|
},
|
||||||
|
on: this.$listeners,
|
||||||
|
scopedSlots: this.$scopedSlots
|
||||||
|
}
|
||||||
|
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
||||||
|
return (
|
||||||
|
<div class="with-subscription">
|
||||||
|
<WrappedComponent {...props}>
|
||||||
|
{children}
|
||||||
|
</WrappedComponent>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<div class="with-subscription-loading">
|
||||||
|
{this.error
|
||||||
|
? <a onClick={this.fetchData} class="alert error">{this.$t('general.generic_error')}</a>
|
||||||
|
: <i class="icon-spin3 animate-spin"/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -9,4 +9,3 @@ export function humanizeErrors (errors) {
|
|||||||
return [...errs, message]
|
return [...errs, message]
|
||||||
}, [])
|
}, [])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,43 +3,43 @@ var config = require('../../config')
|
|||||||
|
|
||||||
// http://nightwatchjs.org/guide#settings-file
|
// http://nightwatchjs.org/guide#settings-file
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"src_folders": ["test/e2e/specs"],
|
'src_folders': ['test/e2e/specs'],
|
||||||
"output_folder": "test/e2e/reports",
|
'output_folder': 'test/e2e/reports',
|
||||||
"custom_assertions_path": ["test/e2e/custom-assertions"],
|
'custom_assertions_path': ['test/e2e/custom-assertions'],
|
||||||
|
|
||||||
"selenium": {
|
'selenium': {
|
||||||
"start_process": true,
|
'start_process': true,
|
||||||
"server_path": "node_modules/selenium-server/lib/runner/selenium-server-standalone-2.53.1.jar",
|
'server_path': 'node_modules/selenium-server/lib/runner/selenium-server-standalone-2.53.1.jar',
|
||||||
"host": "127.0.0.1",
|
'host': '127.0.0.1',
|
||||||
"port": 4444,
|
'port': 4444,
|
||||||
"cli_args": {
|
'cli_args': {
|
||||||
"webdriver.chrome.driver": require('chromedriver').path
|
'webdriver.chrome.driver': require('chromedriver').path
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"test_settings": {
|
'test_settings': {
|
||||||
"default": {
|
'default': {
|
||||||
"selenium_port": 4444,
|
'selenium_port': 4444,
|
||||||
"selenium_host": "localhost",
|
'selenium_host': 'localhost',
|
||||||
"silent": true,
|
'silent': true,
|
||||||
"globals": {
|
'globals': {
|
||||||
"devServerURL": "http://localhost:" + (process.env.PORT || config.dev.port)
|
'devServerURL': 'http://localhost:' + (process.env.PORT || config.dev.port)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"chrome": {
|
'chrome': {
|
||||||
"desiredCapabilities": {
|
'desiredCapabilities': {
|
||||||
"browserName": "chrome",
|
'browserName': 'chrome',
|
||||||
"javascriptEnabled": true,
|
'javascriptEnabled': true,
|
||||||
"acceptSslCerts": true
|
'acceptSslCerts': true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"firefox": {
|
'firefox': {
|
||||||
"desiredCapabilities": {
|
'desiredCapabilities': {
|
||||||
"browserName": "firefox",
|
'browserName': 'firefox',
|
||||||
"javascriptEnabled": true,
|
'javascriptEnabled': true,
|
||||||
"acceptSslCerts": true
|
'acceptSslCerts': true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ module.exports = function (config) {
|
|||||||
'FirefoxHeadless': {
|
'FirefoxHeadless': {
|
||||||
base: 'Firefox',
|
base: 'Firefox',
|
||||||
flags: [
|
flags: [
|
||||||
'-headless',
|
'-headless'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const example = '<div class="status-content">@<a href="https://sealion.club/user/4" class="h-card mention" title="dewoo">dwmatiz</a> <a href="https://social.heldscal.la/file/3deb764ada10ce64a61b7a070b75dac45f86d2d5bf213bf18873da71d8714d86.png" title="https://social.heldscal.la/file/3deb764ada10ce64a61b7a070b75dac45f86d2d5bf213bf18873da71d8714d86.png" class="attachment" id="attachment-159853" rel="nofollow external">https://social.heldscal.la/attachment/159853</a></div>'
|
|
||||||
|
|
||||||
import { removeAttachmentLinks } from '../../../../../src/services/status_parser/status_parser.js'
|
import { removeAttachmentLinks } from '../../../../../src/services/status_parser/status_parser.js'
|
||||||
|
|
||||||
|
const example = '<div class="status-content">@<a href="https://sealion.club/user/4" class="h-card mention" title="dewoo">dwmatiz</a> <a href="https://social.heldscal.la/file/3deb764ada10ce64a61b7a070b75dac45f86d2d5bf213bf18873da71d8714d86.png" title="https://social.heldscal.la/file/3deb764ada10ce64a61b7a070b75dac45f86d2d5bf213bf18873da71d8714d86.png" class="attachment" id="attachment-159853" rel="nofollow external">https://social.heldscal.la/attachment/159853</a></div>'
|
||||||
|
|
||||||
describe('statusParser.removeAttachmentLinks', () => {
|
describe('statusParser.removeAttachmentLinks', () => {
|
||||||
const exampleWithoutAttachmentLinks = '<div class="status-content">@<a href="https://sealion.club/user/4" class="h-card mention" title="dewoo">dwmatiz</a> </div>'
|
const exampleWithoutAttachmentLinks = '<div class="status-content">@<a href="https://sealion.club/user/4" class="h-card mention" title="dewoo">dwmatiz</a> </div>'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user