Add data-testid attributes to permission dialog elements for test automation#1241
Merged
Conversation
…omation Co-authored-by: gugu <75169+gugu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add data-testid to elements in permissions
Add data-testid attributes to permission dialog elements for test automation
Jul 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
data-testidattributes to specific UI elements in the permissions and group management dialogs to improve test automation capabilities.Changes Made
1. Group Add Dialog
data-testid="group-title-input"to the group title input field2. Permissions Add Dialog
data-testid="full-access-button"to the "Full access" buttondata-testid="table-row-{{tableName}}"to each table row element in the tables listdata-testid="{{tableName}}-readonly-toggle"to each readonly toggle elementTechnical Details
The implementation uses Angular's attribute binding syntax (
[attr.data-testid]) to ensure proper attribute assignment with dynamic values based on table names. This approach:attr.data-testidusage in other components)Testing
The added
data-testidattributes will enable more reliable and maintainable automated tests by providing stable selectors that are independent of the underlying DOM structure or styling classes.Fixes #1239.
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:
accounts.google.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3764 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-45149819 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13085714552840635536,7779688464991081079,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns block)clients2.google.com/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns block)clientservices.googleapis.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3764 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-45149819 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13085714552840635536,7779688464991081079,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns block)googlechromelabs.github.io/usr/local/bin/node install.mjs(dns block)https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/linux64/chrome-headless-shell-linux64.zip/usr/local/bin/node install.mjs(http block)js.stripe.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3764 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-45149819 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13085714552840635536,7779688464991081079,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns block)optimizationguide-pa.googleapis.com/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns block)/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3764 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-45149819 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13085714552840635536,7779688464991081079,262144 --disable-features=PaintHolding --variations-seed-version(dns block)redirector.gvt1.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3764 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-45149819 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13085714552840635536,7779688464991081079,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns block)safebrowsingohttpgateway.googleapis.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3764 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-45149819 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13085714552840635536,7779688464991081079,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns block)www.google.com/opt/google/chrome/chrome --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=3764 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-45149819 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13085714552840635536,7779688464991081079,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome --user-data-dir=/tmp/karma-45149819 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox --disable-gpu --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222 --noerrdialogs --ozone-platform=headless --ozone-override-screen-size=800,600 --use-angle=swiftshader-webgl http://localhost:9876/?id=45149819(dns 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.