Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/diracx-web-components/stories/DataTable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
import { ThemeProvider } from "../src/contexts/ThemeProvider";
import { DataTable, DataTableProps } from "../src/components/shared/DataTable";

import { CategoryType } from "../src";

interface SimpleItem extends Record<string, unknown> {
id: number;
name: string;
Expand All @@ -18,15 +20,15 @@ const columnHelper = createColumnHelper<SimpleItem>();
const columnDefs = [
columnHelper.accessor("id", {
header: "ID",
meta: { type: "number" },
meta: { type: CategoryType.NUMBER },
}),
columnHelper.accessor("name", {
header: "Name",
meta: { type: "string" },
meta: { type: CategoryType.STRING },
}),
columnHelper.accessor("email", {
header: "Email",
meta: { type: "string" },
meta: { type: CategoryType.STRING },
}),
];

Expand Down
4 changes: 2 additions & 2 deletions packages/diracx-web-components/stories/SearchBar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const createSuggestions = async (
};
};

const meta: Meta<SearchBarProps> = {
const meta: Meta<SearchBarProps<string>> = {
title: "shared/SearchBar",
component: SearchBar,
parameters: {
Expand All @@ -127,7 +127,7 @@ const meta: Meta<SearchBarProps> = {
};

export default meta;
type Story = StoryObj<SearchBarProps>;
type Story = StoryObj<SearchBarProps<string>>;

export const Default: Story = {
args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Metadata } from "../../src/hooks/metadata";

export { Metadata } from "../../src/hooks/metadata";

// Create a store for mock data
let mockMetadataResponse: {
metadata: Metadata | null;
Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/test/ChartView.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { render, screen } from "@testing-library/react";
import { composeStories } from "@storybook/react";
import * as stories from "../stories/ChartView.stories";
import "@testing-library/jest-dom";

// Compose the stories to get actual Storybook behavior (decorators, args, etc)
const { Default } = composeStories(stories);
Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/test/Dashboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { composeStories } from "@storybook/react";
import { useOidc, useOidcAccessToken } from "@axa-fr/react-oidc";
import { useMediaQuery } from "@mui/material";
import * as stories from "../stories/Dashboard.stories";
import "@testing-library/jest-dom";

// Compose your Storybook stories (this will include all decorators/args)
const { Default } = composeStories(stories);
Expand Down
2 changes: 0 additions & 2 deletions packages/diracx-web-components/test/DataTable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { render, screen, fireEvent, cleanup } from "@testing-library/react";
import "@testing-library/jest-dom";
import { composeStories } from "@storybook/react";
import { afterEach, describe, it, expect } from "@jest/globals";
import * as stories from "../stories/DataTable.stories";

// Compose the stories to get actual Storybook behavior (decorators, args, etc)
Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/test/ErrorBox.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { render, screen, fireEvent } from "@testing-library/react";
import { composeStories } from "@storybook/react";
import * as stories from "../stories/ErrorBox.stories";
import "@testing-library/jest-dom";

// Compose the stories to get actual Storybook behavior (decorators, args, etc)
const { Default } = composeStories(stories);
Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/test/JobMonitor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import { composeStories } from "@storybook/react";
import { VirtuosoMockContext } from "react-virtuoso";
import * as stories from "../stories/JobMonitor.stories";
import "@testing-library/jest-dom";

// Compose Storybook stories (includes all decorators/args)
const { Default, Loading, Empty, WithError } = composeStories(stories);
Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/test/LoginForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { render, screen, fireEvent } from "@testing-library/react";
import { composeStories } from "@storybook/react";
import * as stories from "../stories/LoginForm.stories";
import { useOidc } from "../stories/mocks/react-oidc.mock";
import "@testing-library/jest-dom";

const { SingleVO, MultiVO, Error, Loading } = composeStories(stories);

Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/test/SearchBar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { render, screen, waitFor } from "@testing-library/react";
import { composeStories } from "@storybook/react";
import userEvent from "@testing-library/user-event";
import * as stories from "../stories/SearchBar.stories";
import "@testing-library/jest-dom";

// Compose the stories to get actual Storybook behavior (decorators, args, etc)
const { Default, WithPrefilledTokens } = composeStories(stories);
Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/test/Sunburst.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { composeStories } from "@storybook/react";
import { Sunburst } from "../src/components/shared/Sunburst/Sunburst";
import { SunburstTree } from "../src/types";
import * as stories from "../stories/Sunburst.stories"; // Importing all stories to use in tests
import "@testing-library/jest-dom";

// Sample tree data for testing
const mockTree: SunburstTree = {
Expand Down
1 change: 0 additions & 1 deletion packages/diracx-web-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"app",
"node_modules",
"dist",
"test",
"stories",
"tsup.config.ts",
"jest.setup.ts"
Expand Down