Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[igmore me] Add click field for data-sentry-component attribute #25

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codecov_ats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ jobs:
# Creates the commit and report objects in codecov
- name: Codecov startup
run: |
codecovcli create-commit
codecovcli create-report
./codecovcli create-commit
./codecovcli create-report
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# Sends static analysis information to codecov
- name: Static Analysis
run: |
codecovcli static-analysis --token=${CODECOV_STATIC_TOKEN} \
./codecovcli static-analysis --token=${CODECOV_STATIC_TOKEN} \
--folders-to-exclude .artifacts \
--folders-to-exclude .github \
--folders-to-exclude .venv \
Expand All @@ -117,7 +117,7 @@ jobs:
# This is the base for the git diff BASE..HEAD
BASE_COMMIT=$(git merge-base ${{ github.sha }}^ origin/master)
# Get list of tests to run from Codecov
output=$(codecovcli --codecov-yml-path=codecov.yml label-analysis --dry-run --token=${CODECOV_STATIC_TOKEN} --base-sha=${BASE_COMMIT}) || true
output=$(./codecovcli --codecov-yml-path=codecov.yml label-analysis --dry-run --token=${CODECOV_STATIC_TOKEN} --base-sha=${BASE_COMMIT}) || true
# Post processing and validation
if [ -n "${output}" ];
then
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/replays/usecases/ingest/dom_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"event_hash": str,
"id": str,
"node_id": int,
"react_component_name": str,
"role": str,
"tag": str,
"testid": str,
Expand Down Expand Up @@ -296,6 +297,7 @@ def create_click_event(
"testid": _get_testid(attributes)[:64],
"aria_label": attributes.get("aria-label", "")[:64],
"title": attributes.get("title", "")[:64],
"react_component_name": attributes.get("data-sentry-component", "")[:64],
"is_dead": int(is_dead),
"is_rage": int(is_rage),
"timestamp": int(payload["timestamp"]),
Expand Down
10 changes: 10 additions & 0 deletions tests/sentry/replays/unit/test_ingest_dom_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_get_user_actions():
"alt": "1",
"data-testid": "2",
"title": "3",
"data-sentry-component": "SignUpForm",
},
"textContent": "Hello, world!",
},
Expand All @@ -61,6 +62,7 @@ def test_get_user_actions():
assert user_actions[0]["testid"] == "2"
assert user_actions[0]["aria_label"] == "test"
assert user_actions[0]["title"] == "3"
assert user_actions[0]["react_component_name"] == "SignUpForm"
assert user_actions[0]["is_dead"] == 0
assert user_actions[0]["is_rage"] == 0
assert user_actions[0]["timestamp"] == 1674298825
Expand Down Expand Up @@ -114,6 +116,7 @@ def test_parse_replay_actions():
"alt": "1",
"data-testid": "2",
"title": "3",
"data-sentry-component": "SignUpForm",
},
"textContent": "text",
},
Expand Down Expand Up @@ -148,6 +151,7 @@ def test_parse_replay_actions():
assert action["alt"] == "1"
assert action["testid"] == "2"
assert action["title"] == "3"
assert action["react_component_name"] == "SignUpForm"
assert action["is_dead"] == 0
assert action["is_rage"] == 0
assert action["timestamp"] == 1
Expand Down Expand Up @@ -181,6 +185,7 @@ def test_parse_replay_dead_click_actions():
"alt": "1",
"data-testid": "2",
"title": "3",
"data-sentry-component": "SignUpForm",
},
"textContent": "text",
},
Expand Down Expand Up @@ -214,6 +219,7 @@ def test_parse_replay_dead_click_actions():
"alt": "1",
"data-testid": "2",
"title": "3",
"data-sentry-component": "SignUpForm",
},
"textContent": "text",
},
Expand Down Expand Up @@ -248,6 +254,7 @@ def test_parse_replay_dead_click_actions():
"alt": "1",
"data-testid": "2",
"title": "3",
"data-sentry-component": "SignUpForm",
},
"textContent": "text",
},
Expand Down Expand Up @@ -282,6 +289,7 @@ def test_parse_replay_dead_click_actions():
assert action["alt"] == "1"
assert action["testid"] == "2"
assert action["title"] == "3"
assert action["react_component_name"] == "SignUpForm"
assert action["is_dead"] == 1
assert action["is_rage"] == 0
assert action["timestamp"] == 1
Expand Down Expand Up @@ -326,6 +334,7 @@ def test_parse_replay_rage_click_actions():
"alt": "1",
"data-testid": "2",
"title": "3",
"data-sentry-component": "SignUpForm",
},
"textContent": "text",
},
Expand Down Expand Up @@ -360,6 +369,7 @@ def test_parse_replay_rage_click_actions():
assert action["alt"] == "1"
assert action["testid"] == "2"
assert action["title"] == "3"
assert action["react_component_name"] == "SignUpForm"
assert action["is_dead"] == 1
assert action["is_rage"] == 1
assert action["timestamp"] == 1
Expand Down
Loading