mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-06 12:55:23 +02:00
Add a Show Subtitles option
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user