Skip to content

Commit

Permalink
fix: load logo (#3471)
Browse files Browse the repository at this point in the history
fix: load logo

- update usage of vite load response

Closes #3470
  • Loading branch information
connoratrug authored Mar 8, 2024
1 parent 3601849 commit 04719f2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ jobs:
npx playwright test --config e2e e2e/tests
- store_test_results:
path: /root/project/e2e
- store_artifacts:
path: /root/project/e2e/test-results


delete-helm-preview:
Expand Down
3 changes: 2 additions & 1 deletion apps/nuxt3-ssr/components/Logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ if (logoFileName) {
<NuxtLink :to="link" class="transition-transform hover:scale-105">
<span class="sr-only">Go to home</span>

<i v-if="svg" v-html="svg"></i>
<i v-if="svg" v-html="svg.default"></i>

<img
v-else-if="image"
:src="image"
Expand Down
2 changes: 1 addition & 1 deletion apps/nuxt3-ssr/components/LogoMobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (logoFileName) {
height="50"
style="background-color: white"
/>
<i v-else-if="svg" v-html="svg"></i>
<i v-else-if="svg" v-html="svg.default"></i>
<img
v-else
class="w-50px h-auto"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export default defineConfig({
trace: 'on-first-retry',
},

snapshotPathTemplate: '__screenshots__/{testFilePath}/{arg}{ext}',

/* Configure projects for major browsers */
projects: [
{
Expand Down
7 changes: 7 additions & 0 deletions e2e/tests/catalogue/should-show-the-alt-logo.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { test, expect } from '@playwright/test';

test('should show the alt logo', async ({ page }) => {
await page.goto('/catalogue-demo/ssr-catalogue/?logo=UMCGkort.woordbeeld');
await page.getByRole('button', { name: 'Accept' }).click();
await expect(page).toHaveScreenshot({clip: {x: 0, y: 0, width: 200, height: 100}, threshold: 0.4});
});
2 changes: 1 addition & 1 deletion e2e/tests/catalogue/show-landing-page.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test';

test('test', async ({ page }) => {
await page.goto('catalogue-demo/ssr-catalogue/');
await page.goto('/catalogue-demo/ssr-catalogue/');
await expect(page.getByRole('heading', { name: 'European Health Research Data' })).toBeVisible();
});

0 comments on commit 04719f2

Please sign in to comment.