diff --git a/frontend/src/components/VAudioTrack/VAudioControl.vue b/frontend/src/components/VAudioTrack/VAudioControl.vue index 4e220245b9a..e74d01b6f17 100644 --- a/frontend/src/components/VAudioTrack/VAudioControl.vue +++ b/frontend/src/components/VAudioTrack/VAudioControl.vue @@ -3,7 +3,7 @@ :tabindex="isTabbable ? 0 : -1" class="audio-control" :size="buttonSize" - variant="filled-dark" + :variant="layout === 'box' ? 'transparent-dark' : 'filled-dark'" :icon-props="icon === undefined ? undefined : { name: icon, size: iSize }" :label="$t(label)" :connections="connections" @@ -61,7 +61,7 @@ const layoutConnectionsMap: Record = } as const /** - * The mapping of play-pause control sizes to the VIconButton sizes + * The mapping of audio control sizes to the VIconButton sizes * and the sizes of the contained icon. */ const sizes = { @@ -111,7 +111,7 @@ export default defineComponent({ (audioLayouts as readonly string[]).includes(val), }, /** - * Whether the play-pause button can be focused by using the `Tab` key + * Whether the audio control button can be focused by using the `Tab` key */ isTabbable: { type: Boolean, @@ -142,7 +142,7 @@ export default defineComponent({ : [...layoutConnectionsMap[props.layout]] }) - /** Convert the `play-pause` sizes to `VIconButton` sizes */ + /** Convert the `audio-control` sizes to `VIconButton` sizes */ const buttonSize = computed(() => sizes[props.size].button) const iSize = computed(() => sizes[props.size].icon) diff --git a/frontend/src/components/VAudioTrack/VAudioTrack.vue b/frontend/src/components/VAudioTrack/VAudioTrack.vue index 87b527f5366..14663256080 100644 --- a/frontend/src/components/VAudioTrack/VAudioTrack.vue +++ b/frontend/src/components/VAudioTrack/VAudioTrack.vue @@ -36,20 +36,11 @@ /> - @@ -131,6 +132,8 @@ export default defineComponent({ isFilterVisible: isSidebarVisible, } = storeToRefs(uiStore) + const isSm = computed(() => uiStore.isBreakpoint("sm")) + return { searchTerm, isError, @@ -145,6 +148,7 @@ export default defineComponent({ isSidebarVisible, isSnackbarVisible, + isSm, isDetail, } diff --git a/frontend/src/components/VSearchResultsGrid/VAudioList.vue b/frontend/src/components/VSearchResultsGrid/VAudioList.vue index cf208d1c245..f061085f965 100644 --- a/frontend/src/components/VSearchResultsGrid/VAudioList.vue +++ b/frontend/src/components/VSearchResultsGrid/VAudioList.vue @@ -55,11 +55,11 @@ export default defineComponent({ const audioTrackSize = computed(() => { if (props.kind === "related") { - return uiStore.isBreakpoint("md") ? "l" : "s" + return uiStore.isBreakpoint("sm") ? "m" : "s" } else { - return !uiStore.isDesktopLayout + return !uiStore.isBreakpoint("sm") ? "s" - : uiStore.isFilterVisible + : uiStore.isBreakpoint("xl") ? "l" : "m" } diff --git a/frontend/src/components/VSearchResultsGrid/VAudioResult.vue b/frontend/src/components/VSearchResultsGrid/VAudioResult.vue index 90e32019686..a3413afbbb3 100644 --- a/frontend/src/components/VSearchResultsGrid/VAudioResult.vue +++ b/frontend/src/components/VSearchResultsGrid/VAudioResult.vue @@ -65,7 +65,7 @@ export default defineComponent({ { inWaveform }: AudioTrackClickEvent ) => { // Only send the event when the click navigates to the single result page. - // If the click is in waveform or play-pause button, it controls the audio player. + // If the click is in waveform or audio-control button, it controls the audio player. if (inWaveform) return useAudioSnackbar().hide() sendCustomEvent("SELECT_SEARCH_RESULT", { diff --git a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-ltr-png-xs-linux.png b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-ltr-png-xs-linux.png index 4a9fd2edead..7dc1689ed15 100644 Binary files a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-ltr-png-xs-linux.png and b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-ltr-png-xs-linux.png differ diff --git a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png index d584212af0d..764c0b58408 100644 Binary files a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png and b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png index 1447bce4dba..fbe79a9de8a 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-2xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png index a4790d57c38..fcb0f3c2915 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-lg-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png index 8cbbd7d09bc..34f254e43db 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-md-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png index d9747e2cb2f..f20577d1b72 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-sm-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-2xl-linux.png index 3480746bf29..139bb60a071 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-2xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-lg-linux.png index 64372ca28a5..3269d167ca6 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-lg-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-md-linux.png index 4ff9a56889c..df9c3947425 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-md-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-sm-linux.png index 28fc41d8147..5d73531919d 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-sm-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xl-linux.png index dcd66a8956f..3a9be4b23e8 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xs-linux.png index 00ab4a4ceb3..fa59cb39c53 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-with-additional-search-views-xs-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png index c620ec857c9..8c4866b92cf 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png index 21374892ce6..47ff85f52b7 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-ltr-from-search-results-xs-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png index 8ef08f90810..373a75d659f 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-2xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png index 11d8203dcaf..6c6d4eb0d67 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-lg-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png index daf50b9c054..d5ed2ee0151 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-md-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png index ca39a427b31..727efdab203 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-sm-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-2xl-linux.png index 6da9234df46..04f9423c637 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-2xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-lg-linux.png index 9bda0cc7736..07b821614b6 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-lg-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-md-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-md-linux.png index 04e7241e6e1..a54fa6fb8ab 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-md-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-md-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-sm-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-sm-linux.png index 1ceb14bde43..8eca5079c9f 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-sm-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xl-linux.png index 6b59deb4340..7689f69bedd 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xs-linux.png index 97b29779da8..635ad2cfa70 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-with-additional-search-views-xs-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png index 6451d565288..1aa678693f1 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png index db719cd5698..a5c23c4203b 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/pages-single-result.spec.ts-snapshots/audio-rtl-from-search-results-xs-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-page-rtl-lg-linux.png b/frontend/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-page-rtl-lg-linux.png index d045b1e8f96..a1566b7ace3 100644 Binary files a/frontend/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-page-rtl-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/pages.spec.ts-snapshots/search-page-rtl-lg-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png index 473f44db6d3..53f658d3ae0 100644 Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-2xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png index cb94dde15cd..73791a1e42c 100644 Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-lg-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png index cddd084ecb0..5d7f36ec4bb 100644 Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-md-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png index fb1803f8790..958412e659c 100644 Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-sm-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png index 4602c249639..6bbadffbdd1 100644 Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xl-linux.png differ diff --git a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png index 8a3c127bd3d..ba10c47c4a7 100644 Binary files a/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png and b/frontend/test/playwright/visual-regression/pages/search-with-banners.spec.ts-snapshots/page-with-all-banners-xs-linux.png differ diff --git a/frontend/test/unit/specs/components/AudioTrack/v-audio-track.spec.js b/frontend/test/unit/specs/components/AudioTrack/v-audio-track.spec.js index 38b151c6788..a648456e7c1 100644 --- a/frontend/test/unit/specs/components/AudioTrack/v-audio-track.spec.js +++ b/frontend/test/unit/specs/components/AudioTrack/v-audio-track.spec.js @@ -1,5 +1,3 @@ -/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["expect", "getByText"] }] */ - import { fireEvent } from "@testing-library/vue" import { render } from "~~/test/unit/test-utils/render" @@ -21,7 +19,6 @@ jest.mock("~/composables/use-match-routes", () => ({ })) const stubs = { - VPlayPause: true, VLicense: true, VWaveform: true, VAudioThumbnail: true, @@ -60,30 +57,35 @@ describe("AudioTrack", () => { }) it("should render the full audio track component even without duration", () => { + options.propsData.layout = "full" const { getByText } = render(VAudioTrack, options, configureVue) - getByText(props.audio.creator) - }) - - it("should render the row audio track component even without duration", () => { - options.propsData.layout = "row" - const { getByText } = render(VAudioTrack, options, configureVue) - getByText("by " + props.audio.creator) + const creator = getByText(props.audio.creator) + expect(creator).toBeInstanceOf(HTMLAnchorElement) }) - it("should show audio title as main page title", () => { + it("should show audio title as main page title in full layout", () => { + options.propsData.layout = "full" const { getByText } = render(VAudioTrack, options, configureVue) // Title text appears multiple times in the track, so need to specify selector const element = getByText(props.audio.title, { selector: "H1" }) expect(element).toBeInTheDocument() }) - it("should show audio creator with link", () => { + it("should show audio creator in a full layout with link", () => { + options.propsData.layout = "full" const { getByText } = render(VAudioTrack, options, configureVue) const element = getByText(props.audio.creator) expect(element).toBeInstanceOf(HTMLAnchorElement) expect(element).toHaveAttribute("href", props.audio.creator_url) }) + it("should render the row audio track component even without duration", () => { + options.propsData.layout = "row" + const { getByText } = render(VAudioTrack, options, configureVue) + const creator = getByText("by " + props.audio.creator) + expect(creator).toBeTruthy() + }) + it.each` errorType | errorText ${"NotAllowedError"} | ${/Reproduction not allowed./i} @@ -95,7 +97,6 @@ describe("AudioTrack", () => { async ({ errorType, errorText }) => { options.propsData.audio.url = "bad.url" options.propsData.layout = "row" - options.stubs.VPlayPause = false options.stubs.VWaveform = false options.stubs.VAudioThumbnail = true @@ -136,6 +137,7 @@ describe("AudioTrack", () => { it("has blurred title in box layout when audio is sensitive", async () => { options.propsData.audio.isSensitive = true options.propsData.layout = "box" + options.propsData.size = "large" const { getByText } = render(VAudioTrack, options, configureVue) const h2 = getByText("This audio track may contain sensitive content.") expect(h2).toHaveClass("blur-text") diff --git a/frontend/test/unit/specs/components/AudioTrack/v-box-layout.spec.js b/frontend/test/unit/specs/components/AudioTrack/v-box-layout.spec.js index ffcbe7e988a..a54989607fa 100644 --- a/frontend/test/unit/specs/components/AudioTrack/v-box-layout.spec.js +++ b/frontend/test/unit/specs/components/AudioTrack/v-box-layout.spec.js @@ -21,11 +21,14 @@ describe("VBoxLayout", () => { it("renders audio title, license and category in v-box-layout", () => { props.audio.category = "music" render(VBoxLayout, options) - expect(() => { - screen.getByText(props.audio.title) - screen.getByLabelText("Attribution-NonCommercial-Share-Alike") - screen.getByText("Music") - }).not.toThrow() + const title = screen.getByText(props.audio.title) + expect(title).toBeVisible() + const license = screen.getByLabelText( + "Attribution-NonCommercial-Share-Alike" + ) + expect(license).toBeInTheDocument() // Not visible unless hovered + const category = screen.getByText("Music") + expect(category).toBeVisible() }) it("should not render category string if category is null", () => {