-
-
+
Publish Test
diff --git a/frontend/app/components/UsabilityTesting/TestEdit.tsx b/frontend/app/components/UsabilityTesting/TestEdit.tsx
index bc9d3da78..6cfa67326 100644
--- a/frontend/app/components/UsabilityTesting/TestEdit.tsx
+++ b/frontend/app/components/UsabilityTesting/TestEdit.tsx
@@ -1,4 +1,5 @@
import { Button, Input, Typography, Dropdown, Modal } from 'antd';
+import { isValidUrl } from 'App/utils';
import React from 'react';
import {
withSiteId,
@@ -16,7 +17,7 @@ import { confirm } from 'UI';
import StepsModal from './StepsModal';
import SidePanel from './SidePanel';
import usePageTitle from 'App/hooks/usePageTitle';
-import { toast } from 'react-toastify'
+import { toast } from 'react-toastify';
const menuItems = [
{
@@ -119,6 +120,8 @@ function TestEdit() {
const isPublished =
uxtestingStore.instance.status !== undefined && uxtestingStore.instance.status !== 'preview';
+ const isStartingPointValid = isValidUrl(uxtestingStore.instance.startingPath);
+
return (
{
setHasChanged(true);
if (!e.target.value.startsWith('https://')) {
- e.target.value = 'https://' + e.target.value;
+ e.target.value = 'https://';
}
uxtestingStore.instance!.setProperty('startingPath', e.target.value);
}}
/>
- Test will begin on this page.
+ {uxtestingStore.instance!.startingPath === 'https://' || isStartingPointValid ? (
+ Test will begin on this page.
+ ) : (
+ Starting point URL is invalid.
+ )}