Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarrough committed Jan 5, 2018
1 parent 54a1c52 commit a2751dc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ describe('<Loading> component', function() {
let wrapper = mount(Loading)
let vm = wrapper.vm
vm.$props.message = 'hello this is dog'
return cy.wait(10).then(() => {
// vm.$nextTick(() => {
return cy.wait(10).then(() => {
assert.equal(wrapper.element.innerText, 'hello this is dog')
})
})
Expand Down
8 changes: 0 additions & 8 deletions cypress/integration/radio4000-player.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
describe('<radio4000-player> web component', function() {
before(() => {
// You will need to run `yarn start` yourself.

// Visiting our app before each test removes any state build up from
// previous tests. Visiting acts as if we closed a tab and opened a fresh one
// https://on.cypress.io/visit
cy.visit('/')
})

beforeEach(function() {
})

it('it renders', function() {
cy.get('radio4000-player').as('player')
.should('have.length', 1)
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/youtube-player.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {mount} from 'vue-test-utils'
import { mount } from 'vue-test-utils'
import Component from '../../src/YoutubePlayer.vue'

describe('<YoutubePlayer> component', function() {
Expand Down
31 changes: 16 additions & 15 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,28 @@
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

// 1/2 Tell Cypress how to load .Vue files.
const webpack = require('@cypress/webpack-preprocessor')
const webpackOptions = {
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
}
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
}
}

const options = {
// send in the options from your webpack.config.js, so it works the same
// as your app's code
webpackOptions,
watchOptions: {}
// send options from your webpack.config.js, so it works the same as your app's code
webpackOptions,
watchOptions: {}
}

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config

// 2/2 Tell Cypress how to load .Vue files.
on('file:preprocessor', webpack(options))
}

0 comments on commit a2751dc

Please sign in to comment.