mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
## Changes 🏗️ https://github.com/user-attachments/assets/42e1c896-5f3b-447c-aee9-4f5963c217d9 There is now a 🔔 icon on the Navigation bar that shows previous agent runs and displays real-time agent running status. If you run an agent, the bell will show on a badge how many agents are running. If you hover over it, a hint appears. If you click on it, it opens a dropdown and displays the executions with their status ( _which should match what we have in library functionality, not design-wise_ ). I leveraged the existing APIs for this purpose. Most of the run logic is [encapsulated on this hook](https://github.com/Significant-Gravitas/AutoGPT/compare/dev...feat/agent-notifications?expand=1#diff-a9e7f2904d6283b094aca19b64c7168e8c66be1d5e0bb454be8978cb98526617) and is also an independent `<AgentActivityDropdown />` component. Clicking on an agent run opens that run in the library page. This new functionality is covered by E2E tests 💆🏽 ✔️ ## 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] The navigation bar layout looks good when logged out - [x] The navigation bar layout looks good when logged in - [x] Open an agent in the library and click `Run` - [x] See the real-time activity of the agent running on the navigation bar bell icon ### For configuration changes: _No configuration changes needed._
59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
/**
|
|
* Read environment variables from file.
|
|
* https://github.com/motdotla/dotenv
|
|
*/
|
|
import dotenv from "dotenv";
|
|
import path from "path";
|
|
dotenv.config({ path: path.resolve(__dirname, ".env") });
|
|
dotenv.config({ path: path.resolve(__dirname, "../backend/.env") });
|
|
/**
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
*/
|
|
export default defineConfig({
|
|
testDir: "./src/tests",
|
|
/* Global setup file that runs before all tests */
|
|
globalSetup: "./src/tests/global-setup.ts",
|
|
/* Run tests in files in parallel */
|
|
fullyParallel: true,
|
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
forbidOnly: !!process.env.CI,
|
|
/* Retry on CI only */
|
|
retries: process.env.CI ? 1 : 0,
|
|
/* use more workers on CI. */
|
|
workers: process.env.CI ? 4 : undefined,
|
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
reporter: [["list"], ["html", { open: "never" }]],
|
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
use: {
|
|
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
baseURL: "http://localhost:3000/",
|
|
|
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
screenshot: "only-on-failure",
|
|
bypassCSP: true,
|
|
|
|
/* Helps debugging failures */
|
|
trace: "retain-on-failure",
|
|
video: "retain-on-failure",
|
|
},
|
|
/* Maximum time one test can run for */
|
|
timeout: 25000,
|
|
|
|
/* Configure web server to start automatically */
|
|
webServer: {
|
|
command: "pnpm start",
|
|
url: "http://localhost:3000",
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
|
|
/* Configure projects for major browsers */
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"], channel: "chromium" },
|
|
},
|
|
],
|
|
});
|