Fix BASE_URL construction in Config.ts and SignUp.test.ts

This commit is contained in:
Simon Larsen 2024-04-25 12:45:08 +01:00
parent 73e6a20503
commit 894d15918b
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
4 changed files with 12 additions and 4 deletions

View File

@ -12,4 +12,4 @@ export const HOST: string = env('HOST') || 'localhost';
export const HTTP_PROTOCOL: Protocol =
env('HTTP_PROTOCOL') === 'https' ? Protocol.HTTPS : Protocol.HTTP;
export const BASE_URL: URL = URL.fromString(`${HTTP_PROTOCOL}://${HOST}`);
export const BASE_URL: URL = URL.fromString(`${HTTP_PROTOCOL}${HOST}`);

View File

@ -6,5 +6,7 @@ test.beforeEach(async ({ page }: { page: Page }) => {
});
test('sign up button', async ({ page }: { page: Page }) => {
await page.getByTestId('Sign-up').click();
await expect(page).toHaveURL(BASE_URL + '/accounts/register');
await expect(page).toHaveURL(
BASE_URL.addRoute('/accounts/register').toString()
);
});

View File

@ -1,4 +1,6 @@
{{- if $.Values.cronJobs.e2e.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
@ -7,7 +9,7 @@ metadata:
labels:
appname: oneuptime
spec:
schedule: "*/30 * * * *" # At every 30 minute.
schedule: "*/5 * * * *" # At every 30 minute.
jobTemplate:
spec:
template:
@ -17,4 +19,6 @@ spec:
image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "e2e" $.Values.image.tag }}
env:
{{- include "oneuptime.env.common" . | nindent 14 }}
restartPolicy: Never
restartPolicy: Never
{{- end }}

View File

@ -195,4 +195,6 @@ logLevel: ERROR
cronJobs:
cleanup:
enabled: false
e2e:
enabled: false