Browse Source

test(workflow): Fix alert details snapshot diffs (#29343)

Scott Cooper 3 years ago
parent
commit
2e5d8263c2

+ 7 - 1
static/app/views/alerts/rules/details/body.tsx

@@ -26,6 +26,7 @@ import {t, tct} from 'app/locale';
 import overflowEllipsis from 'app/styles/overflowEllipsis';
 import space from 'app/styles/space';
 import {Actor, DateString, Organization, Project} from 'app/types';
+import getDynamicText from 'app/utils/getDynamicText';
 import Projects from 'app/utils/projects';
 import {
   AlertRuleThresholdType,
@@ -314,7 +315,12 @@ export default class DetailsBody extends React.Component<Props> {
                       <HeaderItem>
                         <Heading noMargin>{t('Display')}</Heading>
                         <ChartControls>
-                          <DropdownControl label={timePeriod.display}>
+                          <DropdownControl
+                            label={getDynamicText({
+                              fixed: 'Oct 14, 2:56 PM — Oct 14, 4:55 PM',
+                              value: timePeriod.display,
+                            })}
+                          >
                             {TIME_OPTIONS.map(({label, value}) => (
                               <DropdownItem
                                 key={value}

+ 1 - 1
tests/acceptance/test_incidents.py

@@ -22,7 +22,7 @@ class OrganizationIncidentsListTest(AcceptanceTestCase, SnubaTestCase):
             self.browser.snapshot("incidents - empty state")
 
     def test_incidents_list(self):
-        alert_rule = self.create_alert_rule()
+        alert_rule = self.create_alert_rule(name="Alert Rule #1")
         incident = self.create_incident(
             self.organization,
             title="Incident #1",