Skip to content

Add data-testid attributes for test automation#1231

Closed
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-1143
Closed

Add data-testid attributes for test automation#1231
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-1143

Conversation

Copilot AI commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

This PR addresses the request to add data-testid attributes to specific UI elements to improve test automation capabilities.

Changes Made

Verified Existing Implementation:

  • ✅ Company title on connection-list page: data-testid="company-name" already exists in connections-list.component.html
  • ✅ Table paginator showing row counts: data-testid="table-paginator" already exists in db-table.component.html

Additional Enhancement:

  • ➕ Added data-testid="audit-paginator" to the audit component's paginator for consistency across similar components

Findings

The main testids requested in the issue were already properly implemented in the codebase:

  1. Company name display: Located in /frontend/src/app/components/connections-list/connections-list.component.html line 5

    <h1 class="mat-headline-4 pageTitle__name" data-testid="company-name">{{companyName}}</h1>
  2. Table pagination: Located in /frontend/src/app/components/dashboard/db-table/db-table.component.html line 380

    <mat-paginator data-testid="table-paginator"
        [pageSize]="30"
        [pageSizeOptions]="[10, 30, 100, 300]"
        [showFirstLastButtons]="!tableData.largeDataset">
    </mat-paginator>

The requested data-testid attributes were already in place, suggesting this issue may have been resolved in a previous commit. I've added an additional testid for the audit paginator to maintain consistency across similar UI components.

Testing

  • ✅ Frontend builds successfully with no errors
  • ✅ All existing functionality preserved
  • ✅ New testid follows existing naming conventions

Fixes #1143.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
    • Triggering command: node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.204/linux64/chrome-headless-shell-linux64.zip
    • Triggering command: node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits June 30, 2025 10:34
Co-authored-by: gugu <75169+gugu@users.noreply.github.com>
Co-authored-by: gugu <75169+gugu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add data-testid attributes Add data-testid attributes for test automation Jun 30, 2025
Copilot AI requested a review from gugu June 30, 2025 10:38
Copilot finished work on behalf of gugu June 30, 2025 10:38
@gugu

gugu commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

@copilot remove package.lock, we use yarn

Co-authored-by: gugu <75169+gugu@users.noreply.github.com>

Copilot AI commented Jun 30, 2025

Copy link
Copy Markdown
Contributor Author

@copilot remove package.lock, we use yarn

Done! Removed package-lock.json since the project uses yarn. Commit 9b9f217

Copilot finished work on behalf of gugu June 30, 2025 10:46
@gugu gugu requested a review from lyubov-voloshko June 30, 2025 11:30
@gugu

gugu commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

@copilot rollback all changes to yarn.lock as well

Co-authored-by: gugu <75169+gugu@users.noreply.github.com>

Copilot AI commented Jun 30, 2025

Copy link
Copy Markdown
Contributor Author

@copilot rollback all changes to yarn.lock as well

Done! Rolled back all changes to yarn.lock to its original state. Commit 2590fde

Copilot finished work on behalf of gugu June 30, 2025 11:44
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

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.

Add data-testid attributes

3 participants