Conversation
WalkthroughUpdates frontend configuration and tooling: modifies 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/app/tests/e2e/docs-regression-check/guides/resource_manager_guide.spec.ts (1)
122-122: Track the TODO as an explicit follow-up task.The pending allocation case is noted, but it would be safer to link it to a concrete tracked test task so it doesn’t get lost during future refactors.
If you want, I can draft a follow-up issue template/checklist for implementing the
#5888allocation coverage.🤖 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/guides/resource_manager_guide.spec.ts` at line 122, Replace the inline TODO comment about "Allocating an IP prefix to a relationship of a node - Need `#5888`" with an explicit tracked follow-up reference: create or confirm the tracking task (issue `#5888`) in the project tracker, then update the test file (resource_manager_guide.spec.ts) to reference that issue ID, include a short owner/assignee and expected milestone or ETA in the comment (e.g., "TODO: see issue `#5888` — owner: `@team-member`, target: Q2"), and optionally add a link to the issue so future refactors can find and complete the pending allocation test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@frontend/app/tests/e2e/docs-regression-check/guides/resource_manager_guide.spec.ts`:
- Line 122: Replace the inline TODO comment about "Allocating an IP prefix to a
relationship of a node - Need `#5888`" with an explicit tracked follow-up
reference: create or confirm the tracking task (issue `#5888`) in the project
tracker, then update the test file (resource_manager_guide.spec.ts) to reference
that issue ID, include a short owner/assignee and expected milestone or ETA in
the comment (e.g., "TODO: see issue `#5888` — owner: `@team-member`, target: Q2"),
and optionally add a link to the issue so future refactors can find and complete
the pending allocation test.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
frontend/app/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
frontend/app/biome.jsoncfrontend/app/package.jsonfrontend/app/tests/e2e/docs-regression-check/guides/resource_manager_guide.spec.tsfrontend/app/tests/e2e/objects/profiles/profiles.spec.tsfrontend/app/tests/e2e/tasks/tasks-view.spec.ts
8c0bec6 to
37ab287
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (5)
frontend/app/tests/e2e/objects/profiles/profiles.spec.ts (4)
49-51: Minor: Redundant locator re-query.The
profileLinklocator is created on line 49 but then a new identical query is made on line 51. Consider reusing the locator variable.Suggested fix
const profileLink = page.getByRole("link", { name: "profile test tag" }); await expect(profileLink).toBeVisible({ timeout: 30_000 }); - await page.getByRole("link", { name: "profile test tag" }).click(); + await profileLink.click();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/app/tests/e2e/objects/profiles/profiles.spec.ts` around lines 49 - 51, The test redundantly re-queries the same link locator; reuse the existing profileLink locator instead of calling page.getByRole(...) again. Replace the second call so the click uses the profileLink variable (created as const profileLink = page.getByRole("link", { name: "profile test tag" })) and keep the visibility assertion and click on that same locator to avoid duplicate queries.
76-78: Minor: Redundant locator re-query.Same pattern as above -
profileOptionis created but then re-queried on line 78.Suggested fix
const profileOption = page.getByRole("option", { name: "profile test tag" }); await expect(profileOption).toBeVisible({ timeout: 30_000 }); - await page.getByRole("option", { name: "profile test tag" }).click(); + await profileOption.click();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/app/tests/e2e/objects/profiles/profiles.spec.ts` around lines 76 - 78, The test creates a locator named profileOption but then re-queries the same locator for the click; update the code to reuse the existing locator (profileOption) for the click to avoid the redundant page.getByRole call—i.e., replace the second page.getByRole("option", { name: "profile test tag" }).click() with profileOption.click() so the locator is defined once and reused.
63-64: Missingawaitonexpectassertion.The
expect(page.url()).toContain(...)call is missingawait. While synchronousexpectworks here becausepage.url()is synchronous, for consistency with other Playwright assertions and to avoid confusion, consider using the async pattern.Suggested fix
- expect(page.url()).toContain("/objects/CoreProfile"); + await expect(page).toHaveURL(/\/objects\/CoreProfile/);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/app/tests/e2e/objects/profiles/profiles.spec.ts` around lines 63 - 64, The assertion using page.url() in the test (expect(page.url()).toContain("/objects/CoreProfile")) is missing an await; update the test in profiles.spec.ts to use the async Playwright assertion pattern—either await the expect call or replace it with await expect(page).toHaveURL(expect.stringContaining("/objects/CoreProfile"))—so the assertion is awaited consistently with other Playwright assertions.
119-119: Missingawaitonexpectassertion.Same issue as line 63 - missing
awaiton URL assertion.Suggested fix
- expect(page.url()).toContain("/objects/ProfileBuiltinTag/"); + await expect(page).toHaveURL(/\/objects\/ProfileBuiltinTag\//);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/app/tests/e2e/objects/profiles/profiles.spec.ts` at line 119, The assertion is calling expect(page.url()).toContain(...) without awaiting the URL; update the assertion to await the URL promise by changing expect(page.url()).toContain("/objects/ProfileBuiltinTag/") to expect(await page.url()).toContain("/objects/ProfileBuiltinTag/") (referencing expect and page.url()) so the test waits for the resolved URL before asserting.frontend/app/tests/e2e/docs-regression-check/guides/resource_manager_guide.spec.ts (1)
122-122: TODO tracking: Incomplete IP Prefix Pool allocation test.The TODO comment references issue
#5888for allocating an IP prefix to a relationship of a node. Ensure this is tracked and the test is completed when the feature is available.Would you like me to verify if issue
#5888is still open and track this TODO?#!/bin/bash # Check the status of issue `#5888` gh issue view 5888 --repo opsmill/infrahub --json state,title,url 2>/dev/null || echo "Issue not found or access denied"🤖 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/guides/resource_manager_guide.spec.ts` at line 122, Replace the vague TODO comment about IP prefix allocation with a tracked TODO that includes the issue number (`#5888`) and a clear action (e.g., "skip until feature `#5888` implemented"), so future runs know why the test is skipped; update the comment in resource_manager_guide.spec.ts (the existing TODO line "Allocating an IP prefix to a relationship of a node - Need `#5888`") to explicitly mark the test as skipped/blocked and append a short gh CLI snippet (commented) to check issue state (gh issue view 5888...) for maintainers to verify when to re-enable the test.
🤖 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/tasks/tasks-view.spec.ts`:
- Around line 5-6: Replace the broken split call to test.describe and .fixme
with the idiomatic single chained call test.describe.fixme(...) so the
declaration uses Playwright's documented property chain; update the test suite
declaration that currently separates test.describe and .fixme into one line
using test.describe.fixme with the existing description string and callback to
restore conventional syntax.
---
Nitpick comments:
In
`@frontend/app/tests/e2e/docs-regression-check/guides/resource_manager_guide.spec.ts`:
- Line 122: Replace the vague TODO comment about IP prefix allocation with a
tracked TODO that includes the issue number (`#5888`) and a clear action (e.g.,
"skip until feature `#5888` implemented"), so future runs know why the test is
skipped; update the comment in resource_manager_guide.spec.ts (the existing TODO
line "Allocating an IP prefix to a relationship of a node - Need `#5888`") to
explicitly mark the test as skipped/blocked and append a short gh CLI snippet
(commented) to check issue state (gh issue view 5888...) for maintainers to
verify when to re-enable the test.
In `@frontend/app/tests/e2e/objects/profiles/profiles.spec.ts`:
- Around line 49-51: The test redundantly re-queries the same link locator;
reuse the existing profileLink locator instead of calling page.getByRole(...)
again. Replace the second call so the click uses the profileLink variable
(created as const profileLink = page.getByRole("link", { name: "profile test
tag" })) and keep the visibility assertion and click on that same locator to
avoid duplicate queries.
- Around line 76-78: The test creates a locator named profileOption but then
re-queries the same locator for the click; update the code to reuse the existing
locator (profileOption) for the click to avoid the redundant page.getByRole
call—i.e., replace the second page.getByRole("option", { name: "profile test
tag" }).click() with profileOption.click() so the locator is defined once and
reused.
- Around line 63-64: The assertion using page.url() in the test
(expect(page.url()).toContain("/objects/CoreProfile")) is missing an await;
update the test in profiles.spec.ts to use the async Playwright assertion
pattern—either await the expect call or replace it with await
expect(page).toHaveURL(expect.stringContaining("/objects/CoreProfile"))—so the
assertion is awaited consistently with other Playwright assertions.
- Line 119: The assertion is calling expect(page.url()).toContain(...) without
awaiting the URL; update the assertion to await the URL promise by changing
expect(page.url()).toContain("/objects/ProfileBuiltinTag/") to expect(await
page.url()).toContain("/objects/ProfileBuiltinTag/") (referencing expect and
page.url()) so the test waits for the resolved URL before asserting.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
frontend/app/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (6)
frontend/app/.betterer.resultsfrontend/app/biome.jsoncfrontend/app/package.jsonfrontend/app/tests/e2e/docs-regression-check/guides/resource_manager_guide.spec.tsfrontend/app/tests/e2e/objects/profiles/profiles.spec.tsfrontend/app/tests/e2e/tasks/tasks-view.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- frontend/app/package.json
- frontend/app/.betterer.results
Summary by CodeRabbit
Chores
Tests