mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 18:24:46 +02:00
Add a Show Subtitles option
This commit is contained in:
parent
6b6df619f5
commit
54f2bb1092
4 changed files with 76 additions and 2 deletions
|
@ -11,7 +11,7 @@ function createMountOptions() {
|
|||
mediaType: 'book',
|
||||
media: {
|
||||
id: 'book1',
|
||||
metadata: { title: 'The Fellowship of the Ring', titleIgnorePrefix: 'Fellowship of the Ring', authorName: 'J. R. R. Tolkien' },
|
||||
metadata: { title: 'The Fellowship of the Ring', titleIgnorePrefix: 'Fellowship of the Ring', authorName: 'J. R. R. Tolkien', subtitle: 'The Lord of the Rings, Book 1' },
|
||||
numTracks: 1
|
||||
}
|
||||
}
|
||||
|
@ -138,6 +138,16 @@ describe('LazyBookCard', () => {
|
|||
})
|
||||
})
|
||||
|
||||
it('shows subtitle when showSubtitles settings is true', () => {
|
||||
mountOptions.mocks.$store.getters['user/getUserSetting'] = (settingName) => {
|
||||
if (settingName === 'showSubtitles') return true
|
||||
}
|
||||
cy.mount(LazyBookCard, mountOptions)
|
||||
|
||||
cy.get('&titleImageNotReady').should('be.hidden')
|
||||
cy.get('&subtitle').should('be.visible').and('have.text', 'The Lord of the Rings, Book 1')
|
||||
})
|
||||
|
||||
it('shows overlay on mouseover', () => {
|
||||
cy.mount(LazyBookCard, mountOptions)
|
||||
cy.get('#book-card-0').trigger('mouseover')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue