diff --git a/agenta-web/cypress/e2e/eval.evaluations.cy.ts b/agenta-web/cypress/e2e/eval.evaluations.cy.ts index 2324923abb..fee60cf455 100644 --- a/agenta-web/cypress/e2e/eval.evaluations.cy.ts +++ b/agenta-web/cypress/e2e/eval.evaluations.cy.ts @@ -50,6 +50,8 @@ describe("Evaluations CRUD Operations Test", function () { cy.get(".ant-table-row").eq(0).click() cy.wait(1000) cy.contains(/create a new test set/i).should("be.visible") + cy.get(".ag-root").should("exist") + cy.wait(3000) cy.get('[data-cy="testset-header-column-edit-button"]').eq(1).click() cy.get('[data-cy="testset-header-column-edit-input"]').clear() cy.get('[data-cy="testset-header-column-edit-input"]').type("answer") diff --git a/agenta-web/cypress/support/commands/evaluations.ts b/agenta-web/cypress/support/commands/evaluations.ts index c01d83092b..57004db6d5 100644 --- a/agenta-web/cypress/support/commands/evaluations.ts +++ b/agenta-web/cypress/support/commands/evaluations.ts @@ -104,7 +104,6 @@ Cypress.Commands.add("createNewEvaluation", (evaluatorName = "Exact Match") => { cy.get('[data-cy="evaluation-testset-table"]').find('input[type="radio"]').eq(0).check() - cy.get('[data-cy="evaluation-variant-collapse-header"]').click() cy.get('[data-cy="evaluation-variant-table"]').find('input[type="checkbox"]').eq(0).check() cy.get('[data-cy="evaluation-evaluator-collapse-header"]').click() diff --git a/agenta-web/src/components/Layout/Layout.tsx b/agenta-web/src/components/Layout/Layout.tsx index 8b471ce51e..84e34c144e 100644 --- a/agenta-web/src/components/Layout/Layout.tsx +++ b/agenta-web/src/components/Layout/Layout.tsx @@ -119,7 +119,7 @@ type LayoutProps = { const App: React.FC = ({children}) => { const {user} = useProfileData() const {appTheme} = useAppTheme() - const {currentApp} = useAppsData() + const {currentApp, isLoading, error} = useAppsData() const [footerRef, {height: footerHeight}] = useElementSize() const {project, projects} = useProjectData() const classes = useStyles({themeMode: appTheme, footerHeight} as StyleProps) @@ -207,7 +207,7 @@ const App: React.FC = ({children}) => { // wait unitl we have the app id, if its an app route if (isAppRoute && !appId) return null - if (appId && !currentApp) + if (appId && !currentApp && !isLoading && !error) return (
404 - Page Not Found diff --git a/agenta-web/src/contexts/app.context.tsx b/agenta-web/src/contexts/app.context.tsx index e0e6768dc7..accdb4ff11 100644 --- a/agenta-web/src/contexts/app.context.tsx +++ b/agenta-web/src/contexts/app.context.tsx @@ -70,6 +70,7 @@ export const getAppValues = () => appContextValues const AppContextProvider: React.FC = ({children}) => { const {data: apps, error, isLoading, mutate} = useApps() + const {isLoading: isProjectLoading} = useProjectData() const router = useRouter() const appId = router.query?.app_id as string const [recentlyVisitedAppId, setRecentlyVisitedAppId] = useLocalStorage( @@ -115,7 +116,7 @@ const AppContextProvider: React.FC = ({children}) => { currentApp, apps, error, - isLoading, + isLoading: isLoading || isProjectLoading, mutate, modalInstance, setModalInstance,