Skip to content

test(stand): cover personal and team metrics dashboards - #2171

Merged
aleksdotbar merged 2 commits into
mainfrom
test/personal-dashboard-e2e
Aug 4, 2026
Merged

test(stand): cover personal and team metrics dashboards#2171
aleksdotbar merged 2 commits into
mainfrom
test/personal-dashboard-e2e

Conversation

@aleksdotbar

@aleksdotbar aleksdotbar commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • verify every personal-dashboard KPI and metric domain
  • navigate to the team dashboard through the header switcher
  • verify every seeded team member, heatmap metric, and domain card
  • assert the expected unseeded Wiki states without hardcoding runtime metric values

Validation

  • ruff check
  • ruff format --check

Summary by CodeRabbit

  • Tests
    • Expanded browser coverage for personal dashboards and team views.
    • Added verification for all KPI values, populated domain cards, and empty-state messaging.
    • Added checks for recorded and unrecorded team metrics across every roster member.
    • Improved validation of team navigation and dashboard details to help ensure consistent, reliable experiences.

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
@aleksdotbar
aleksdotbar requested a review from a team as a code owner August 4, 2026 08:34
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The UI page objects now use dedicated accessible locators for dashboard controls, metrics, and domain states. Seeded-data browser tests cover all personal KPIs, populated and empty domains, team navigation, member metrics, and team domain states.

Changes

Seeded dashboard coverage

Layer / File(s) Summary
Personal dashboard locators and assertions
tests/stand/ui/pages/person_view.py, tests/stand/ui/test_seeded_data_visible.py
PersonView adds dedicated locators for KPIs, the team switch, and domain states. Personal dashboard coverage validates five KPIs, populated domains, and the Wiki empty state.
Team dashboard navigation and assertions
tests/stand/ui/pages/team_view.py, tests/stand/ui/test_seeded_data_visible.py
TeamView adds overview, recorded, unrecorded, and domain locators. Team coverage enters through the personal view, validates navigation, member metrics, and populated or empty domains.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: artifizer

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the added test coverage for personal and team metrics dashboards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/personal-dashboard-e2e

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aleksdotbar
aleksdotbar requested a review from ktursunov August 4, 2026 08:35
@aleksdotbar
aleksdotbar enabled auto-merge August 4, 2026 08:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/stand/ui/test_seeded_data_visible.py`:
- Around line 91-92: Update the KPI assertion in the seeded-data visibility test
around view.kpi_value(label) to require non-whitespace text, while continuing to
reject the "—" placeholder. Ensure blank and whitespace-only KPI values fail the
test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bc42f783-5684-4be4-9cd2-b785e55198ee

📥 Commits

Reviewing files that changed from the base of the PR and between e74c321 and 8f46e2a.

📒 Files selected for processing (3)
  • tests/stand/ui/pages/person_view.py
  • tests/stand/ui/pages/team_view.py
  • tests/stand/ui/test_seeded_data_visible.py

Comment on lines +91 to +92
expect(view.kpi_tile(label)).to_be_visible()
expect(view.kpi_value(label)).not_to_have_text("—")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate file =="
fd -a 'test_seeded_data_visible.py' . || true

echo "== file excerpt =="
cat -n tests/stand/ui/test_seeded_data_visible.py | sed -n '1,150p'

echo "== search kpi_value implementations =="
rg -n "def kpi_value|kpi_value|expect_value|visible|dash|—" tests -S || true

echo "== git diff stat/name/status =="
git diff --stat || true
git diff -- tests/stand/ui/test_seeded_data_visible.py || true

Repository: constructorfabric/insight

Length of output: 50381


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== person_view.kpi_value implementation =="
cat -n tests/stand/ui/pages/person_view.py | sed -n '1,120p'

echo "== deterministic check of current assertion behavior for whitespace values =="
python3 - <<'PY'
import re
values = ["—", "", " ", "  ", "\t", "\n", "0", "10️⃣"]
for text in values:
    passed = text != "—"
    print(repr(text), "->", passed)
PY

Repository: constructorfabric/insight

Length of output: 2553


Require a nonempty KPI value.

Line 92 only rejects the "—" placeholder, so blank or whitespace-only values can still pass. Add or update this check to require non-whitespace text as well as rejecting the placeholder.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/stand/ui/test_seeded_data_visible.py` around lines 91 - 92, Update the
KPI assertion in the seeded-data visibility test around view.kpi_value(label) to
require non-whitespace text, while continuing to reject the "—" placeholder.
Ensure blank and whitespace-only KPI values fail the test.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🤖 connectors-ddl snapshot drift

The committed snapshot does not match what this branch actually produces. The regenerated snapshot is waiting in #2172 — review the DDL diff there and merge it into this branch; the gate re-runs on your merge.

Refreshed on every drifting gate run (the regen branch is force-pushed), so it reflects this branch as of the last completed run.

@aleksdotbar aleksdotbar linked an issue Aug 4, 2026 that may be closed by this pull request
@aleksdotbar
aleksdotbar disabled auto-merge August 4, 2026 09:14
@aleksdotbar
aleksdotbar added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 5a54e30 Aug 4, 2026
42 of 44 checks passed
@aleksdotbar
aleksdotbar deleted the test/personal-dashboard-e2e branch August 4, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e2e ui test

2 participants