Compare commits

..

4 Commits

Author SHA1 Message Date
Abhimanyu Yadav
39dbe50a14 Merge branch 'dev' into abhi/adding-some-enter-animation-on-marketplace 2026-01-22 17:11:59 +05:30
abhi1992002
9c2cd28843 fix format 2026-01-22 17:11:23 +05:30
abhi1992002
9b097b0ede refactor(frontend): update Storybook imports to use @storybook/nextjs
### Changes
- Updated import statements in FilterChip, Separator, FadeIn, and StaggeredList story files to use `@storybook/nextjs` instead of `@storybook/react` for improved compatibility with Next.js.

### Checklist
- [x] Verified that all story files function correctly after the import change.
2026-01-22 17:00:27 +05:30
Abhimanyu Yadav
fc87ed4e34 feat(ci): add integration test job and rename e2e test job (#11820)
### Changes 🏗️

- Renamed the `test` job to `e2e_test` in the CI workflow for better
clarity
- Added a new `integration_test` job to the CI workflow that runs unit
tests using `pnpm test:unit`
- Created a basic integration test for the MainMarketplacePage component
to verify CI functionality

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] Verified the CI workflow runs both e2e and integration tests
  - [x] Confirmed the integration test for MainMarketplacePage passes

#### For configuration changes:

- [x] `.env.default` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
2026-01-22 11:14:48 +00:00
9 changed files with 89 additions and 20 deletions

View File

@@ -128,7 +128,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
exitOnceUploaded: true
test:
e2e_test:
runs-on: big-boi
needs: setup
strategy:
@@ -258,3 +258,39 @@ jobs:
- name: Print Final Docker Compose logs
if: always()
run: docker compose -f ../docker-compose.yml logs
integration_test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22.18.0"
- name: Enable corepack
run: corepack enable
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ needs.setup.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-pnpm-${{ hashFiles('autogpt_platform/frontend/pnpm-lock.yaml') }}
${{ runner.os }}-pnpm-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate API client
run: pnpm generate:api
- name: Run Integration Tests
run: pnpm test:unit

View File

@@ -76,7 +76,9 @@ export const AgentsSection = ({
avatarSrc={agent.creator_avatar}
creatorName={agent.creator}
hideAvatar={hideAvatars}
onClick={() => handleCardClick(agent.creator, agent.slug)}
onClick={() =>
handleCardClick(agent.creator, agent.slug)
}
/>
</CarouselItem>
))}

View File

@@ -0,0 +1,15 @@
import { expect, test } from "vitest";
import { render, screen } from "@/tests/integrations/test-utils";
import { MainMarkeplacePage } from "../MainMarketplacePage";
import { server } from "@/mocks/mock-server";
import { getDeleteV2DeleteStoreSubmissionMockHandler422 } from "@/app/api/__generated__/endpoints/store/store.msw";
// Only for CI testing purpose, will remove it in future PR
test("MainMarketplacePage", async () => {
server.use(getDeleteV2DeleteStoreSubmissionMockHandler422());
render(<MainMarkeplacePage />);
expect(
await screen.findByText("Featured agents", { exact: false }),
).toBeDefined();
});

View File

@@ -1,4 +1,4 @@
import type { Meta, StoryObj } from "@storybook/react";
import type { Meta, StoryObj } from "@storybook/nextjs";
import { useState } from "react";
import { FilterChip } from "./FilterChip";
@@ -118,11 +118,7 @@ export const SingleSelect: Story = {
};
function DismissibleDemo() {
const [filters, setFilters] = useState([
"Marketing",
"Sales",
"Development",
]);
const [filters, setFilters] = useState(["Marketing", "Sales", "Development"]);
function handleDismiss(filter: string) {
setFilters((prev) => prev.filter((f) => f !== filter));

View File

@@ -1,4 +1,4 @@
import type { Meta, StoryObj } from "@storybook/react";
import type { Meta, StoryObj } from "@storybook/nextjs";
import { Separator } from "./Separator";
const meta: Meta<typeof Separator> = {

View File

@@ -1,4 +1,4 @@
import type { Meta, StoryObj } from "@storybook/react";
import type { Meta, StoryObj } from "@storybook/nextjs";
import { FadeIn } from "./FadeIn";
const meta: Meta<typeof FadeIn> = {

View File

@@ -92,7 +92,9 @@ export function FadeIn({
},
};
const MotionComponent = motion[as as keyof typeof motion] as typeof motion.div;
const MotionComponent = motion[
as as keyof typeof motion
] as typeof motion.div;
return (
<MotionComponent

View File

@@ -1,4 +1,4 @@
import type { Meta, StoryObj } from "@storybook/react";
import type { Meta, StoryObj } from "@storybook/nextjs";
import { StaggeredList } from "./StaggeredList";
const meta: Meta<typeof StaggeredList> = {
@@ -36,7 +36,9 @@ export const Default: Story = {
args: {
direction: "up",
className: "space-y-4",
children: items.map((item, i) => <DemoCard key={i} title={item} index={i} />),
children: items.map((item, i) => (
<DemoCard key={i} title={item} index={i} />
)),
},
};
@@ -44,7 +46,9 @@ export const FadeDown: Story = {
args: {
direction: "down",
className: "space-y-4",
children: items.map((item, i) => <DemoCard key={i} title={item} index={i} />),
children: items.map((item, i) => (
<DemoCard key={i} title={item} index={i} />
)),
},
};
@@ -52,7 +56,9 @@ export const FadeLeft: Story = {
args: {
direction: "left",
className: "flex gap-4",
children: items.map((item, i) => <DemoCard key={i} title={item} index={i} />),
children: items.map((item, i) => (
<DemoCard key={i} title={item} index={i} />
)),
},
};
@@ -60,7 +66,9 @@ export const FadeRight: Story = {
args: {
direction: "right",
className: "flex gap-4",
children: items.map((item, i) => <DemoCard key={i} title={item} index={i} />),
children: items.map((item, i) => (
<DemoCard key={i} title={item} index={i} />
)),
},
};
@@ -69,7 +77,9 @@ export const FastStagger: Story = {
direction: "up",
staggerDelay: 0.05,
className: "space-y-4",
children: items.map((item, i) => <DemoCard key={i} title={item} index={i} />),
children: items.map((item, i) => (
<DemoCard key={i} title={item} index={i} />
)),
},
};
@@ -78,7 +88,9 @@ export const SlowStagger: Story = {
direction: "up",
staggerDelay: 0.3,
className: "space-y-4",
children: items.map((item, i) => <DemoCard key={i} title={item} index={i} />),
children: items.map((item, i) => (
<DemoCard key={i} title={item} index={i} />
)),
},
};
@@ -87,7 +99,9 @@ export const WithInitialDelay: Story = {
direction: "up",
initialDelay: 0.5,
className: "space-y-4",
children: items.map((item, i) => <DemoCard key={i} title={item} index={i} />),
children: items.map((item, i) => (
<DemoCard key={i} title={item} index={i} />
)),
},
};

View File

@@ -121,7 +121,11 @@ export function StaggeredList({
variants={containerVariants}
>
{children.map((child, index) => (
<motion.div key={index} className={itemClassName} variants={itemVariants}>
<motion.div
key={index}
className={itemClassName}
variants={itemVariants}
>
{child}
</motion.div>
))}