Skip to content

Commit d3ddca2

Browse files
committed
fixed test
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
1 parent 1602155 commit d3ddca2

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

frontend/src/routes/Applications/CreateApplication/CreateApplicationArgoPullModel.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,15 @@ describe('Create Argo Application Set', () => {
423423
await clickByText(channelGit.spec.pathname)
424424
await waitForNocks(appBranchNocks)
425425

426-
await clickByPlaceholderText('Enter or select a tracking revision')
427426
const pathNocks = [
428427
nockArgoGitBranches(channelGit.spec.pathname, { branchList: [{ name: 'branch-01' }] }),
429428
nockArgoGitPathSha(channelGit.spec.pathname, 'branch-01', { commit: { sha: '01' } }),
430429
nockArgoGitPathTree(channelGit.spec.pathname, { tree: [{ path: 'application-test', type: 'tree' }] }),
431430
]
432431

433-
await clickByText('branch-01')
432+
await clickByPlaceholderText('Enter or select a tracking revision')
434433
await waitForNocks(pathNocks)
434+
await clickByText('branch-01')
435435

436436
await clickByPlaceholderText('Enter or select a repository path')
437437
await clickByText('application-test')

frontend/src/wizards/Argo/ArgoWizard.test.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ describe('ArgoWizard tests', () => {
168168
}),
169169
'testapp'
170170
)
171-
userEvent.click(screen.getByText(/select the argo server/i))
171+
userEvent.click(screen.getByPlaceholderText(/select the argo server/i))
172172
userEvent.click(
173173
screen.getByRole('option', {
174174
name: /http:\/\/argoserver\.com/i,
@@ -318,7 +318,7 @@ describe('ArgoWizard tests', () => {
318318
}),
319319
'testapp'
320320
)
321-
userEvent.click(screen.getByText(/select the argo server/i))
321+
userEvent.click(screen.getByPlaceholderText(/select the argo server/i))
322322
userEvent.click(
323323
screen.getByRole('option', {
324324
name: /http:\/\/argoserver\.com/i,
@@ -334,11 +334,10 @@ describe('ArgoWizard tests', () => {
334334
// template page
335335
//=====================================================================
336336
userEvent.click(screen.getByText(/use a helm repository/i))
337-
userEvent.click(screen.getByText(/enter or select a helm url/i))
338-
userEvent.type(screen.getByRole('searchbox'), 'https://github.com/fxiang1/app-samples')
337+
userEvent.type(screen.getByPlaceholderText(/enter or select a helm url/i), 'https://github.com/fxiang1/app-samples')
339338
userEvent.click(
340339
screen.getByRole('option', {
341-
name: /create "https:\/\/github\.com\/fxiang1\/app-samples"/i,
340+
name: /create new option https:\/\/github\.com\/fxiang1\/app-samples/i,
342341
})
343342
)
344343
userEvent.type(
@@ -366,7 +365,7 @@ describe('ArgoWizard tests', () => {
366365
userEvent.click(screen.getByText(/existing placement/i))
367366
userEvent.click(
368367
screen.getByRole('button', {
369-
name: /options menu/i,
368+
name: /menu toggle/i,
370369
})
371370
)
372371
userEvent.click(

0 commit comments

Comments
 (0)