Skip to content

Commit

Permalink
removed expect
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick committed Sep 12, 2023
1 parent 88cad06 commit 32c216f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { action } from '@storybook/addon-actions';
import { html } from 'lit';
import { ifDefined } from 'lit/directives/if-defined.js';

import { expect } from '@storybook/jest';
// import { expect } from '@storybook/jest';
import { userEvent, within } from '@storybook/testing-library';

import type { Meta, StoryObj } from '@storybook/web-components';
Expand Down Expand Up @@ -72,15 +72,15 @@ export const Interaction = {
>${'\n'}`
)}</qti-choice-interaction
>`;
},
play: ({ canvasElement }) => {
const canvas = within(canvasElement);
// // 👇 Simulate interactions with the component
// // See https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args to learn how to setup logging in the Actions panel
userEvent.click(canvas.getByTestId('choice-2'));
// // // 👇 Assert DOM structure
expect(canvas.getByTestId('choice-2').getAttribute('aria-checked')).toBeTruthy();
}
// play: ({ canvasElement }) => {
// const canvas = within(canvasElement);
// // // 👇 Simulate interactions with the component
// // // See https://storybook.js.org/docs/react/essentials/actions#automatically-matching-args to learn how to setup logging in the Actions panel
// userEvent.click(canvas.getByTestId('choice-2'));
// // // // 👇 Assert DOM structure
// expect(canvas.getByTestId('choice-2').getAttribute('aria-checked')).toBeTruthy();
// }
};

export const Simple: Story = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '../../../index';
import { html } from 'lit';
import { expect } from '@storybook/jest';
// import { expect } from '@storybook/jest';
import { within } from '@storybook/testing-library';
import type { Meta, StoryObj } from '@storybook/web-components';
import { QtiMember } from './qti-member';
Expand Down Expand Up @@ -52,12 +52,12 @@ export const MemberCorrect: Story = {
<qti-variable identifier="BODY"></qti-variable>
</qti-member>
</qti-assessment-item>`;
},
play: ({ canvasElement }) => {
const canvas = within(canvasElement);
const isMember = (canvas.getByTestId('qti-member') as QtiMember).calculate();
expect(isMember).toBeTruthy;
}
// play: ({ canvasElement }) => {
// const canvas = within(canvasElement);
// const isMember = (canvas.getByTestId('qti-member') as QtiMember).calculate();
// expect(isMember).toBeTruthy;
// }
};

export const AssessmentCorrect: Story = {
Expand Down Expand Up @@ -87,9 +87,9 @@ export const AssessmentCorrect: Story = {
</qti-response-condition>
</qti-response-processing>
</qti-assessment-item>`;
},
play: ({ canvasElement }) => {
const canvas = within(canvasElement);
(canvas.getByTestId('qti-assessment-item') as QtiAssessmentItem).processResponse();
}
// play: ({ canvasElement }) => {
// const canvas = within(canvasElement);
// (canvas.getByTestId('qti-assessment-item') as QtiAssessmentItem).processResponse();
// }
};

0 comments on commit 32c216f

Please sign in to comment.