Auto formatting

This commit is contained in:
advplyr 2024-04-29 16:30:30 -05:00
parent 2bd532eb9a
commit ff27c0b58b
4 changed files with 41 additions and 43 deletions

View File

@ -24,7 +24,7 @@ describe('AuthorCard', () => {
LabelBooks: 'Books',
ButtonQuickMatch: 'Quick Match'
},
$store : {
$store: {
getters: {
'user/getUserCanUpdate': true,
'libraries/getLibraryProvider': () => 'audible.us'
@ -36,8 +36,8 @@ describe('AuthorCard', () => {
}
},
$eventBus: {
$on: () => {},
$off: () => {},
$on: () => { },
$off: () => { },
},
}
@ -66,7 +66,7 @@ describe('AuthorCard', () => {
it('renders the component with the author name below', () => {
const updatedPropsData = { ...propsData, nameBelow: true }
cy.mount(AuthorCard, { ...mountOptions, propsData: updatedPropsData } )
cy.mount(AuthorCard, { ...mountOptions, propsData: updatedPropsData })
cy.get('&textInline').should('be.hidden')
cy.get('&match').should('be.hidden')
@ -94,11 +94,10 @@ describe('AuthorCard', () => {
expect(width).to.be.closeTo(propsData.width, 0.01)
expect(height).to.be.closeTo(propsData.height + nameBelowHeight + py1, 0.01)
})
})
it('renders quick-match and edit buttons on mouse hover', () => {
cy.mount(AuthorCard, mountOptions )
cy.mount(AuthorCard, mountOptions)
// before mouseover
cy.get('&match').should('be.hidden')
@ -116,7 +115,7 @@ describe('AuthorCard', () => {
it('renders the component with spinner while searching', () => {
const data = () => { return { searching: true, isHovering: false } }
cy.mount(AuthorCard, { ...mountOptions, data } )
cy.mount(AuthorCard, { ...mountOptions, data })
cy.get('&textInline').should('be.hidden')
cy.get('&match').should('be.hidden')
@ -124,7 +123,7 @@ describe('AuthorCard', () => {
cy.get('&spinner').should('be.visible')
})
it ('toasts after quick match with no updates', () => {
it('toasts after quick match with no updates', () => {
const updatedMocks = {
...mocks,
$axios: {
@ -136,7 +135,7 @@ describe('AuthorCard', () => {
info: cy.spy().as('info')
}
}
cy.mount(AuthorCard, { ...mountOptions, mocks: updatedMocks } )
cy.mount(AuthorCard, { ...mountOptions, mocks: updatedMocks })
cy.get('&card').trigger('mouseover')
cy.get('&match').click()
@ -146,7 +145,7 @@ describe('AuthorCard', () => {
cy.get('@info').should('have.been.called')
})
it ('toasts after quick match with updates and no image', () => {
it('toasts after quick match with updates and no image', () => {
const updatedMocks = {
...mocks,
$axios: {
@ -158,7 +157,7 @@ describe('AuthorCard', () => {
info: cy.spy().as('info')
}
}
cy.mount(AuthorCard, { ...mountOptions, mocks: updatedMocks } )
cy.mount(AuthorCard, { ...mountOptions, mocks: updatedMocks })
cy.get('&card').trigger('mouseover')
cy.get('&match').click()
@ -168,7 +167,7 @@ describe('AuthorCard', () => {
cy.get('@info').should('not.have.been.called')
})
it ('toasts after quick match with updates including image', () => {
it('toasts after quick match with updates including image', () => {
const updatedMocks = {
...mocks,
$axios: {
@ -180,7 +179,7 @@ describe('AuthorCard', () => {
info: cy.spy().as('info')
}
}
cy.mount(AuthorCard, { ...mountOptions, mocks: updatedMocks } )
cy.mount(AuthorCard, { ...mountOptions, mocks: updatedMocks })
cy.get('&card').trigger('mouseover')
cy.get('&match').click()

View File

@ -93,7 +93,7 @@ describe('LazySeriesCard', () => {
push: cy.stub().as('routerPush')
}
}
cy.mount(LazySeriesCard, { propsData, stubs, mocks: updatedMocks})
cy.mount(LazySeriesCard, { propsData, stubs, mocks: updatedMocks })
cy.get('&card').click()
cy.get('@routerPush').should('have.been.calledOnceWithExactly', '/library/library-123/series/1')
@ -126,7 +126,7 @@ describe('LazySeriesCard', () => {
.and('have.class', 'bg-yellow-400')
.and(($el) => {
const width = $el.width()
expect(width).to.be.closeTo((2/3) * propsData.width, 0.01)
expect(width).to.be.closeTo((2 / 3) * propsData.width, 0.01)
})
})

View File

@ -51,7 +51,6 @@ describe('<NarratorCard />', () => {
cy.mount(NarratorCard, mountOptions)
cy.get('&numBooks').should('have.text', '1 Book')
})
it('renders the default name and num-books when narrator is not provided', () => {
@ -77,7 +76,7 @@ describe('<NarratorCard />', () => {
cy.get('&card').should('have.css', 'height', '100px')
})
it ('has the correct font sizes', () => {
it('has the correct font sizes', () => {
let mountOptions = { propsData, mocks }
cy.mount(NarratorCard, mountOptions)
cy.get('&name').should('have.css', 'font-size', '14.4px') // 0.75 * 1.2 * 16

View File

@ -1,10 +1,10 @@
const { defineConfig } = require("cypress");
const { defineConfig } = require("cypress")
module.exports = defineConfig({
component: {
devServer: {
framework: "nuxt",
bundler: "webpack",
},
},
});
bundler: "webpack"
}
}
})