-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Motivation We need a new route to display the Portfolio page. # Changes - Creates a new route in the (nns) group for the portfolio page. # Tests - Unit test that the page renders with the appropriate title. # Todos - [ ] Add entry to changelog (if necessary). Not necessary.
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script lang="ts"> | ||
import Content from "$lib/components/layout/Content.svelte"; | ||
import Layout from "$lib/components/layout/Layout.svelte"; | ||
import LayoutList from "$lib/components/layout/LayoutList.svelte"; | ||
import { i18n } from "$lib/stores/i18n"; | ||
</script> | ||
|
||
<LayoutList title={$i18n.navigation.portfolio}> | ||
<Layout> | ||
<Content> | ||
<slot /> | ||
</Content> | ||
</Layout> | ||
</LayoutList> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<script lang="ts"> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { layoutTitleStore } from "$lib/stores/layout.store"; | ||
import PortfolioLayout from "$routes/(app)/(nns)/portfolio/+layout.svelte"; | ||
import { render } from "@testing-library/svelte"; | ||
import { get } from "svelte/store"; | ||
|
||
describe("Portfolio layout", () => { | ||
beforeEach(() => { | ||
layoutTitleStore.set({ title: "" }); | ||
}); | ||
|
||
it("should set title and header layout to 'Portfolio'", () => { | ||
render(PortfolioLayout); | ||
|
||
expect(get(layoutTitleStore)).toEqual({ | ||
title: "Portfolio", | ||
header: "Portfolio", | ||
}); | ||
}); | ||
}); |