mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Synthetics] fix browser type as default in monitor management (#132572)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
ae8b6c8beb
commit
37d40d7343
4 changed files with 9 additions and 8 deletions
|
@ -40,12 +40,12 @@ journey('MonitorDetails', async ({ page, params }: { page: Page; params: any })
|
|||
step('create basic monitor', async () => {
|
||||
await uptime.enableMonitorManagement();
|
||||
await uptime.clickAddMonitor();
|
||||
await uptime.createBasicMonitorDetails({
|
||||
await uptime.createBasicHTTPMonitorDetails({
|
||||
name,
|
||||
locations: ['US Central'],
|
||||
apmServiceName: 'synthetics',
|
||||
url: 'https://www.google.com',
|
||||
});
|
||||
await uptime.fillByTestSubj('syntheticsUrlField', 'https://www.google.com');
|
||||
await uptime.confirmAndSave();
|
||||
});
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ journey(`MonitorName`, async ({ page, params }: { page: Page; params: any }) =>
|
|||
const uptime = monitorManagementPageProvider({ page, kibanaUrl: params.kibanaUrl });
|
||||
|
||||
const createBasicMonitor = async () => {
|
||||
await uptime.createBasicMonitorDetails({
|
||||
await uptime.createBasicHTTPMonitorDetails({
|
||||
name,
|
||||
locations: ['US Central'],
|
||||
apmServiceName: 'synthetics',
|
||||
url: 'https://www.google.com',
|
||||
});
|
||||
await uptime.fillByTestSubj('syntheticsUrlField', 'https://www.google.com');
|
||||
};
|
||||
|
||||
before(async () => {
|
||||
|
@ -52,12 +52,12 @@ journey(`MonitorName`, async ({ page, params }: { page: Page; params: any }) =>
|
|||
|
||||
step(`shows error if name already exists`, async () => {
|
||||
await uptime.navigateToAddMonitor();
|
||||
await uptime.createBasicMonitorDetails({
|
||||
await uptime.createBasicHTTPMonitorDetails({
|
||||
name,
|
||||
locations: ['US Central'],
|
||||
apmServiceName: 'synthetics',
|
||||
url: 'https://www.google.com',
|
||||
});
|
||||
await uptime.fillByTestSubj('syntheticsUrlField', 'https://www.google.com');
|
||||
|
||||
await uptime.assertText({ text: 'Monitor name already exists.' });
|
||||
|
||||
|
|
|
@ -189,6 +189,7 @@ export function monitorManagementPageProvider({
|
|||
apmServiceName: string;
|
||||
locations: string[];
|
||||
}) {
|
||||
await this.selectMonitorType('http');
|
||||
await this.createBasicMonitorDetails({ name, apmServiceName, locations });
|
||||
await this.fillByTestSubj('syntheticsUrlField', url);
|
||||
},
|
||||
|
|
|
@ -121,10 +121,10 @@ export function PolicyConfigContextProvider<ExtraFields = unknown>({
|
|||
const isAddMonitorRoute = useRouteMatch(MONITOR_ADD_ROUTE);
|
||||
|
||||
useEffect(() => {
|
||||
if (isAddMonitorRoute) {
|
||||
if (isAddMonitorRoute?.isExact) {
|
||||
setMonitorType(DataStream.BROWSER);
|
||||
}
|
||||
}, [isAddMonitorRoute]);
|
||||
}, [isAddMonitorRoute?.isExact]);
|
||||
|
||||
const value = useMemo(() => {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue