Skip to content

Commit

Permalink
fix: menu links for details page and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Oct 18, 2023
1 parent a604845 commit 8b21a51
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 51 deletions.
10 changes: 5 additions & 5 deletions frontend/src/components/HeaderDefault.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ import UserProfileButton from '@/components/UserProfileButton.vue'
<v-spacer></v-spacer>
<v-toolbar-items class="topbar-links">
<UserProfileButton />
<v-menu>
<v-menu id="menu">
<template v-slot:activator="{ props }">
<v-btn icon="mdi-dots-vertical" v-bind="props"></v-btn>
</template>

<v-list>
<v-list-item to="/about">
<v-list-item to="/about" id="about">
<v-list-item-title> About </v-list-item-title>
</v-list-item>
<v-list-item to="/contact">
<v-list-item to="/contact" id="contact">
<v-list-item-title> Contact </v-list-item-title>
</v-list-item>
<v-list-item to="/privacy">
<v-list-item to="/privacy" id="privacy">
<v-list-item-title> Privacy Policy </v-list-item-title>
</v-list-item>
<v-list-item to="/terms">
<v-list-item to="/terms" id="terms">
<v-list-item-title> Terms of Use </v-list-item-title>
</v-list-item>
</v-list>
Expand Down
22 changes: 20 additions & 2 deletions frontend/src/components/HeaderDetailPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,27 @@ watch(() => props.searchTerm, updateTerms)
/>
<v-spacer></v-spacer>
<v-toolbar-items class="topbar-links">
<v-btn id="about" to="/about"> About </v-btn>
<v-btn id="contact" to="/contact"> Contact </v-btn>
<UserProfileButton />
<v-menu id="menu">
<template v-slot:activator="{ props }">
<v-btn icon="mdi-dots-vertical" v-bind="props"></v-btn>
</template>

<v-list>
<v-list-item to="/about" id="about">
<v-list-item-title> About </v-list-item-title>
</v-list-item>
<v-list-item to="/contact" id="contact">
<v-list-item-title> Contact </v-list-item-title>
</v-list-item>
<v-list-item to="/privacy" id="privacy">
<v-list-item-title> Privacy Policy </v-list-item-title>
</v-list-item>
<v-list-item to="/terms" id="terms">
<v-list-item-title> Terms of Use </v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</v-toolbar-items>
</v-app-bar>
</template>
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/__tests__/HeaderDefault.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ describe.concurrent('HeaderDefault.vue', () => {
}
)

const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
const menu = wrapper.find('#menu')
expect(menu.exists()).toBe(true)
})
})
6 changes: 2 additions & 4 deletions frontend/src/components/__tests__/HeaderDetailPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,9 @@ describe.concurrent('HeaderDetailPage', async () => {
store.geneInfo = JSON.parse(JSON.stringify(geneData.geneInfo))

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders the search bar', async () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/__tests__/ACMGCriteriaDoc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ describe.concurrent('ACMGCriteriaDocs', async () => {
)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders the main content', () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/__tests__/ACMGSVDocs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ describe.concurrent('ACMGSVDocs', async () => {
)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders the main content', () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/__tests__/AboutView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ describe.concurrent('AboutView', async () => {
)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders the main content', () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/__tests__/ContactView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ describe.concurrent('ContactView', async () => {
)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders the main content', () => {
Expand Down
12 changes: 4 additions & 8 deletions frontend/src/views/__tests__/GeneDetailView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ describe.concurrent('GeneDetailView', async () => {
expect(searchBar.exists()).toBe(true)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)

const launchImage = wrapper.findAll('.mdi-launch')
expect(launchImage.length).toBe(14)
Expand All @@ -74,11 +72,9 @@ describe.concurrent('GeneDetailView', async () => {
expect(searchBar.exists()).toBe(true)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders info-cards and navigation drawer', () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/__tests__/GenesListView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ describe.concurrent('GenesListView', async () => {
expect(searchBar.exists()).toBe(true)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders the search results', async () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/__tests__/HomeView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ describe.concurrent('HomeView with mocked router', async () => {
expect(footer.exists()).toBe(true)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('renders the search bar', () => {
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/views/__tests__/VariantDetailView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,9 @@ describe('VariantDetailView', async () => {
expect(searchBar.exists()).toBe(true)

const logo = wrapper.find('#logo')
const aboutLink = wrapper.find('#about')
const contactLink = wrapper.find('#contact')
const menu = wrapper.find('#menu')
expect(logo.exists()).toBe(true)
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
expect(menu.exists()).toBe(true)
})

it('emits update in header', async () => {
Expand Down

0 comments on commit 8b21a51

Please sign in to comment.