test Argos CI#8458
Conversation
WalkthroughAdds 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎ Awaiting the start of a new Argos build… |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/app/tests/e2e/branches/branch-selector.spec.ts`:
- Line 10: There's a typo in the test selector: replace the incorrect
data-testid string "create-branch-buttonn" with the correct
"create-branch-button" so the E2E assertion finds the element; update the usage
in the test file branch-selector.spec.ts (and the two other mentioned tests)
where page.getByTestId("create-branch-buttonn") is called to
page.getByTestId("create-branch-button") to match the component's data-testid
defined in branch-selector.tsx.
In
`@frontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-1_object-create-update-diff-and-merge.spec.ts`:
- Line 44: The failing selector is a typo: change the test's call to
page.getByTestId("create-branch-buttonn") in the test that creates branch
`cr1234` back to the correct test id page.getByTestId("create-branch-button") so
the "2. Create a new branch" step actually clicks the branch-creation control
and allows subsequent serial tests to run; locate the statement in the spec
(search for getByTestId("create-branch-buttonn") or the test name "Create a new
branch") and correct the test id string.
In
`@frontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-4_integration-with-git.spec.ts`:
- Line 22: The test fails because the test-id string used in
tutorials/tutorial-4_integration-with-git.spec.ts is misspelled as
"create-branch-buttonn", causing
page.getByTestId("create-branch-buttonn").click() to time out; change the test
to use the correct test id "create-branch-button" (replace the string in
page.getByTestId call) so the branch-creation click targets the real element and
subsequent steps run.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
frontend/app/tests/e2e/branches/branch-selector.spec.tsfrontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-1_object-create-update-diff-and-merge.spec.tsfrontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-4_integration-with-git.spec.ts
| await page.goto("/"); | ||
| await page.getByTestId("branch-selector-trigger").click(); | ||
| await expect(page.getByTestId("create-branch-button")).toBeDisabled(); | ||
| await expect(page.getByTestId("create-branch-buttonn")).toBeDisabled(); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find the actual data-testid value for the create-branch button
rg -n 'data-testid=.*create-branch-button' --type=tsx --type=ts --type=jsx --type=jsRepository: opsmill/infrahub
Length of output: 87
🏁 Script executed:
#!/bin/bash
# Search for references to create-branch-button test-id in test files
rg -n 'create-branch-button' frontend/app/tests/ --type=ts --type=tsxRepository: opsmill/infrahub
Length of output: 87
🏁 Script executed:
#!/bin/bash
# Find the button component definition and its data-testid
rg -n 'create-branch' frontend/ --type=tsx --type=ts -B2 -A2 | head -100Repository: opsmill/infrahub
Length of output: 87
🏁 Script executed:
#!/bin/bash
# Find all data-testid attributes containing "create-branch"
rg -n 'data-testid.*create-branch' frontend/ --type-listRepository: opsmill/infrahub
Length of output: 449
🏁 Script executed:
#!/bin/bash
# Search for create-branch test-ids in frontend files
rg -n 'create-branch-button' frontend/ -g '*.tsx' -g '*.ts' -g '*.jsx' -g '*.js'Repository: opsmill/infrahub
Length of output: 837
🏁 Script executed:
#!/bin/bash
# Search for the typo version to see if it appears elsewhere
rg -n 'create-branch-buttonn' .Repository: opsmill/infrahub
Length of output: 537
🏁 Script executed:
#!/bin/bash
# List TypeScript/JSX files in frontend directory to understand structure
find frontend -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" \) | grep -E "(branch|button)" | head -20Repository: opsmill/infrahub
Length of output: 1328
Fix typo in test-id: "create-branch-buttonn" → "create-branch-button"
The test-id "create-branch-buttonn" (double n) does not match the component's actual data-testid value. The component at frontend/app/src/entities/branches/ui/branch-selector.tsx:210 defines data-testid="create-branch-button". This typo will cause the test assertion to fail when the element is not found.
Note: This same typo also appears in frontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-4_integration-with-git.spec.ts:22 and frontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-1_object-create-update-diff-and-merge.spec.ts:44.
Proposed fix
- await expect(page.getByTestId("create-branch-buttonn")).toBeDisabled();
+ await expect(page.getByTestId("create-branch-button")).toBeDisabled();📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await expect(page.getByTestId("create-branch-buttonn")).toBeDisabled(); | |
| await expect(page.getByTestId("create-branch-button")).toBeDisabled(); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@frontend/app/tests/e2e/branches/branch-selector.spec.ts` at line 10, There's
a typo in the test selector: replace the incorrect data-testid string
"create-branch-buttonn" with the correct "create-branch-button" so the E2E
assertion finds the element; update the usage in the test file
branch-selector.spec.ts (and the two other mentioned tests) where
page.getByTestId("create-branch-buttonn") is called to
page.getByTestId("create-branch-button") to match the component's data-testid
defined in branch-selector.tsx.
| await page.goto("/"); | ||
| await page.getByTestId("branch-selector-trigger").click(); | ||
| await page.getByTestId("create-branch-button").click(); | ||
| await page.getByTestId("create-branch-buttonn").click(); |
There was a problem hiding this comment.
Revert typo "create-branch-buttonn" — cascades to fail tests 3–5 in this serial suite
Because this suite uses test.describe.configure({ mode: "serial" }), the broken selector at test "2. Create a new branch" prevents branch cr1234 from being created, causing tests 3, 4, and 5 (which all depend on that branch) to also fail.
🐛 Proposed fix
- await page.getByTestId("create-branch-buttonn").click();
+ await page.getByTestId("create-branch-button").click();📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await page.getByTestId("create-branch-buttonn").click(); | |
| await page.getByTestId("create-branch-button").click(); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@frontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-1_object-create-update-diff-and-merge.spec.ts`
at line 44, The failing selector is a typo: change the test's call to
page.getByTestId("create-branch-buttonn") in the test that creates branch
`cr1234` back to the correct test id page.getByTestId("create-branch-button") so
the "2. Create a new branch" step actually clicks the branch-creation control
and allows subsequent serial tests to run; locate the statement in the spec
(search for getByTestId("create-branch-buttonn") or the test name "Create a new
branch") and correct the test id string.
| await test.step(" Create a new branch update-ethernet1", async () => { | ||
| await page.getByTestId("branch-selector-trigger").click(); | ||
| await page.getByTestId("create-branch-button").click(); | ||
| await page.getByTestId("create-branch-buttonn").click(); |
There was a problem hiding this comment.
Revert typo "create-branch-buttonn" — breaks the branch-creation step
Same root cause as in branch-selector.spec.ts: the double-n test-id matches nothing, causing .click() to time out and every subsequent step in this test to be unreachable.
🐛 Proposed fix
- await page.getByTestId("create-branch-buttonn").click();
+ await page.getByTestId("create-branch-button").click();📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| await page.getByTestId("create-branch-buttonn").click(); | |
| await page.getByTestId("create-branch-button").click(); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@frontend/app/tests/e2e/docs-regression-check/tutorials/tutorial-4_integration-with-git.spec.ts`
at line 22, The test fails because the test-id string used in
tutorials/tutorial-4_integration-with-git.spec.ts is misspelled as
"create-branch-buttonn", causing
page.getByTestId("create-branch-buttonn").click() to time out; change the test
to use the correct test id "create-branch-button" (replace the string in
page.getByTestId call) so the branch-creation click targets the real element and
subsequent steps run.
|
This PR has been inactive for 2 weeks and has been marked as stale. If you're still working on this, please:
The stale label will be removed automatically when there's new activity. |
TEST PR
Summary by CodeRabbit
Chores
Tests