Skip to content

Commit

Permalink
feat(website): Improve spacing of social media title, and add website…
Browse files Browse the repository at this point in the history
…Name to <title> (#2640)

* Improve spacing of social media title, and add websiteName to <title>

* adjust title checks

* another

* Automated code formatting

* try to fix test

---------

Co-authored-by: Loculus bot <bot@loculus.org>
  • Loading branch information
theosanderson and Loculus bot authored Aug 28, 2024
1 parent a052f2a commit fd8e09a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions website/src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const lastTimeBannerWasClosed = Astro.cookies.get('lastTimeBannerWasClosed')?.va
<meta name='viewport' content='width=device-width' />
<meta name='generator' content={Astro.generator} />
<meta property='og:url' content={Astro.url} />
<meta property='og:title' content={websiteName + '| ' + title} />
<meta property='og:title' content={websiteName + ' | ' + title} />
<meta property='twitter:url' content={Astro.url} />
<meta property='twitter:title' content={websiteName + '| ' + title} />
<title>{title}</title>
<meta property='twitter:title' content={websiteName + ' | ' + title} />
<title>{title} | {websiteName}</title>
<Fragment set:html={additionalHeadHTML} />
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion website/tests/pages/navigation.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export class NavigationFixture {
}

public async expectTitle(title: string) {
await expect(this.page).toHaveTitle(title);
await expect(this.page).toHaveTitle(new RegExp(`^${title}`));
}
}
2 changes: 1 addition & 1 deletion website/tests/pages/sequences/sequences.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class SequencePage {

public async goto(accessionVersion: AccessionVersion) {
await this.page.goto(`${baseUrl}${routes.sequencesDetailsPage(accessionVersion)}`);
await expect(this.page).toHaveTitle(getAccessionVersionString(accessionVersion));
await expect(this.page).toHaveTitle(new RegExp(`^${getAccessionVersionString(accessionVersion)}`));
}

public async gotoAllVersions() {
Expand Down

0 comments on commit fd8e09a

Please sign in to comment.