Add medialibrary test
This commit is contained in:
parent
29c60d7bfb
commit
229a27bce2
|
|
@ -173,6 +173,7 @@ const profileDropdownData = [
|
|||
to="/media/versicherungsvermittlerin-media"
|
||||
class="nav-item"
|
||||
:class="{ 'nav-item--active': isInRoutePath(['/media']) }"
|
||||
data-cy="medialibrary-link"
|
||||
>
|
||||
Mediathek
|
||||
</router-link>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|||
<div>
|
||||
<h3 class="mb-4">{{ title }}</h3>
|
||||
<p class="mb-4">{{ description }}</p>
|
||||
<router-link :to="link" class="btn-text inline-flex items-center pl-0 pr-3 py-2">
|
||||
<router-link
|
||||
:to="link"
|
||||
class="btn-text inline-flex items-center pl-0 pr-3 py-2"
|
||||
:data-cy="`${title}-link`">
|
||||
<span class="inline">{{ call2Action }}</span>
|
||||
<it-icon-arrow-right class="ml-1 h-5 w-5"></it-icon-arrow-right>
|
||||
</router-link>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ watch(dropdownSelected, (newValue) =>
|
|||
<div v-if="mediaStore.mediaLibraryPage">
|
||||
<ul class="grid gap-5 grid-cols-1 lg:grid-cols-4">
|
||||
<li v-for="cat in categories" :key="cat.id" class="bg-white p-4">
|
||||
<router-link :to="cat.frontend_url">
|
||||
<router-link
|
||||
:to="cat.frontend_url"
|
||||
:data-cy="`${cat.title}-link`">
|
||||
<img
|
||||
class="m-auto"
|
||||
:src="`/static/icons/demo/${cat.overview_icon}.svg`"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import { login } from "./helpers";
|
||||
|
||||
describe("MediaLibrary", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
|
||||
login("admin", "test");
|
||||
cy.visit("/learn/test-lehrgang-lp/analyse");
|
||||
});
|
||||
|
||||
it("should be accessible", () => {
|
||||
cy.get('[data-cy="medialibrary-link"]').click();
|
||||
cy.get('[data-cy="Handlungsfelder-link"]').click();
|
||||
cy.get('[data-cy="Fahrzeug-link"]').click();
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue