diff --git a/frontend/app/components/UsabilityTesting/TestEdit.tsx b/frontend/app/components/UsabilityTesting/TestEdit.tsx index 04c1dbf58..56260fe45 100644 --- a/frontend/app/components/UsabilityTesting/TestEdit.tsx +++ b/frontend/app/components/UsabilityTesting/TestEdit.tsx @@ -77,7 +77,7 @@ function TestEdit() { uxtestingStore.createNewTest(isPreview).then((test) => { if (isPreview) { window.open(`${test.startingPath}?oruxt=${test.testId}`, '_blank', 'noopener,noreferrer'); - history.push(withSiteId(usabilityTestingEdit(test.testId), siteId)); + history.replace(withSiteId(usabilityTestingEdit(test.testId), siteId)); } else { history.push(withSiteId(usabilityTestingView(test.testId), siteId)); } @@ -195,6 +195,9 @@ function TestEdit() { value={uxtestingStore.instance!.startingPath} onChange={(e) => { setHasChanged(true); + if (!e.target.value.startsWith('https://')) { + e.target.value = 'https://' + e.target.value; + } uxtestingStore.instance!.setProperty('startingPath', e.target.value); }} /> diff --git a/frontend/app/mstore/uxtestingStore.ts b/frontend/app/mstore/uxtestingStore.ts index 86812d825..29ba6b6bb 100644 --- a/frontend/app/mstore/uxtestingStore.ts +++ b/frontend/app/mstore/uxtestingStore.ts @@ -148,7 +148,7 @@ export default class UxtestingStore { initNewTest(title: string, description: string) { const initialData = { title: title, - startingPath: '', + startingPath: 'https://', requireMic: false, requireCamera: false, description: description,