Skip to content

Commit

Permalink
Fix E2E tests
Browse files Browse the repository at this point in the history
valentinpalkovic committed Nov 19, 2024
1 parent bc3da7a commit a93ea7d
Showing 3 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions code/e2e-tests/module-mocking.spec.ts
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ test.describe('module-mocking', () => {
test('should assert story lifecycle order', async ({ page }) => {
const sbPage = new SbPage(page, expect);

await sbPage.navigateToStory('lib/test/before-each', 'before-each-order');
await sbPage.navigateToStory('lib/test/order-of-hooks', 'order-of-hooks');

await sbPage.viewAddonPanel('Actions');
const logItem = page.locator('#storybook-panel-root #panel-tab-content');
@@ -25,8 +25,12 @@ test.describe('module-mocking', () => {
'1 - [from loaders]',
'2 - [from meta beforeEach]',
'3 - [from story beforeEach]',
'4 - [from decorator]',
'5 - [from onClick]',
'4 - [before mount]',
'5 - [from decorator]',
'6 - [after mount]',
'7 - [from onClick]',
'8 - [from story afterEach]',
'9 - [from meta afterEach]',
];

// Assert that each LI text content contains the expected text in order
2 changes: 1 addition & 1 deletion code/lib/test/template/stories/before-each.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention,storybook/prefer-pascal-case */
import { expect, getByRole, mocked, spyOn, userEvent } from '@storybook/test';
import { expect } from '@storybook/test';

const meta = {
component: globalThis.Components.Button,

0 comments on commit a93ea7d

Please sign in to comment.