Skip to content

Commit

Permalink
fix(project): assets object not required anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
“Anton committed Jul 18, 2022
1 parent 0be1a61 commit d17f6e4
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@
"glob-parent": "^5.1.2",
"codeceptjs/**/ansi-regex": "^4.1.1"
}
}
}
4 changes: 4 additions & 0 deletions src/components/Header/Header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import Button from '../Button/Button';

import Header from './Header';

vi.mock('react-router-dom', () => ({
NavLink: () => 'a',
}));

describe('<Header />', () => {
test('renders header', () => {
const playlistMenuItems = [<Button key="key" label="Home" to="/" />];
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const Header: React.FC<Props> = ({
</div>
)}
<nav className={styles.nav} aria-label="menu">
{logoLoaded ? children : null}
{logoLoaded || !logoSrc ? children : null}
</nav>
<div className={styles.search}>{searchEnabled ? search : null}</div>
{renderUserActions()}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Header/__snapshots__/Header.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ exports[`<Header /> > renders header 1`] = `
<nav
aria-label="menu"
class="nav"
/>
>
a
</nav>
<div
class="search"
>
Expand Down
12 changes: 11 additions & 1 deletion src/containers/Layout/__snapshots__/Layout.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,17 @@ exports[`<Layout /> > renders layout 1`] = `
<nav
aria-label="menu"
class="nav"
/>
>
<a
aria-current="page"
class="button default text active"
href="/"
>
<span>
home
</span>
</a>
</nav>
<div
class="search"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/services/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const configSchema: SchemaOf<Config> = object({
adSchedule: string().nullable(),
assets: object({
banner: string().notRequired(),
}).defined(),
}).notRequired(),
content: array().of(contentSchema),
menu: array().of(menuSchema),
styling: stylingSchema.notRequired(),
Expand Down

0 comments on commit d17f6e4

Please sign in to comment.