Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22235: Added TraineeCreationStepperComponent flexibility, Loading state for FeaturesAttributesRows, and ProjectsIcon, MINOR #32

Merged
merged 5 commits into from
Dec 5, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ const en = {
timeSeries: "Time series",
type: "Type",
},
state: {
empty: "No features were found in the dataset.",
},
};

type Resource = typeof en;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const meta: Meta<typeof FeaturesAttributesRows> = {
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
argTypes: {},
args: {
loading: false,
purposes: ["core"],
},
};
Expand Down Expand Up @@ -186,6 +187,23 @@ Synthesis.args!.timeFeatureAtom =
runRequiredAtom: synthesisRunRequiredAtom,
});

const loadingRunRequiredAtom = getInferFeatureAttributesRunRequiredFields();
export const Loading: Story = {
args: {
loading: true,
activeFeatureAtom: getFeatureAttributesActiveFeatureAtom(),
optionsAtom: getFeatureAttributesOptionsAtom({}),
paramsAtom: getInferFeatureAttributesParamsAtom({
features: sampleFeatureAttributesIndex,
}),
runRequiredAtom: loadingRunRequiredAtom,
},
};
Default.args!.timeFeatureAtom = getInferFeatureAttributesParamsTimeFeatureAtom({
paramsAtom: Default.args!.paramsAtom!,
runRequiredAtom: loadingRunRequiredAtom,
});

const noFeaturesRunRequiredAtom = getInferFeatureAttributesRunRequiredFields();
export const NoFeatures: Story = {
args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ describe("FeaturesAttributesRows", () => {
);

const table = screen.getByRole("table");
const featureRows = within(table).getAllByRole("row").slice(1);
const featureRows = within(table)
.getAllByRole("row")
// Remove the header row
.slice(1);
expect(featureRows.length).toBe(features.length);
features.forEach((feature) => {
within(table).getByText(feature);
Expand Down
Loading
Loading