Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebroberts committed Sep 11, 2024
1 parent 245633e commit e7bc939
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/local/functional/domain/github/webPush/webPushEvents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from '../../../../../examples/cicada/githubDomainObjects'
import {
GITHUB_ACCOUNT_MEMBERSHIP,
GITHUB_LATEST_WORKFLOW_RUN_EVENT,
WEB_PUSH_SUBSCRIPTION
} from '../../../../../../src/app/domain/entityStore/entityTypes'
import { processEventBridgeWebPushEvent } from '../../../../../../src/app/domain/webPush/webPushEventBridgeEventProcessor'
Expand Down Expand Up @@ -35,6 +36,50 @@ test('newWorkflowRunEvent', async () => {
}
]
)
appState.dynamoDB.stubAllPagesQueries.addResponse(
{
TableName: 'fakeGithubAccountMemberships',
KeyConditionExpression: 'GSI1PK = :pk',
IndexName: 'GSI1',
ExpressionAttributeValues: { ':pk': 'USER#162360409' }
},
[
{
$metadata: {},
Items: [{ ...testTestUserMembershipOfOrg, _et: GITHUB_ACCOUNT_MEMBERSHIP }]
}
]
)
appState.dynamoDB.stubAllPagesQueries.addResponse(
{
TableName: 'fakeGithubAccountMemberships',
KeyConditionExpression: 'GSI1PK = :pk',
IndexName: 'GSI1',
ExpressionAttributeValues: { ':pk': 'USER#49635' }
},
[
{
$metadata: {},
Items: [{ ...testMikeRobertsUserMembershipOfOrg, _et: GITHUB_ACCOUNT_MEMBERSHIP }]
}
]
)

appState.dynamoDB.stubAllPagesQueries.addResponse(
{
TableName: 'fakeGithubLatestWorkflowRunsTable',
KeyConditionExpression: 'GSI1PK = :pk',
IndexName: 'GSI1',
ExpressionAttributeValues: { ':pk': 'ACCOUNT#162483619' },
ScanIndexForward: false
},
[
{
$metadata: {},
Items: [{ ...testOrgTestRepoOneWorkflowRunThree, _et: GITHUB_LATEST_WORKFLOW_RUN_EVENT }]
}
]
)

appState.dynamoDB.stubAllPagesQueries.addResponse(
{
Expand Down

0 comments on commit e7bc939

Please sign in to comment.