Skip to content

Commit cff4951

Browse files
authored
ref(css): Remove CSS class event-issue-header (#18437)
This is unused (there are no h3s nested under `<EventOrGroupHeader>` component. Change class name to `data-test-id` for acceptance tests.
1 parent 8e335c7 commit cff4951

File tree

6 files changed

+6
-32
lines changed

6 files changed

+6
-32
lines changed

src/sentry/static/sentry/app/components/eventOrGroupHeader.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React from 'react';
33
import {withRouter} from 'react-router';
44
import styled from '@emotion/styled';
55
import {css} from '@emotion/core';
6-
import classNames from 'classnames';
76
import capitalize from 'lodash/capitalize';
87

98
import SentryTypes from 'app/sentryTypes';
@@ -88,12 +87,11 @@ class EventOrGroupHeader extends React.Component {
8887

8988
render() {
9089
const {className, size, data} = this.props;
91-
const cx = classNames('event-issue-header', className);
9290
const location = getLocation(data);
9391
const message = getMessage(data);
9492

9593
return (
96-
<div className={cx}>
94+
<div className={className} data-test-id="event-issue-header">
9795
<Title size={size}>{this.getTitle()}</Title>
9896
{location && <Location size={size}>{location}</Location>}
9997
{message && <Message size={size}>{message}</Message>}

src/sentry/static/sentry/less/stream.less

-24
Original file line numberDiff line numberDiff line change
@@ -936,27 +936,3 @@
936936
}
937937
}
938938
}
939-
940-
.event-issue-header {
941-
h3 {
942-
font-size: 16px;
943-
line-height: 1.1;
944-
margin: 0 0 5px;
945-
font-weight: 600;
946-
947-
em {
948-
font-style: normal;
949-
font-size: 14px;
950-
color: @60;
951-
font-weight: normal;
952-
}
953-
954-
a {
955-
color: @gray-darker;
956-
957-
&:hover {
958-
color: @gray-darkest;
959-
}
960-
}
961-
}
962-
}

tests/acceptance/page_objects/issue_list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def visit_issue_list(self, org, query=""):
1414
self.wait_until_loaded()
1515

1616
def wait_for_stream(self):
17-
self.browser.wait_until(".event-issue-header", timeout=20)
17+
self.browser.wait_until('[data-test-id="event-issue-header"]', timeout=20)
1818

1919
def select_issue(self, position):
2020
self.browser.click(u'[data-test-id="group"]:nth-child({})'.format(position))

tests/acceptance/test_organization_group_index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_with_results(self, mock_now):
7070
self.page.wait_for_stream()
7171
self.browser.snapshot("organization issues with issues")
7272

73-
groups = self.browser.find_elements_by_class_name("event-issue-header")
73+
groups = self.browser.find_elements_by_css_selector('[data-test-id="event-issue-header"]')
7474
assert len(groups) == 2
7575
assert "oh snap" in groups[0].text
7676
assert "oh no" in groups[1].text

tests/js/spec/views/organizationGroupDetails/__snapshots__/groupMergedView.spec.jsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ exports[`Issues -> Merged View renders with mocked data 1`] = `
987987
size="normal"
988988
>
989989
<div
990-
className="event-issue-header"
990+
data-test-id="event-issue-header"
991991
>
992992
<Title
993993
size="normal"
@@ -1736,7 +1736,7 @@ exports[`Issues -> Merged View renders with mocked data 1`] = `
17361736
size="normal"
17371737
>
17381738
<div
1739-
className="event-issue-header"
1739+
data-test-id="event-issue-header"
17401740
>
17411741
<Title
17421742
size="normal"

tests/js/spec/views/organizationGroupDetails/__snapshots__/groupSimilar.spec.jsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ exports[`Issues Similar View renders with mocked data 1`] = `
835835
size="normal"
836836
>
837837
<div
838-
className="event-issue-header"
838+
data-test-id="event-issue-header"
839839
>
840840
<Title
841841
size="normal"

0 commit comments

Comments
 (0)