From 1db910b8a8fbbc07e46efc6d936b36f821c15ed9 Mon Sep 17 00:00:00 2001 From: Mike Roberts Date: Mon, 8 Jul 2024 13:16:26 -0400 Subject: [PATCH] Consolidate status and activity fragments --- .../authenticatedWeb/lambda.ts | 16 ++-- src/app/web/fragments/actionsStatus.ts | 50 +++++++++++++ src/app/web/fragments/gitHubActivity.ts | 74 +++++++++++++++++++ src/app/web/fragments/homeActionsStatus.ts | 21 ------ src/app/web/fragments/homeRecentActivity.ts | 21 ------ src/app/web/fragments/repoActionsStatus.ts | 31 -------- src/app/web/fragments/repoHeading.ts | 2 +- src/app/web/fragments/repoRecentActivity.ts | 31 -------- .../getOptionalRepoCoordinates.ts | 33 +++++++++ .../getOptionalWorkflowCoordinates.ts | 36 +++++++++ .../getRepoCoordinates.ts | 4 +- .../getWorkflowCoordinates.ts | 6 +- src/app/web/fragments/workflowActivity.ts | 25 ------- src/app/web/fragments/workflowHeading.ts | 2 +- src/web/app/index.html | 4 +- src/web/repo/index.html | 2 +- src/web/workflow/index.html | 2 +- .../web/fragments/homeActionsStatus.test.ts | 2 +- .../web/fragments/homeRecentActivity.test.ts | 2 +- test/local/functional/web/viewRepo.test.ts | 2 +- 20 files changed, 212 insertions(+), 154 deletions(-) create mode 100644 src/app/web/fragments/actionsStatus.ts create mode 100644 src/app/web/fragments/gitHubActivity.ts delete mode 100644 src/app/web/fragments/homeActionsStatus.ts delete mode 100644 src/app/web/fragments/homeRecentActivity.ts delete mode 100644 src/app/web/fragments/repoActionsStatus.ts delete mode 100644 src/app/web/fragments/repoRecentActivity.ts create mode 100644 src/app/web/fragments/requestParsing/getOptionalRepoCoordinates.ts create mode 100644 src/app/web/fragments/requestParsing/getOptionalWorkflowCoordinates.ts rename src/app/web/fragments/{requestProcessing => requestParsing}/getRepoCoordinates.ts (90%) rename src/app/web/fragments/{requestProcessing => requestParsing}/getWorkflowCoordinates.ts (83%) delete mode 100644 src/app/web/fragments/workflowActivity.ts diff --git a/src/app/lambdaFunctions/authenticatedWeb/lambda.ts b/src/app/lambdaFunctions/authenticatedWeb/lambda.ts index 19be6ab..f788d16 100644 --- a/src/app/lambdaFunctions/authenticatedWeb/lambda.ts +++ b/src/app/lambdaFunctions/authenticatedWeb/lambda.ts @@ -15,22 +15,16 @@ import { startSetupRoute } from '../../domain/github/setup/startGithubSetup' import { isFailure } from '../../util/structuredResult' import { a, p } from '../../web/hiccough/hiccoughElements' import { repoHeadingRoute } from '../../web/fragments/repoHeading' -import { repoActionsStatusRoute } from '../../web/fragments/repoActionsStatus' -import { repoRecentActivityRoute } from '../../web/fragments/repoRecentActivity' -import { homeActionsStatusRoute } from '../../web/fragments/homeActionsStatus' -import { homeRecentActivityRoute } from '../../web/fragments/homeRecentActivity' +import { actionsStatusRoute } from '../../web/fragments/actionsStatus' +import { gitHubActivityRoute } from '../../web/fragments/gitHubActivity' import { workflowHeadingRoute } from '../../web/fragments/workflowHeading' -import { workflowActivityRoute } from '../../web/fragments/workflowActivity' const router = createRouter([ showHelloRoute, - homeActionsStatusRoute, - homeRecentActivityRoute, repoHeadingRoute, - repoActionsStatusRoute, - repoRecentActivityRoute, - workflowHeadingRoute, - workflowActivityRoute + actionsStatusRoute, + gitHubActivityRoute, + workflowHeadingRoute ]) let appState: AppState diff --git a/src/app/web/fragments/actionsStatus.ts b/src/app/web/fragments/actionsStatus.ts new file mode 100644 index 0000000..a118e16 --- /dev/null +++ b/src/app/web/fragments/actionsStatus.ts @@ -0,0 +1,50 @@ +import { AppState } from '../../environment/AppState' +import { Route } from '../../internalHttpRouter/internalHttpRoute' +import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' +import { isFailure } from '../../util/structuredResult' +import { getRepository } from '../../domain/github/githubRepository' +import { + latestWorkflowRunEventsPerWorkflowForOwners, + latestWorkflowRunEventsPerWorkflowForRepo +} from '../../domain/github/githubLatestWorkflowRunEvents' +import { invalidRequestResponse, notFoundHTMLResponse } from '../htmlResponses' +import { createWorkflowRunEventTableResponse } from './views/activityAndStatusView' +import { getAllAccountIdsForUser } from '../../domain/github/githubMembership' +import { getOptionalRepoCoordinates } from './requestParsing/getOptionalRepoCoordinates' + +export const actionsStatusRoute: Route = { + path: '/app/fragment/actionsStatus', + target: actionsStatus +} + +export async function actionsStatus(appState: AppState, event: CicadaAuthorizedAPIEvent) { + const coordinatesResult = getOptionalRepoCoordinates(event) + + if (isFailure(coordinatesResult)) return coordinatesResult.failureResult + const { ownerId, repoId } = coordinatesResult.result + + if (ownerId && repoId) return await actionsStatusForRepo(appState, ownerId, repoId) + if (!ownerId && !repoId) return actionsStatusForHome(appState, event.userId) + return invalidRequestResponse +} + +async function actionsStatusForRepo(appState: AppState, ownerId: number, repoId: number) { + // TODO eventually - make sure user has permission for this + // TODO eventually - move repo check into domain logic + if (!(await getRepository(appState, ownerId, repoId))) return notFoundHTMLResponse + + return createWorkflowRunEventTableResponse( + 'repoStatus', + appState.clock, + await latestWorkflowRunEventsPerWorkflowForRepo(appState, ownerId, repoId) + ) +} + +async function actionsStatusForHome(appState: AppState, userId: number) { + const accountIds = await getAllAccountIdsForUser(appState, userId) + return createWorkflowRunEventTableResponse( + 'homeStatus', + appState.clock, + await latestWorkflowRunEventsPerWorkflowForOwners(appState, accountIds) + ) +} diff --git a/src/app/web/fragments/gitHubActivity.ts b/src/app/web/fragments/gitHubActivity.ts new file mode 100644 index 0000000..c4a5a87 --- /dev/null +++ b/src/app/web/fragments/gitHubActivity.ts @@ -0,0 +1,74 @@ +import { AppState } from '../../environment/AppState' +import { Route } from '../../internalHttpRouter/internalHttpRoute' +import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' +import { isFailure } from '../../util/structuredResult' +import { getRepository } from '../../domain/github/githubRepository' +import { getRecentActivityForRepo } from '../../domain/github/githubActivity' +import { invalidRequestResponse, notFoundHTMLResponse } from '../htmlResponses' +import { + createGithubActivityResponse, + createGithubPushTableResponse, + createWorkflowRunEventTableResponse +} from './views/activityAndStatusView' +import { getOptionalWorkflowCoordinates } from './requestParsing/getOptionalWorkflowCoordinates' +import { getRunEventsForWorkflow } from '../../domain/github/githubWorkflowRunEvent' +import { recentActiveBranchesForOwners } from '../../domain/github/githubLatestPushesPerRef' +import { getAllAccountIdsForUser } from '../../domain/github/githubMembership' +import { logger } from '../../util/logging' + +export const gitHubActivityRoute: Route = { + path: '/app/fragment/gitHubActivity', + target: gitHubActivity +} + +export async function gitHubActivity(appState: AppState, event: CicadaAuthorizedAPIEvent) { + const coordinatesResult = getOptionalWorkflowCoordinates(event) + + if (isFailure(coordinatesResult)) return coordinatesResult.failureResult + const { ownerId, repoId, workflowId } = coordinatesResult.result + + if (ownerId && repoId) { + return workflowId + ? await githubActivityForWorkflow(appState, ownerId, repoId, workflowId) + : await githubActivityForRepo(appState, ownerId, repoId) + } + if (!ownerId && !repoId) return await githubActivityForHome(appState, event.userId) + return invalidRequestResponse +} + +async function githubActivityForWorkflow( + appState: AppState, + ownerId: number, + repoId: number, + workflowId: number +) { + logger.debug('githubActivityForWorkflow', { ownerId, repoId, workflowId }) + // TODO eventually - make sure user has permission for this + return createWorkflowRunEventTableResponse( + 'workflowActivity', + appState.clock, + await getRunEventsForWorkflow(appState, ownerId, repoId, workflowId) + ) +} + +async function githubActivityForRepo(appState: AppState, ownerId: number, repoId: number) { + logger.debug('githubActivityForRepo') + if (!(await getRepository(appState, ownerId, repoId))) return notFoundHTMLResponse + + // TODO eventually - make sure user has permission for this + // TODO eventually - move repo check into domain logic + return createGithubActivityResponse( + 'repoActivity', + appState.clock, + await getRecentActivityForRepo(appState, ownerId, repoId) + ) +} + +async function githubActivityForHome(appState: AppState, userId: number) { + logger.debug('githubActivityForHome') + return createGithubPushTableResponse( + 'homeActivity', + appState.clock, + await recentActiveBranchesForOwners(appState, await getAllAccountIdsForUser(appState, userId)) + ) +} diff --git a/src/app/web/fragments/homeActionsStatus.ts b/src/app/web/fragments/homeActionsStatus.ts deleted file mode 100644 index 6d8c545..0000000 --- a/src/app/web/fragments/homeActionsStatus.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { AppState } from '../../environment/AppState' -import { Route } from '../../internalHttpRouter/internalHttpRoute' -import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' -import { latestWorkflowRunEventsPerWorkflowForOwners } from '../../domain/github/githubLatestWorkflowRunEvents' -import { getAllAccountIdsForUser } from '../../domain/github/githubMembership' - -import { createWorkflowRunEventTableResponse } from './views/activityAndStatusView' - -export const homeActionsStatusRoute: Route = { - path: '/app/fragment/homeActionsStatus', - target: homeActionsStatus -} - -export async function homeActionsStatus(appState: AppState, event: CicadaAuthorizedAPIEvent) { - const { userId } = event - - const accountIds = await getAllAccountIdsForUser(appState, userId), - workflowStatus = await latestWorkflowRunEventsPerWorkflowForOwners(appState, accountIds) - - return createWorkflowRunEventTableResponse('homeStatus', appState.clock, workflowStatus) -} diff --git a/src/app/web/fragments/homeRecentActivity.ts b/src/app/web/fragments/homeRecentActivity.ts deleted file mode 100644 index 08f8f4f..0000000 --- a/src/app/web/fragments/homeRecentActivity.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { AppState } from '../../environment/AppState' -import { Route } from '../../internalHttpRouter/internalHttpRoute' -import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' -import { getAllAccountIdsForUser } from '../../domain/github/githubMembership' -import { recentActiveBranchesForOwners } from '../../domain/github/githubLatestPushesPerRef' -import { createGithubPushTableResponse } from './views/activityAndStatusView' - -export const homeRecentActivityRoute: Route = { - path: '/app/fragment/homeRecentActivity', - target: homeRecentActivity -} - -export async function homeRecentActivity(appState: AppState, event: CicadaAuthorizedAPIEvent) { - const { userId } = event - - return createGithubPushTableResponse( - 'homeActivity', - appState.clock, - await recentActiveBranchesForOwners(appState, await getAllAccountIdsForUser(appState, userId)) - ) -} diff --git a/src/app/web/fragments/repoActionsStatus.ts b/src/app/web/fragments/repoActionsStatus.ts deleted file mode 100644 index debe643..0000000 --- a/src/app/web/fragments/repoActionsStatus.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AppState } from '../../environment/AppState' -import { Route } from '../../internalHttpRouter/internalHttpRoute' -import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' -import { isFailure } from '../../util/structuredResult' -import { getRepository } from '../../domain/github/githubRepository' -import { latestWorkflowRunEventsPerWorkflowForRepo } from '../../domain/github/githubLatestWorkflowRunEvents' -import { notFoundHTMLResponse } from '../htmlResponses' -import { getRepoCoordinates } from './requestProcessing/getRepoCoordinates' -import { createWorkflowRunEventTableResponse } from './views/activityAndStatusView' - -export const repoActionsStatusRoute: Route = { - path: '/app/fragment/actionsStatus', - target: repoActionsStatus -} - -export async function repoActionsStatus(appState: AppState, event: CicadaAuthorizedAPIEvent) { - const repoCoordinatesResult = getRepoCoordinates(event) - - if (isFailure(repoCoordinatesResult)) return repoCoordinatesResult.failureResult - const { ownerId, repoId } = repoCoordinatesResult.result - - if (!(await getRepository(appState, ownerId, repoId))) return notFoundHTMLResponse - - // TODO eventually - make sure user has permission for this - // TODO eventually - move repo check into domain logic - return createWorkflowRunEventTableResponse( - 'repoStatus', - appState.clock, - await latestWorkflowRunEventsPerWorkflowForRepo(appState, ownerId, repoId) - ) -} diff --git a/src/app/web/fragments/repoHeading.ts b/src/app/web/fragments/repoHeading.ts index 5ac0f63..0cf805c 100644 --- a/src/app/web/fragments/repoHeading.ts +++ b/src/app/web/fragments/repoHeading.ts @@ -5,7 +5,7 @@ import { isFailure } from '../../util/structuredResult' import { getRepository } from '../../domain/github/githubRepository' import { createRepoHeadingResponse } from './views/repoHeadingView' import { notFoundHTMLResponse } from '../htmlResponses' -import { getRepoCoordinates } from './requestProcessing/getRepoCoordinates' +import { getRepoCoordinates } from './requestParsing/getRepoCoordinates' export const repoHeadingRoute: Route = { path: '/app/fragment/repo/heading', diff --git a/src/app/web/fragments/repoRecentActivity.ts b/src/app/web/fragments/repoRecentActivity.ts deleted file mode 100644 index cb71ab7..0000000 --- a/src/app/web/fragments/repoRecentActivity.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AppState } from '../../environment/AppState' -import { Route } from '../../internalHttpRouter/internalHttpRoute' -import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' -import { isFailure } from '../../util/structuredResult' -import { getRepository } from '../../domain/github/githubRepository' -import { getRecentActivityForRepo } from '../../domain/github/githubActivity' -import { getRepoCoordinates } from './requestProcessing/getRepoCoordinates' -import { notFoundHTMLResponse } from '../htmlResponses' -import { createGithubActivityResponse } from './views/activityAndStatusView' - -export const repoRecentActivityRoute: Route = { - path: '/app/fragment/recentActivity', - target: repoRecentActivity -} - -export async function repoRecentActivity(appState: AppState, event: CicadaAuthorizedAPIEvent) { - const repoCoordinatesResult = getRepoCoordinates(event) - - if (isFailure(repoCoordinatesResult)) return repoCoordinatesResult.failureResult - const { ownerId, repoId } = repoCoordinatesResult.result - - if (!(await getRepository(appState, ownerId, repoId))) return notFoundHTMLResponse - - // TODO eventually - make sure user has permission for this - // TODO eventually - move repo check into domain logic - return createGithubActivityResponse( - 'repoActivity', - appState.clock, - await getRecentActivityForRepo(appState, ownerId, repoId) - ) -} diff --git a/src/app/web/fragments/requestParsing/getOptionalRepoCoordinates.ts b/src/app/web/fragments/requestParsing/getOptionalRepoCoordinates.ts new file mode 100644 index 0000000..a57a915 --- /dev/null +++ b/src/app/web/fragments/requestParsing/getOptionalRepoCoordinates.ts @@ -0,0 +1,33 @@ +import { CicadaAuthorizedAPIEvent } from '../../../inboundInterfaces/lambdaTypes' +import { failedWithResult, isFailure, Result, successWith } from '../../../util/structuredResult' +import { APIGatewayProxyResult } from 'aws-lambda/trigger/api-gateway-proxy' +import { logger } from '../../../util/logging' +import { invalidRequestResponse } from '../../htmlResponses' +import { validatingQueryStringParser } from '../../../schema/urlPathParser' +import { JTDSchemaType } from 'ajv/dist/jtd' +import { RepoCoordinatesQueryStringParameters, repoCoordinatesSchema } from './getRepoCoordinates' + +export function getOptionalRepoCoordinates( + event: CicadaAuthorizedAPIEvent +): Result<{ ownerId?: number; repoId?: number }, APIGatewayProxyResult> { + const parseResult = parser(event.queryStringParameters ?? {}) + if (isFailure(parseResult)) { + logger.warn('Invalid request in getOptionalRepoCoordinates', { reason: parseResult.reason }) + return failedWithResult('Failed to parse', invalidRequestResponse) + } + + // TODO - can we just define the schema with ints? + const { ownerId, repoId } = parseResult.result + return successWith({ + ...(ownerId ? { ownerId: parseInt(ownerId) } : {}), + ...(repoId ? { repoId: parseInt(repoId) } : {}) + }) +} + +export type OptionalRepoCoordinatesQueryStringParameters = Partial + +export const optionalRepoCoordinatesSchema: JTDSchemaType = { + optionalProperties: repoCoordinatesSchema.properties +} + +const parser = validatingQueryStringParser(optionalRepoCoordinatesSchema) diff --git a/src/app/web/fragments/requestParsing/getOptionalWorkflowCoordinates.ts b/src/app/web/fragments/requestParsing/getOptionalWorkflowCoordinates.ts new file mode 100644 index 0000000..534899a --- /dev/null +++ b/src/app/web/fragments/requestParsing/getOptionalWorkflowCoordinates.ts @@ -0,0 +1,36 @@ +import { CicadaAuthorizedAPIEvent } from '../../../inboundInterfaces/lambdaTypes' +import { JTDSchemaType } from 'ajv/dist/jtd' +import { validatingQueryStringParser } from '../../../schema/urlPathParser' +import { failedWithResult, isFailure, Result, successWith } from '../../../util/structuredResult' +import { logger } from '../../../util/logging' +import { APIGatewayProxyResult } from 'aws-lambda/trigger/api-gateway-proxy' +import { invalidRequestResponse } from '../../htmlResponses' +import { WorkflowCoordinatesQueryStringParameters, workflowCoordinatesSchema } from './getWorkflowCoordinates' + +export function getOptionalWorkflowCoordinates( + event: CicadaAuthorizedAPIEvent +): Result<{ ownerId?: number; repoId?: number; workflowId?: number }, APIGatewayProxyResult> { + const parseResult = parser(event.queryStringParameters ?? {}) + if (isFailure(parseResult)) { + logger.warn('Invalid request in getOptionalWorkflowCoordinates', { reason: parseResult.reason }) + return failedWithResult('Failed to parse', invalidRequestResponse) + } + + // TODO - can we just define the schema with ints? + const { ownerId, repoId, workflowId } = parseResult.result + return successWith({ + ...(ownerId ? { ownerId: parseInt(ownerId) } : {}), + ...(repoId ? { repoId: parseInt(repoId) } : {}), + ...(workflowId ? { workflowId: parseInt(workflowId) } : {}) + }) +} + +export type OptionalWorkflowCoordinatesQueryStringParameters = + Partial + +export const optionalWorkflowCoordinatesSchema: JTDSchemaType = + { + optionalProperties: workflowCoordinatesSchema.properties + } + +const parser = validatingQueryStringParser(optionalWorkflowCoordinatesSchema) diff --git a/src/app/web/fragments/requestProcessing/getRepoCoordinates.ts b/src/app/web/fragments/requestParsing/getRepoCoordinates.ts similarity index 90% rename from src/app/web/fragments/requestProcessing/getRepoCoordinates.ts rename to src/app/web/fragments/requestParsing/getRepoCoordinates.ts index c2d7fa9..f579779 100644 --- a/src/app/web/fragments/requestProcessing/getRepoCoordinates.ts +++ b/src/app/web/fragments/requestParsing/getRepoCoordinates.ts @@ -9,7 +9,7 @@ import { invalidRequestResponse } from '../../htmlResponses' export function getRepoCoordinates( event: CicadaAuthorizedAPIEvent ): Result<{ ownerId: number; repoId: number }, APIGatewayProxyResult> { - const parseResult = qsParser(event.queryStringParameters) + const parseResult = parser(event.queryStringParameters) if (isFailure(parseResult)) { logger.warn('Invalid request in getRepoCoordinates', { reason: parseResult.reason }) return failedWithResult('Failed to parse', invalidRequestResponse) @@ -32,4 +32,4 @@ export const repoCoordinatesSchema: JTDSchemaType = { +export const workflowCoordinatesSchema: JTDSchemaType = { properties: { ...repoCoordinatesSchema.properties, workflowId: { type: 'string' } } } -const qsParser = validatingQueryStringParser(schema) +const qsParser = validatingQueryStringParser(workflowCoordinatesSchema) diff --git a/src/app/web/fragments/workflowActivity.ts b/src/app/web/fragments/workflowActivity.ts deleted file mode 100644 index 7277cd8..0000000 --- a/src/app/web/fragments/workflowActivity.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { AppState } from '../../environment/AppState' -import { Route } from '../../internalHttpRouter/internalHttpRoute' -import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' -import { isFailure } from '../../util/structuredResult' -import { getWorkflowCoordinates } from './requestProcessing/getWorkflowCoordinates' -import { getRunEventsForWorkflow } from '../../domain/github/githubWorkflowRunEvent' - -import { createWorkflowRunEventTableResponse } from './views/activityAndStatusView' - -export const workflowActivityRoute: Route = { - path: '/app/fragment/workflow/activity', - target: workflowActivity -} - -export async function workflowActivity(appState: AppState, event: CicadaAuthorizedAPIEvent) { - const workflowCoordinatesResult = getWorkflowCoordinates(event) - - if (isFailure(workflowCoordinatesResult)) return workflowCoordinatesResult.failureResult - const { ownerId, repoId, workflowId } = workflowCoordinatesResult.result - - const runEvents = await getRunEventsForWorkflow(appState, ownerId, repoId, workflowId) - - // TODO eventually - make sure user has permission for this - return createWorkflowRunEventTableResponse('workflowActivity', appState.clock, runEvents) -} diff --git a/src/app/web/fragments/workflowHeading.ts b/src/app/web/fragments/workflowHeading.ts index 986acbb..e892cbe 100644 --- a/src/app/web/fragments/workflowHeading.ts +++ b/src/app/web/fragments/workflowHeading.ts @@ -2,7 +2,7 @@ import { AppState } from '../../environment/AppState' import { Route } from '../../internalHttpRouter/internalHttpRoute' import { CicadaAuthorizedAPIEvent } from '../../inboundInterfaces/lambdaTypes' import { isFailure } from '../../util/structuredResult' -import { getWorkflowCoordinates } from './requestProcessing/getWorkflowCoordinates' +import { getWorkflowCoordinates } from './requestParsing/getWorkflowCoordinates' import { createWorkflowHeadingResponse } from './views/workflowHeadingView' import { getRunEventsForWorkflowPage } from '../../domain/github/githubWorkflowRunEvent' diff --git a/src/web/app/index.html b/src/web/app/index.html index 33cc71c..e890035 100644 --- a/src/web/app/index.html +++ b/src/web/app/index.html @@ -15,12 +15,12 @@

Cicada

GitHub Actions Status

-
Loading GitHub Actions Status...

Recent Branch Activity

-
Loading Recent Activity...
diff --git a/src/web/repo/index.html b/src/web/repo/index.html index 013ac58..8747726 100644 --- a/src/web/repo/index.html +++ b/src/web/repo/index.html @@ -32,7 +32,7 @@

GitHub Actions Status

hx-swap='outerHTML'>Loading GitHub Actions Status...

Recent Activity

-
Loading Recent Activity... diff --git a/src/web/workflow/index.html b/src/web/workflow/index.html index fa9be4e..5f67fa3 100644 --- a/src/web/workflow/index.html +++ b/src/web/workflow/index.html @@ -29,7 +29,7 @@

Cicada

hx-vals='js:{ ...workflowKey }' hx-swap='outerHTML'>Finding workflow details...
-
Loading activity... diff --git a/test/local/functional/web/fragments/homeActionsStatus.test.ts b/test/local/functional/web/fragments/homeActionsStatus.test.ts index 75e7212..322b54d 100644 --- a/test/local/functional/web/fragments/homeActionsStatus.test.ts +++ b/test/local/functional/web/fragments/homeActionsStatus.test.ts @@ -62,7 +62,7 @@ test('home-actions-status', async () => { const latestActivity = await handleWebRequest( appState, createStubApiGatewayProxyEventWithToken('validUserToken', { - path: '/app/fragment/homeActionsStatus' + path: '/app/fragment/actionsStatus' }) ) diff --git a/test/local/functional/web/fragments/homeRecentActivity.test.ts b/test/local/functional/web/fragments/homeRecentActivity.test.ts index 2c13354..c60f941 100644 --- a/test/local/functional/web/fragments/homeRecentActivity.test.ts +++ b/test/local/functional/web/fragments/homeRecentActivity.test.ts @@ -63,7 +63,7 @@ test('home-recent-activity', async () => { const recentActivity = await handleWebRequest( appState, createStubApiGatewayProxyEventWithToken('validUserToken', { - path: '/app/fragment/homeRecentActivity' + path: '/app/fragment/gitHubActivity' }) ) diff --git a/test/local/functional/web/viewRepo.test.ts b/test/local/functional/web/viewRepo.test.ts index 4cc647d..e1fffe3 100644 --- a/test/local/functional/web/viewRepo.test.ts +++ b/test/local/functional/web/viewRepo.test.ts @@ -147,7 +147,7 @@ test('view-repo-recent-activity', async () => { const viewRepoResponse = await handleWebRequest( appState, createStubApiGatewayProxyEventWithToken('validUserToken', { - path: '/app/fragment/recentActivity', + path: '/app/fragment/gitHubActivity', queryStringParameters: { ownerId: '162483619', repoId: '768206479' } }) )