Skip to content

Commit 39c47fa

Browse files
authored
test: assert alert rule form renders time window select (#69422)
Adds a quick test for #69416
1 parent e855b08 commit 39c47fa

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

static/app/views/alerts/rules/metric/ruleForm.spec.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,23 @@ describe('Incident Rules Form', () => {
123123
expect(await screen.findByLabelText('Save Rule')).toBeEnabled();
124124
expect(screen.queryByText(permissionAlertText)).not.toBeInTheDocument();
125125
});
126+
127+
it('renders time window', async () => {
128+
createWrapper({rule});
129+
130+
expect(await screen.findByText('1 hour interval')).toBeInTheDocument();
131+
});
132+
133+
it('renders time window for activated alerts', async () => {
134+
createWrapper({
135+
rule: {
136+
...rule,
137+
monitorType: MonitorType.CONTINUOUS,
138+
},
139+
});
140+
141+
expect(await screen.findByText('1 hour interval')).toBeInTheDocument();
142+
});
126143
});
127144

128145
describe('Creating a new rule', () => {

0 commit comments

Comments
 (0)