Skip to content

Commit

Permalink
fix: broke test when itemIdentifier was not yet specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick de Klein committed Feb 14, 2025
1 parent 024451d commit 636c070
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/stories/test.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { html } from 'lit';
import { useArgs } from '@storybook/preview-api';
import { ifDefined } from 'lit/directives/if-defined.js';

import packages from '../assets/packages.json';
import { getManifestInfo } from '../lib/qti-loader';
Expand All @@ -17,7 +18,7 @@ const meta: Meta = {
},
args: {
serverLocation: '/api',
itemIdentifier: '',
itemIdentifier: undefined,
qtipkg: 'examples'
},
parameters: {
Expand All @@ -32,7 +33,7 @@ export const Test: Story = {
const [args, updateArgs] = useArgs();

return html`
<qti-test class="h-full" nav-item-id=${args.itemIdentifier}>
<qti-test class="h-full" nav-item-id=${ifDefined(args.itemIdentifier)}>
<test-navigation
auto-score-items
class="flex h-full overflow-hidden"
Expand Down

0 comments on commit 636c070

Please sign in to comment.