Skip to content

Commit

Permalink
Add retro naming test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch committed Jul 8, 2024
1 parent f291efa commit 0fb3d7e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
42 changes: 42 additions & 0 deletions packages/server/__tests__/startRetrospective.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,48 @@ test('Retro is named Retro #1 by default', async () => {
})
})

test('Single Retro can be named', async () => {
await getRethink()
const {userId, authToken} = await signUp()
const {id: teamId} = (await getUserTeams(userId))[0]

const name = 'My Retro'
const newRetro = await sendPublic({
query: `
mutation StartRetrospectiveMutation($teamId: ID!, $name: String, $rrule: RRule, $gcalInput: CreateGcalEventInput) {
startRetrospective(teamId: $teamId, name: $name, rrule: $rrule, gcalInput: $gcalInput) {
... on ErrorPayload {
error {
message
}
}
... on StartRetrospectiveSuccess {
meeting {
id
name
}
}
}
}
`,
variables: {
teamId,
name
},
authToken
})
expect(newRetro).toMatchObject({
data: {
startRetrospective: {
meeting: {
id: expect.anything(),
name
}
}
}
})
})

test('Recurring retro is named like RetroSeries Jan 1', async () => {
await getRethink()
const {userId, authToken} = await signUp()
Expand Down
4 changes: 1 addition & 3 deletions packages/server/graphql/public/types/CreateGcalEventInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@ const CreateGcalEventInput = new GraphQLInputObjectType({
})
})

type GcalVideoTypeEnum = 'meet' | 'zoom'

export type CreateGcalEventInputType = {
startTimestamp: number
endTimestamp: number
timeZone: string
videoType?: GcalVideoTypeEnum
videoType?: 'meet' | 'zoom'
invitees?: string[]
}

Expand Down

0 comments on commit 0fb3d7e

Please sign in to comment.