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

[7.x] [Uptime] Default uptime alert type and disable changing type (#62028) #62627

Merged
merged 1 commit into from
Apr 6, 2020
Merged
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
5 changes: 4 additions & 1 deletion x-pack/legacy/plugins/uptime/public/uptime_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ const Application = (props: UptimeAppProps) => {
<UptimeAlertsContextProvider>
<EuiPage className="app-wrapper-panel " data-test-subj="uptimeApp">
<main>
<UptimeAlertsFlyoutWrapper />
<UptimeAlertsFlyoutWrapper
alertTypeId="xpack.uptime.alerts.monitorStatus"
canChangeTrigger={false}
/>
<PageRouter autocomplete={plugins.data.autocomplete} />
</main>
</EuiPage>
Expand Down
6 changes: 5 additions & 1 deletion x-pack/test/functional/page_objects/uptime_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo
alertTags,
alertThrottleInterval,
alertTimerangeSelection,
alertType,
filters,
}: {
alertName: string;
Expand All @@ -113,11 +114,14 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo
alertThrottleInterval: string;
alertNumTimes: string;
alertTimerangeSelection: string;
alertType?: string;
filters?: string;
}) {
const { setKueryBarText } = commonService;
await alerts.openFlyout();
await alerts.openMonitorStatusAlertType();
if (alertType) {
await alerts.openMonitorStatusAlertType(alertType);
}
await alerts.setAlertName(alertName);
await alerts.setAlertTags(alertTags);
await alerts.setAlertInterval(alertInterval);
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/services/uptime/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function UptimeAlertsProvider({ getService }: FtrProviderContext) {
await testSubjects.click('xpack.uptime.alertsPopover.toggleButton', 5000);
await testSubjects.click('xpack.uptime.toggleAlertFlyout', 5000);
},
async openMonitorStatusAlertType() {
return testSubjects.click('xpack.uptime.alerts.monitorStatus-SelectOption', 5000);
async openMonitorStatusAlertType(alertType: string) {
return testSubjects.click(`xpack.uptime.alerts.${alertType}-SelectOption`, 5000);
},
async setAlertTags(tags: string[]) {
for (let i = 0; i < tags.length; i += 1) {
Expand Down