Skip to content
Closed
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
42 changes: 42 additions & 0 deletions i18n/compiled/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
"value": "isRequired"
}
],
"AuDlLe": [
{
"type": 0,
"value": "Information"
}
],
"BfpzoP": [
{
"type": 0,
Expand All @@ -67,12 +73,24 @@
"value": "Form submission statistics"
}
],
"Fm7wN7": [
{
"type": 0,
"value": "Slug"
}
],
"JX8BYx": [
{
"type": 0,
"value": "Unfortunately something went wrong!"
}
],
"K1cg9S": [
{
"type": 0,
"value": "These settings are also visible for citizens"
}
],
"KJFOCt": [
{
"type": 0,
Expand Down Expand Up @@ -103,6 +121,24 @@
"value": "Save"
}
],
"SisPrZ": [
{
"type": 0,
"value": "Category"
}
],
"WSiYMn": [
{
"type": 0,
"value": "Unique ID"
}
],
"WzjRYh": [
{
"type": 0,
"value": "Internal name"
}
],
"ZiDANM": [
{
"type": 0,
Expand Down Expand Up @@ -151,6 +187,12 @@
"value": "Inactive form"
}
],
"y0QrgV": [
{
"type": 0,
"value": "There settings are only visible for administrators"
}
],
"zEFFxg": [
{
"type": 0,
Expand Down
42 changes: 42 additions & 0 deletions i18n/compiled/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
"value": "isRequired"
}
],
"AuDlLe": [
{
"type": 0,
"value": "Informatie"
}
],
"BfpzoP": [
{
"type": 0,
Expand All @@ -67,12 +73,24 @@
"value": "Inzendingstatistieken"
}
],
"Fm7wN7": [
{
"type": 0,
"value": "URL-deel"
}
],
"JX8BYx": [
{
"type": 0,
"value": "Er ging helaas iets fout!"
}
],
"K1cg9S": [
{
"type": 0,
"value": "Onderstaande ook te zien voor invuller"
}
],
"KJFOCt": [
{
"type": 0,
Expand Down Expand Up @@ -103,6 +121,24 @@
"value": "Opslaan"
}
],
"SisPrZ": [
{
"type": 0,
"value": "Categorie"
}
],
"WSiYMn": [
{
"type": 0,
"value": "Uniek ID"
}
],
"WzjRYh": [
{
"type": 0,
"value": "Interne naam"
}
],
"ZiDANM": [
{
"type": 0,
Expand Down Expand Up @@ -151,6 +187,12 @@
"value": "Formulier niet actief"
}
],
"y0QrgV": [
{
"type": 0,
"value": "Onderstaande alleen te zien voor jou"
}
],
"zEFFxg": [
{
"type": 0,
Expand Down
35 changes: 35 additions & 0 deletions i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"description": "Form field label content/wrapper",
"originalDefault": "{isRequired, select, true {{label} <span>Required</span>} other {{label}} }"
},
"AuDlLe": {
"defaultMessage": "Information",
"description": "form detail information settings page title",
"originalDefault": "Information"
},
"BfpzoP": {
"defaultMessage": "Scheduled form",
"description": "Label for form status \"scheduled\"",
Expand All @@ -29,11 +34,21 @@
"description": "Route breadcrumb label for form submission statistics",
"originalDefault": "form submission statistics"
},
"Fm7wN7": {
"defaultMessage": "Slug",
"description": "Form detail field 'slug' label",
"originalDefault": "Slug"
},
"JX8BYx": {
"defaultMessage": "Unfortunately something went wrong!",
"description": "'Generic' error message",
"originalDefault": "Unfortunately something went wrong!"
},
"K1cg9S": {
"defaultMessage": "These settings are also visible for citizens",
"description": "form detail information settings page 'also for citizen' settings",
"originalDefault": "These settings are also visible for citizens"
},
"KJFOCt": {
"defaultMessage": "Logic",
"description": "Route breadcrumb label for form detail logic",
Expand All @@ -59,6 +74,21 @@
"description": "Save button text",
"originalDefault": "Save"
},
"SisPrZ": {
"defaultMessage": "Category",
"description": "Form detail field 'category' label",
"originalDefault": "Category"
},
"WSiYMn": {
"defaultMessage": "Unique ID",
"description": "Form detail field 'uuid' label",
"originalDefault": "Unique ID"
},
"WzjRYh": {
"defaultMessage": "Internal name",
"description": "Form detail field 'internalName' label",
"originalDefault": "Internal name"
},
"ZiDANM": {
"defaultMessage": "Home",
"description": "Route breadcrumb label for home",
Expand Down Expand Up @@ -99,6 +129,11 @@
"description": "Label for form status \"inactive\"",
"originalDefault": "Inactive form"
},
"y0QrgV": {
"defaultMessage": "There settings are only visible for administrators",
"description": "form detail information settings page 'only for admin' settings",
"originalDefault": "There settings are only visible for administrators"
},
"zEFFxg": {
"defaultMessage": "Oops!",
"description": "'Generic' error title",
Expand Down
35 changes: 35 additions & 0 deletions i18n/messages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"description": "Form field label content/wrapper",
"originalDefault": "{isRequired, select, true {{label} <span>Required</span>} other {{label}} }"
},
"AuDlLe": {
"defaultMessage": "Informatie",
"description": "form detail information settings page title",
"originalDefault": "Information"
},
"BfpzoP": {
"defaultMessage": "Formulier ingepland",
"description": "Label for form status \"scheduled\"",
Expand All @@ -30,11 +35,21 @@
"description": "Route breadcrumb label for form submission statistics",
"originalDefault": "form submission statistics"
},
"Fm7wN7": {
"defaultMessage": "URL-deel",
"description": "Form detail field 'slug' label",
"originalDefault": "Slug"
},
"JX8BYx": {
"defaultMessage": "Er ging helaas iets fout!",
"description": "'Generic' error message",
"originalDefault": "Unfortunately something went wrong!"
},
"K1cg9S": {
"defaultMessage": "Onderstaande ook te zien voor invuller",
"description": "form detail information settings page 'also for citizen' settings",
"originalDefault": "These settings are also visible for citizens"
},
"KJFOCt": {
"defaultMessage": "Logica",
"description": "Route breadcrumb label for form detail logic",
Expand All @@ -60,6 +75,21 @@
"description": "Save button text",
"originalDefault": "Save"
},
"SisPrZ": {
"defaultMessage": "Categorie",
"description": "Form detail field 'category' label",
"originalDefault": "Category"
},
"WSiYMn": {
"defaultMessage": "Uniek ID",
"description": "Form detail field 'uuid' label",
"originalDefault": "Unique ID"
},
"WzjRYh": {
"defaultMessage": "Interne naam",
"description": "Form detail field 'internalName' label",
"originalDefault": "Internal name"
},
"ZiDANM": {
"defaultMessage": "Home",
"description": "Route breadcrumb label for home",
Expand Down Expand Up @@ -100,6 +130,11 @@
"description": "Label for form status \"inactive\"",
"originalDefault": "Inactive form"
},
"y0QrgV": {
"defaultMessage": "Onderstaande alleen te zien voor jou",
"description": "form detail information settings page 'only for admin' settings",
"originalDefault": "There settings are only visible for administrators"
},
"zEFFxg": {
"defaultMessage": "Oeps!",
"description": "'Generic' error title",
Expand Down
4 changes: 2 additions & 2 deletions src/api-mocks/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {BASE_URL} from './base';
*/
export const mockAccountsMeAuthenticatedGet = (mfaVerified: boolean, spy?: Mock) =>
http.get(
`${BASE_URL}accounts/me`,
`${BASE_URL}v3/accounts/me`,
info => {
// Call the spy with the request info
if (spy) spy(info);
Expand All @@ -42,7 +42,7 @@ export const mockAccountsMeAuthenticatedGet = (mfaVerified: boolean, spy?: Mock)
*/
export const mockAccountsMeAnonymousGet = (spy?: Mock) =>
http.get(
`${BASE_URL}accounts/me`,
`${BASE_URL}v3/accounts/me`,
info => {
// Call the spy with the request info
if (spy) spy(info);
Expand Down
2 changes: 1 addition & 1 deletion src/api-mocks/base.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {cloneDeep, set} from 'lodash';

export const BASE_URL = 'http://localhost:8000/api/v3/';
export const BASE_URL = 'http://localhost:8000/api/';

/**
* Create a function to build an object from a default with optional overrides.
Expand Down
80 changes: 80 additions & 0 deletions src/api-mocks/category.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import type {Mock} from '@vitest/spy';
import {HttpResponse, http} from 'msw';

import {BASE_URL} from '@/api-mocks/base';
import {SESSION_EXPIRES_IN_HEADER} from '@/guard/session/session-expiry';
import type {Category} from '@/types/category';

const DEFAULT_CATEGORIES: Category[] = [
{
url: 'http://localhost:8000/api/v2/categories/c37708ed-3d30-4eac-934f-74bb75256694',
name: 'Express forms',
uuid: 'c37708ed-3d30-4eac-934f-74bb75256694',
ancestors: [],
depth: 1,
},
{
url: 'http://localhost:8000/api/v2/categories/fed0a451-341a-4da1-b384-83edb5ef67a4',
name: 'Service realms',
uuid: 'fed0a451-341a-4da1-b384-83edb5ef67a4',
ancestors: [],
depth: 1,
},
{
url: 'http://localhost:8000/api/v2/categories/5d1138ae-bb0c-42fe-bcba-f1e7ffc1e79e',
name: 'Housing',
uuid: '5d1138ae-bb0c-42fe-bcba-f1e7ffc1e79e',
ancestors: [
{
uuid: 'fed0a451-341a-4da1-b384-83edb5ef67a4',
name: 'Service realms',
},
],
depth: 2,
},
{
url: 'http://localhost:8000/api/v2/categories/d65f420d-1d6a-483d-b5e8-7ddf1d6b60b6',
name: 'Moving',
uuid: 'd65f420d-1d6a-483d-b5e8-7ddf1d6b60b6',
ancestors: [
{
uuid: 'fed0a451-341a-4da1-b384-83edb5ef67a4',
name: 'Service realms',
},
{
uuid: '5d1138ae-bb0c-42fe-bcba-f1e7ffc1e79e',
name: 'Housing',
},
],
depth: 3,
},
{
url: 'http://localhost:8000/api/v2/categories/4b626aa4-00ce-4738-aa51-184a95b1f895',
name: 'Family',
uuid: '4b626aa4-00ce-4738-aa51-184a95b1f895',
ancestors: [
{
uuid: 'fed0a451-341a-4da1-b384-83edb5ef67a4',
name: 'Service realms',
},
],
depth: 2,
},
];

export const mockCategoriesGet = (spy?: Mock) =>
http.get(
`${BASE_URL}v2/categories`,
info => {
// Call the spy with the request info
if (spy) spy(info);

return HttpResponse.json(DEFAULT_CATEGORIES, {
headers: {
[SESSION_EXPIRES_IN_HEADER]: `3600`, // Set the session expiry to 1 hour
},
status: 200,
});
},
{once: false}
);
Loading
Loading