diff --git a/website/src/pages/[organism]/index.astro b/website/src/pages/[organism]/index.astro index afe0bbbae..8fd0c23b7 100644 --- a/website/src/pages/[organism]/index.astro +++ b/website/src/pages/[organism]/index.astro @@ -1,14 +1,6 @@ --- -import { BackButton } from '../../components/Navigation/BackButton'; import { cleanOrganism } from '../../components/Navigation/cleanOrganism'; -import BaseLayout from '../../layouts/BaseLayout.astro'; const { organism } = cleanOrganism(Astro.params.organism); +return Astro.redirect(`/${organism.key}/search`); --- - - -
- -

Organism {organism?.displayName}

-
-
diff --git a/website/src/pages/[organism]/search/index.astro b/website/src/pages/[organism]/search/index.astro index f9663fe54..542b41d7e 100644 --- a/website/src/pages/[organism]/search/index.astro +++ b/website/src/pages/[organism]/search/index.astro @@ -1,5 +1,6 @@ --- import { getData, getSearchFormFilters } from './search'; +import { cleanOrganism } from '../../../components/Navigation/cleanOrganism'; import { Pagination } from '../../../components/SearchPage/Pagination'; import { SearchForm } from '../../../components/SearchPage/SearchForm'; import { Table } from '../../../components/SearchPage/Table'; @@ -9,7 +10,7 @@ import BaseLayout from '../../../layouts/BaseLayout.astro'; import { pageSize } from '../../../settings'; const organism = Astro.params.organism!; - +const { organism: cleanedOrganism } = cleanOrganism(organism); const schema = getSchema(organism); const clientConfig = getRuntimeConfig().public; const getSearchParams = (field: string): string => { @@ -25,7 +26,7 @@ const offset = (page - 1) * pageSize; const data = await getData(organism, searchFormFilter, offset, pageSize); --- - +

Search

diff --git a/website/tests/pages/navigation.spec.ts b/website/tests/pages/navigation.spec.ts index b9065a146..ebdabd9af 100644 --- a/website/tests/pages/navigation.spec.ts +++ b/website/tests/pages/navigation.spec.ts @@ -9,7 +9,7 @@ const organismIndependentNavigationItems = [ ]; const organismNavigationItems = [ - { link: 'Search', title: 'Search' }, + { link: 'Search', title: '[Organism] - Browse' }, { link: 'Submit', title: 'Submit' }, { link: 'Revise', title: 'Revise' }, { link: 'User', title: 'Login' }, @@ -29,11 +29,11 @@ test.describe('Clicking the navigation links', () => { await navigationFixture.openOrganismNavigation(); await navigationFixture.clickLink(dummyOrganism.displayName); - await navigationFixture.expectTitle(dummyOrganism.displayName); + await navigationFixture.expectTitle(`${dummyOrganism.displayName} - Browse`); for (const { link, title } of organismNavigationItems) { await navigationFixture.clickLink(link); - await navigationFixture.expectTitle(title); + await navigationFixture.expectTitle(title.replace('[Organism]', dummyOrganism.displayName)); } }); }); diff --git a/website/tests/pages/search/index.spec.ts b/website/tests/pages/search/index.spec.ts index 034fd06b1..40de63411 100644 --- a/website/tests/pages/search/index.spec.ts +++ b/website/tests/pages/search/index.spec.ts @@ -6,7 +6,6 @@ import { baseUrl, dummyOrganism, expect, test, testSequenceEntry } from '../../e test.describe('The search page', () => { test('should show the search form with button and a table', async ({ searchPage }) => { await searchPage.goto(); - await expect(searchPage.page).toHaveTitle('Search'); await expect(searchPage.searchButton).toBeVisible(); await expect(searchPage.table).toBeVisible(); });