Skip to content

Commit 49b51e0

Browse files
Merge branch 'main' into joseph/all-branches
2 parents b5fd5d5 + cdb7eae commit 49b51e0

File tree

26 files changed

+1542
-1239
lines changed

26 files changed

+1542
-1239
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ jobs:
377377
./overwatch-cli \
378378
--auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} \
379379
--organization-slug codecov \
380-
javascript --package-manager yarn --workdir src
380+
typescript --package-manager yarn --eslint-pattern src
381381
382382
storybook:
383383
name: Run storybook

.yarn/releases/yarn-4.7.0.cjs

Lines changed: 0 additions & 935 deletions
This file was deleted.

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 948 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableImmutableInstalls: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.7.0.cjs
7+
yarnPath: .yarn/releases/yarn-4.9.1.cjs

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Gazebo
22

33
[![codecov](https://codecov.io/gh/codecov/gazebo/branch/main/graph/badge.svg?token=UAP786D58M)](https://codecov.io/gh/codecov/gazebo)
4+
[![bundle size](https://codecov.io/github/codecov/gazebo/graph/bundle/gazebo-production-esm/badge.svg)](https://app.codecov.io/github/codecov/gazebo/bundles/main/gazebo-production-esm)
45

56
> We believe that everyone should have access to quality software (like Sentry), that’s why we have always offered Codecov for free to open source maintainers.
67
>

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25.4.1
1+
25.5.1

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"@tanstack/react-virtual": "^3.13.0",
5252
"classnames": "^2.3.1",
5353
"copy-to-clipboard": "^3.3.3",
54+
"cross-spawn": "^7.0.6",
5455
"cva": "npm:class-variance-authority@^0.7.0",
5556
"d3-array": "^3.2.3",
5657
"d3-format": "^3.1.0",
@@ -165,7 +166,7 @@
165166
"tailwindcss": "^3.4.4",
166167
"terser": "^5.34.1",
167168
"typescript": "~5.7.3",
168-
"vite": "^6.0.6",
169+
"vite": "^6.3.2",
169170
"vite-plugin-ejs": "^1.7.0",
170171
"vite-plugin-svgr": "^4.3.0",
171172
"vite-tsconfig-paths": "^5.1.4",
@@ -179,7 +180,7 @@
179180
},
180181
"volta": {
181182
"node": "22.11.0",
182-
"yarn": "4.7.0"
183+
"yarn": "4.9.1"
183184
},
184185
"resolutions": {
185186
"react-refresh": "^0.14.0",
@@ -189,6 +190,6 @@
189190
"path-to-regexp@^1.7.0": "^1.9.0",
190191
"path-to-regexp@^6.2.0": "^6.3.0"
191192
},
192-
"packageManager": "yarn@4.7.0",
193+
"packageManager": "yarn@4.9.1",
193194
"engineStrict": false
194195
}

src/pages/AccountSettings/tabs/OktaAccess/OktaConfigForm/OktaConfigForm.test.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ describe('OktaConfigForm', () => {
121121
const clientSecretInput = await screen.findByLabelText(/Client Secret/)
122122
await userEvent.type(clientSecretInput, 'clientSecret')
123123

124-
const redirectUriInput = await screen.findByLabelText(/Redirect URI/)
125-
await userEvent.type(redirectUriInput, 'http://localhost:3000')
124+
const oktaUrlInput = await screen.findByLabelText(/Okta Base URL/)
125+
await userEvent.type(oktaUrlInput, 'http://localhost:3000')
126126

127127
const clientIdInput = await screen.findByLabelText(/Client ID/)
128128
await userEvent.type(clientIdInput, 'clientId')
@@ -139,8 +139,8 @@ describe('OktaConfigForm', () => {
139139
const clientIdInput = await screen.findByLabelText(/Client ID/)
140140
await userEvent.type(clientIdInput, 'clientId')
141141

142-
const redirectUriInput = await screen.findByLabelText(/Redirect URI/)
143-
await userEvent.type(redirectUriInput, 'http://localhost:3000')
142+
const oktaUrlInput = await screen.findByLabelText(/Okta Base URL/)
143+
await userEvent.type(oktaUrlInput, 'http://localhost:3000')
144144

145145
const clientSecretInput = await screen.findByLabelText(/Client Secret/)
146146
await userEvent.type(clientSecretInput, 'clientSecret')
@@ -179,7 +179,7 @@ describe('OktaConfigForm', () => {
179179
expect(clientSecretInput).toHaveAttribute('type', 'password')
180180
})
181181

182-
it('should display Redirect URI validation error when removing redirect uri value', async () => {
182+
it('should display Okta Base URL validation error when removing okta base url value', async () => {
183183
setup()
184184
render(<OktaConfigForm />, { wrapper })
185185

@@ -189,14 +189,14 @@ describe('OktaConfigForm', () => {
189189
const clientSecretInput = await screen.findByLabelText(/Client Secret/)
190190
await userEvent.type(clientSecretInput, 'clientSecret')
191191

192-
const redirectUriInput = await screen.findByLabelText(/Redirect URI/)
193-
await userEvent.type(redirectUriInput, 'http://localhost:3000')
194-
await userEvent.clear(redirectUriInput)
192+
const oktaUrlInput = await screen.findByLabelText(/Okta Base URL/)
193+
await userEvent.type(oktaUrlInput, 'http://localhost:3000')
194+
await userEvent.clear(oktaUrlInput)
195195

196-
const redirectUriError = await screen.findByText(
197-
/Redirect URI must be a valid URL/
196+
const oktaUrlError = await screen.findByText(
197+
/Okta Base URL must be a valid URL/
198198
)
199-
expect(redirectUriError).toBeInTheDocument()
199+
expect(oktaUrlError).toBeInTheDocument()
200200
})
201201

202202
it('should toggle Okta Sync Enabled on', async () => {
@@ -306,13 +306,13 @@ describe('OktaConfigForm', () => {
306306
})
307307
})
308308

309-
it('renders default values for redirect uri', async () => {
309+
it('renders default values for okta base url', async () => {
310310
setup()
311311
render(<OktaConfigForm />, { wrapper })
312312

313-
const redirectUriInput = await screen.findByLabelText(/Redirect URI/)
313+
const oktaUrlInput = await screen.findByLabelText(/Okta Base URL/)
314314
await waitFor(() => {
315-
expect(redirectUriInput).toHaveValue('https://okta.com')
315+
expect(oktaUrlInput).toHaveValue('https://okta.com')
316316
})
317317
})
318318

@@ -345,15 +345,15 @@ describe('OktaConfigForm', () => {
345345

346346
const clientIdInput = await screen.findByLabelText(/Client ID/)
347347
const clientSecretInput = await screen.findByLabelText(/Client Secret/)
348-
const redirectUriInput = await screen.findByLabelText(/Redirect URI/)
348+
const oktaUrlInput = await screen.findByLabelText(/Okta Base URL/)
349349

350350
await user.clear(clientIdInput)
351351
await user.clear(clientSecretInput)
352-
await user.clear(redirectUriInput)
352+
await user.clear(oktaUrlInput)
353353

354354
await user.type(clientIdInput, 'New client ID')
355355
await user.type(clientSecretInput, 'New client secret')
356-
await user.type(redirectUriInput, 'http://localhost:3000')
356+
await user.type(oktaUrlInput, 'http://localhost:3000')
357357

358358
const saveButton = await screen.findByRole('button', { name: /Save/ })
359359
await user.click(saveButton)
@@ -376,15 +376,15 @@ describe('OktaConfigForm', () => {
376376

377377
const clientIdInput = await screen.findByLabelText(/Client ID/)
378378
const clientSecretInput = await screen.findByLabelText(/Client Secret/)
379-
const redirectUriInput = await screen.findByLabelText(/Redirect URI/)
379+
const oktaUrlInput = await screen.findByLabelText(/Okta Base URL/)
380380

381381
await userEvent.clear(clientIdInput)
382382
await userEvent.clear(clientSecretInput)
383-
await userEvent.clear(redirectUriInput)
383+
await userEvent.clear(oktaUrlInput)
384384

385385
await userEvent.type(clientIdInput, 'New client ID')
386386
await userEvent.type(clientSecretInput, 'New client secret')
387-
await userEvent.type(redirectUriInput, 'http://localhost:3000')
387+
await userEvent.type(oktaUrlInput, 'http://localhost:3000')
388388

389389
const saveButton = await screen.findByRole('button', { name: /Save/ })
390390
await userEvent.click(saveButton)

src/pages/AccountSettings/tabs/OktaAccess/OktaConfigForm/OktaConfigForm.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { OktaConfigQueryOpts } from '../queries/OktaConfigQueryOpts'
2020
const FormSchema = z.object({
2121
clientId: z.string().min(1, 'Client ID is required'),
2222
clientSecret: z.string().min(1, 'Client Secret is required'),
23-
redirectUri: z.string().url('Redirect URI must be a valid URL'),
23+
oktaUrl: z.string().url('Okta Base URL must be a valid URL'),
2424
})
2525

2626
type FormValues = z.infer<typeof FormSchema>
@@ -46,7 +46,7 @@ export function OktaConfigForm() {
4646
defaultValues: {
4747
clientId: oktaConfig?.clientId,
4848
clientSecret: oktaConfig?.clientSecret,
49-
redirectUri: oktaConfig?.url,
49+
oktaUrl: oktaConfig?.url,
5050
},
5151
})
5252

@@ -62,7 +62,7 @@ export function OktaConfigForm() {
6262
{
6363
clientId: data.clientId,
6464
clientSecret: data.clientSecret,
65-
url: data.redirectUri,
65+
url: data.oktaUrl,
6666
},
6767
{
6868
onSettled: () => {
@@ -143,19 +143,19 @@ export function OktaConfigForm() {
143143
) : null}
144144
</div>
145145
<div className="flex flex-col gap-1">
146-
<label htmlFor="redirectUri" className="block font-semibold">
147-
Redirect URI
146+
<label htmlFor="oktaUrl" className="block font-semibold">
147+
Okta Base URL
148148
</label>
149149
<TextInput
150150
defaultValue={oktaConfig?.url}
151-
{...register('redirectUri', { required: true })}
151+
{...register('oktaUrl', { required: true })}
152152
type="text"
153-
id="redirectUri"
154-
placeholder="Enter Redirect URI"
153+
id="oktaUrl"
154+
placeholder="Enter Okta Base URL"
155155
/>
156-
{formState.errors.redirectUri ? (
156+
{formState.errors.oktaUrl ? (
157157
<p className="mt-1 text-ds-primary-red">
158-
{formState.errors.redirectUri.message}
158+
{formState.errors.oktaUrl.message}
159159
</p>
160160
) : null}
161161
</div>

src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/shared/CommitFileDiff/CommitFileDiff.test.tsx

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Suspense } from 'react'
1111
import { MemoryRouter, Route } from 'react-router-dom'
1212
import { type MockInstance } from 'vitest'
1313

14-
import { ImpactedFileType } from 'services/comparison/useComparisonForCommitAndParent'
14+
import { ImpactedFileWithSegmentsUnionType } from 'services/comparison/useComparisonForCommitAndParent'
1515

1616
import CommitFileDiff from './CommitFileDiff'
1717

@@ -75,7 +75,7 @@ class ResizeObserverMock {
7575
}
7676
global.window.ResizeObserver = ResizeObserverMock
7777

78-
const baseMock = (impactedFile: ImpactedFileType | null) => {
78+
const baseMock = (impactedFile: ImpactedFileWithSegmentsUnionType | null) => {
7979
if (!impactedFile) {
8080
return { owner: null }
8181
}
@@ -97,7 +97,7 @@ const baseMock = (impactedFile: ImpactedFileType | null) => {
9797
}
9898
}
9999

100-
const mockImpactedFile = {
100+
const mockImpactedFile: ImpactedFileWithSegmentsUnionType = {
101101
headName: 'flag1/file.js',
102102
hashedPath: 'hashedFilePath',
103103
isNewFile: false,
@@ -114,6 +114,7 @@ const mockImpactedFile = {
114114
},
115115
changeCoverage: 0,
116116
segments: {
117+
__typename: 'SegmentComparisons',
117118
results: [
118119
{
119120
header: '-0,0 +1,45',
@@ -226,7 +227,7 @@ afterAll(() => {
226227
})
227228

228229
interface SetupArgs {
229-
impactedFile?: ImpactedFileType | null
230+
impactedFile?: ImpactedFileWithSegmentsUnionType | null
230231
bundleAnalysisEnabled?: boolean
231232
}
232233

@@ -378,6 +379,46 @@ describe('CommitFileDiff', () => {
378379
})
379380
})
380381

382+
describe('when segments union type returned error', () => {
383+
describe('when provider error', () => {
384+
it('renders a error display message', async () => {
385+
const impactedFileWithProviderError = {
386+
...mockImpactedFile,
387+
segments: {
388+
__typename: 'ProviderError',
389+
message: 'Error fetching data from the provider',
390+
},
391+
} as ImpactedFileWithSegmentsUnionType
392+
setup({ impactedFile: impactedFileWithProviderError })
393+
render(<CommitFileDiff path={'flag1/file.js'} />, { wrapper })
394+
395+
const errorMessage = await screen.findByText(
396+
/There was a problem getting the source code from your provider. Unable to show line by line coverage/i
397+
)
398+
expect(errorMessage).toBeInTheDocument()
399+
})
400+
})
401+
402+
describe('when path error', () => {
403+
it('renders a error display message for path error', async () => {
404+
const impactedFileWithPathError = {
405+
...mockImpactedFile,
406+
segments: {
407+
__typename: 'UnknownPath',
408+
message: 'Unknown path',
409+
},
410+
} as ImpactedFileWithSegmentsUnionType
411+
setup({ impactedFile: impactedFileWithPathError })
412+
render(<CommitFileDiff path={'flag1/file.js'} />, { wrapper })
413+
414+
const errorMessage = await screen.findByText(
415+
/There was a problem getting the source code from your provider by path for/i
416+
)
417+
expect(errorMessage).toBeInTheDocument()
418+
})
419+
})
420+
})
421+
381422
describe('code renderer', () => {
382423
it('renders text area', async () => {
383424
setup({})
@@ -430,7 +471,10 @@ describe('CommitFileDiff', () => {
430471
...mockImpactedFile,
431472

432473
headName: 'flag1/file.js',
433-
segments: { results: [] },
474+
segments: {
475+
__typename: 'SegmentComparisons',
476+
results: [],
477+
} as ImpactedFileWithSegmentsUnionType['segments'],
434478
}
435479

436480
it('does not render information on the code renderer', async () => {

0 commit comments

Comments
 (0)