Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dataModelName parameter to GetModelMetadata endpoint #12826

Merged
merged 37 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
eed3332
update use-cases yml
nkylstad Jan 30, 2024
36554c6
Begin work
ErlingHauan May 14, 2024
9ef815e
Merge branch 'main' of https://github.com/Altinn/altinn-studio into 1…
ErlingHauan May 14, 2024
506d979
Make route 'model-metadata' take optional parameter dataModelName
ErlingHauan May 14, 2024
2db56fd
Add dataModelName to frontend path
ErlingHauan May 14, 2024
27e8d28
Add dataModelName to frontend path
ErlingHauan May 14, 2024
5803a19
Merge branch '12741-update-endpoint-fetching-datamodel' of https://gi…
ErlingHauan May 14, 2024
85d864e
Add tests for dataModelName param
ErlingHauan May 15, 2024
94d284f
Add tests for dataModelName param
ErlingHauan May 15, 2024
2989174
Include layoutSet parameter in test
ErlingHauan May 16, 2024
aa6296c
Include layoutSet parameter in test
ErlingHauan May 16, 2024
bfff87e
Update path in paths.js
ErlingHauan May 16, 2024
3a35342
Fix 404 test
ErlingHauan May 21, 2024
1882a3c
Refactor arrange part of tests into a separate method
ErlingHauan May 21, 2024
f49613f
Write test GetModelMetadata_Should_Return_Empty_Metadata_Object_When_…
ErlingHauan May 21, 2024
17c6ddf
Update code comments
ErlingHauan May 21, 2024
20b9eff
Add 'null' value for dataModelName where it is used in frontend code
ErlingHauan May 21, 2024
462e74a
Add dataModelName param to datamodelMetadataPath
ErlingHauan May 21, 2024
d6a348a
Merge branch 'main', remote-tracking branch 'origin' into 12741-updat…
ErlingHauan May 22, 2024
b058e24
Add null parameter for dataModelName for all tests
ErlingHauan May 22, 2024
088c60e
Remove redundant test case
ErlingHauan May 22, 2024
ba89e63
Merge branch 'main' into 12741-update-endpoint-fetching-datamodel
ErlingHauan May 22, 2024
4ed5842
Merge branch 'main' into 12741-update-endpoint-fetching-datamodel
ErlingHauan May 22, 2024
56c373c
Merge branch '12741-update-endpoint-fetching-datamodel' of https://gi…
ErlingHauan May 22, 2024
c6e7453
Merge branch '12741-update-endpoint-fetching-datamodel' of https://gi…
ErlingHauan May 22, 2024
d91b76a
Merge branch '12741-update-endpoint-fetching-datamodel' of https://gi…
ErlingHauan May 22, 2024
388b31b
Make dataModelNames into 'undefined' instead of 'null', and into 'tes…
ErlingHauan May 24, 2024
9b9ba70
Add 'test-data-model' where missing
ErlingHauan May 24, 2024
78cfd43
Fix merge conflicts
ErlingHauan May 24, 2024
1bbb149
Fix failing tests
ErlingHauan May 24, 2024
582399b
Add GetModelNameFromLayoutSet method and delete old code
ErlingHauan May 27, 2024
6eeac5b
Add fallback to ApplicationMetadata in GetModelName
ErlingHauan May 28, 2024
3c8e0b9
Dotnet format
ErlingHauan May 28, 2024
39cf8d3
Move layoutSetMocks into a new file
ErlingHauan May 28, 2024
11fe166
Resolve merge conflict
ErlingHauan May 28, 2024
8a9db8e
Rename layoutSetMock -> layoutSetsMock
ErlingHauan May 28, 2024
71bf2c4
Rename layoutSetMock -> layoutSetsMock
ErlingHauan May 28, 2024
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
5 changes: 3 additions & 2 deletions backend/src/Designer/Controllers/AppDevelopmentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,16 @@ public async Task<IActionResult> GetAppMetadataDataModelIds(string org, string a
/// <param name="org">Unique identifier of the organisation responsible for the app.</param>
/// <param name="app">Application identifier which is unique within an organisation.</param>
/// <param name="layoutSetName">Name of current layoutSet in ux-editor that edited layout belongs to</param>
/// <param name="dataModelName">Name of data model to fetch</param>
/// <param name="cancellationToken">An <see cref="CancellationToken"/> that observes if operation is cancelled.</param>
/// <returns>The model as JSON</returns>
[HttpGet]
[UseSystemTextJson]
[Route("model-metadata")]
public async Task<IActionResult> GetModelMetadata(string org, string app, [FromQuery] string layoutSetName, CancellationToken cancellationToken)
public async Task<IActionResult> GetModelMetadata(string org, string app, [FromQuery] string layoutSetName, [FromQuery] string dataModelName, CancellationToken cancellationToken)
{
string developer = AuthenticationHelper.GetDeveloperUserName(HttpContext);
ModelMetadata modelMetadata = await _appDevelopmentService.GetModelMetadata(AltinnRepoEditingContext.FromOrgRepoDeveloper(org, app, developer), layoutSetName, cancellationToken);
ModelMetadata modelMetadata = await _appDevelopmentService.GetModelMetadata(AltinnRepoEditingContext.FromOrgRepoDeveloper(org, app, developer), layoutSetName, dataModelName, cancellationToken);
return Ok(modelMetadata);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,24 +190,33 @@ public async Task<IEnumerable<string>> GetAppMetadataModelIds(AltinnRepoEditingC
}

/// <inheritdoc />
public async Task<ModelMetadata> GetModelMetadata(AltinnRepoEditingContext altinnRepoEditingContext,
string layoutSetName, CancellationToken cancellationToken = default)
public async Task<ModelMetadata> GetModelMetadata(AltinnRepoEditingContext altinnRepoEditingContext, string layoutSetName, string dataModelName, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
AltinnAppGitRepository altinnAppGitRepository =
_altinnGitRepositoryFactory.GetAltinnAppGitRepository(altinnRepoEditingContext.Org,
altinnRepoEditingContext.Repo, altinnRepoEditingContext.Developer);
ApplicationMetadata applicationMetadata =
await altinnAppGitRepository.GetApplicationMetadata(cancellationToken);
AltinnAppGitRepository altinnAppGitRepository = _altinnGitRepositoryFactory.GetAltinnAppGitRepository(altinnRepoEditingContext.Org, altinnRepoEditingContext.Repo, altinnRepoEditingContext.Developer);
ApplicationMetadata applicationMetadata = await altinnAppGitRepository.GetApplicationMetadata(cancellationToken);

string modelPath;
ModelMetadata modelMetadata;

if (dataModelName != null)
standeren marked this conversation as resolved.
Show resolved Hide resolved
{
modelPath = $"App/models/{dataModelName}.schema.json";
modelMetadata = await _schemaModelService.GenerateModelMetadataFromJsonSchema(altinnRepoEditingContext, modelPath, cancellationToken);
return modelMetadata;
}

// get task_id since we might not maintain dataType ref in layout-sets-file
standeren marked this conversation as resolved.
Show resolved Hide resolved
string taskId = await GetTaskIdBasedOnLayoutSet(altinnRepoEditingContext, layoutSetName, cancellationToken);
string modelName = GetModelName(applicationMetadata, taskId);

if (string.IsNullOrEmpty(modelName))
{
return new ModelMetadata();
}
string modelPath = $"App/models/{modelName}.schema.json";
ModelMetadata modelMetadata = await _schemaModelService.GenerateModelMetadataFromJsonSchema(altinnRepoEditingContext, modelPath, cancellationToken);

modelPath = $"App/models/{modelName}.schema.json";
modelMetadata = await _schemaModelService.GenerateModelMetadataFromJsonSchema(altinnRepoEditingContext, modelPath, cancellationToken);
return modelMetadata;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ public Task<IEnumerable<string>> GetAppMetadataModelIds(
/// </summary>
/// <param name="altinnRepoEditingContext">An <see cref="AltinnRepoEditingContext"/>.</param>
/// <param name="layoutSetName">Name of layoutSet to fetch corresponding model metadata for</param>
/// <param name="dataModelName">Name of data model to fetch</param>
/// <param name="cancellationToken">An <see cref="CancellationToken"/> that observes if operation is cancelled.</param>
/// <returns>The model metadata for a given layout set.</returns>
public Task<ModelMetadata> GetModelMetadata(
AltinnRepoEditingContext altinnRepoEditingContext, [CanBeNull] string layoutSetName,
AltinnRepoEditingContext altinnRepoEditingContext, [CanBeNull] string layoutSetName, [CanBeNull] string dataModelName,
CancellationToken cancellationToken = default);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,57 @@ public GetModelMetadataTests(WebApplicationFactory<Program> factory) : base(fact
}

[Theory]
[InlineData("ttd", "app-with-layoutsets", "testUser", "layoutSet1", "TestData/Model/Metadata/datamodel.json")]
[InlineData("ttd", "app-without-layoutsets", "testUser", null, "TestData/Model/Metadata/datamodel.json")]
public async Task GetModelMetadata_Should_Return_ModelMetadata(string org, string app, string developer, string layoutSetName, string expectedModelMetadataPath)
[InlineData("ttd", "app-with-layoutsets", "testUser", "layoutSet1", null)]
[InlineData("ttd", "app-without-layoutsets", "testUser", null, null)]
public async Task GetModelMetadata_Should_Return_ModelMetadata_Based_On_LayoutSet_When_DataModelName_Is_Undefined(string org, string app, string developer, string layoutSetName, string dataModelName)
{
string targetRepository = TestDataHelper.GenerateTestRepoName();
await CopyRepositoryForTest(org, app, developer, targetRepository);

string expectedModelMetadata = await AddModelMetadataToRepo(TestRepoPath, expectedModelMetadataPath);

string url = $"{VersionPrefix(org, targetRepository)}/model-metadata?layoutSetName={layoutSetName}";
// Arrange
(string url, string expectedModelMetadata) = await ArrangeGetModelMetadataTest(org, app, developer, layoutSetName, dataModelName);
using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, url);

// Act
using var response = await HttpClient.SendAsync(httpRequestMessage);
string responseContent = await response.Content.ReadAsStringAsync();

// Assert
response.StatusCode.Should().Be(HttpStatusCode.OK);
responseContent.Should().Be(expectedModelMetadata);
JsonUtils.DeepEquals(expectedModelMetadata, responseContent).Should().BeTrue();
}

[Theory]
[InlineData("ttd", "app-with-layoutsets", "testUser", "layoutSet1", "datamodel")]
[InlineData("ttd", "app-without-layoutsets", "testUser", null, "datamodel")]
public async Task GetModelMetadata_Should_Return_ModelMetadata_When_DataModelName_Is_Specified(string org, string app, string developer, string layoutSetName, string dataModelName)
{
// Arrange
(string url, string expectedModelMetadata) = await ArrangeGetModelMetadataTest(org, app, developer, layoutSetName, dataModelName);
using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, url);

// Act
using var response = await HttpClient.SendAsync(httpRequestMessage);
string responseContent = await response.Content.ReadAsStringAsync();

// Assert
response.StatusCode.Should().Be(HttpStatusCode.OK);
responseContent.Should().Be(expectedModelMetadata);
JsonUtils.DeepEquals(expectedModelMetadata, responseContent).Should().BeTrue();
}

[Theory]
[InlineData("ttd", "app-with-layoutsets", "testUser", "layoutSet3")]
[InlineData("ttd", "app-without-layoutsets-mismatch-modelname", "testUser", null)]
public async Task GetModelMetadata_Should_Return_404_When_No_Corresponding_Datamodel_Exists(string org, string app, string developer, string layoutSetName)
[InlineData("ttd", "app-with-layoutsets", "testUser", "layoutSet3", null)]
[InlineData("ttd", "app-without-layoutsets-mismatch-modelname", "testUser", null, null)]
[InlineData("ttd", "app-with-layoutsets", "testUser", null, "non-existing-dataModelName")]
standeren marked this conversation as resolved.
Show resolved Hide resolved
public async Task GetModelMetadata_Should_Return_404_When_No_Corresponding_Datamodel_Exists(string org, string app, string developer, string layoutSetName, string dataModelName)
{
string targetRepository = TestDataHelper.GenerateTestRepoName();
await CopyRepositoryForTest(org, app, developer, targetRepository);

string url = $"{VersionPrefix(org, targetRepository)}/model-metadata?layoutSetName={layoutSetName}";
// Arrange
(string url, _) = await ArrangeGetModelMetadataTest(org, app, developer, layoutSetName, dataModelName);
using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, url);

// Act
using var response = await HttpClient.SendAsync(httpRequestMessage);

// Assert
response.StatusCode.Should().Be(HttpStatusCode.NotFound);
}

Expand All @@ -63,5 +81,18 @@ private async Task<string> AddModelMetadataToRepo(string createdFolderPath, stri
await File.WriteAllTextAsync(filePath, modelMetadata);
return modelMetadata;
}

private async Task<(string url, string expectedModelMetadata)> ArrangeGetModelMetadataTest(string org, string app, string developer, string layoutSetName, string dataModelName)
{
string targetRepository = TestDataHelper.GenerateTestRepoName();
await CopyRepositoryForTest(org, app, developer, targetRepository);

const string expectedModelMetadataPath = "TestData/Model/Metadata/datamodel.json";
string expectedModelMetadata = await AddModelMetadataToRepo(TestRepoPath, expectedModelMetadataPath);

string url = $"{VersionPrefix(org, targetRepository)}/model-metadata?layoutSetName={layoutSetName}&dataModelName={dataModelName}";

return (url, expectedModelMetadata);
}
}
}
2 changes: 1 addition & 1 deletion frontend/packages/shared/src/api/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const widgetSettingsPath = (org, app) => `${basePath}/${org}/${app}/app-d
export const optionListIdsPath = (org, app) => `${basePath}/${org}/${app}/app-development/option-list-ids`; // Get
export const ruleConfigPath = (org, app, layoutSetName) => `${basePath}/${org}/${app}/app-development/rule-config?${s({ layoutSetName })}`; // Get, Post
export const appMetadataModelIdsPath = (org, app, onlyUnReferenced) => `${basePath}/${org}/${app}/app-development/model-ids?${s({ onlyUnReferenced })}`; // Get
export const datamodelMetadataPath = (org, app, layoutSetName) => `${basePath}/${org}/${app}/app-development/model-metadata?${s({ layoutSetName })}`; // Get
export const datamodelMetadataPath = (org, app, layoutSetName, dataModelName) => `${basePath}/${org}/${app}/app-development/model-metadata?${s({ layoutSetName })}&${s({ dataModelName })}`; // Get
export const layoutNamesPath = (org, app) => `${basePath}/${org}/${app}/app-development/layout-names`; // Get
export const layoutSetsPath = (org, app) => `${basePath}/${org}/${app}/app-development/layout-sets`; // Get
export const layoutSetPath = (org, app, layoutSetIdToUpdate) => `${basePath}/${org}/${app}/app-development/layout-set/${layoutSetIdToUpdate}`; // Put, Delete
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/shared/src/api/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const getAppReleases = (owner: string, app: string) => get<AppReleasesRes
export const getAppVersion = (org: string, app: string) => get<AppVersion>(appVersionPath(org, app));
export const getBranchStatus = (owner: string, app: string, branch: string) => get<BranchStatus>(branchStatusPath(owner, app, branch));
export const getDatamodel = (owner: string, app: string, modelPath: string) => get<JsonSchema>(datamodelPath(owner, app, modelPath));
export const getDatamodelMetadata = (owner: string, app: string, layoutSetName: string) => get<DatamodelMetadataResponse>(datamodelMetadataPath(owner, app, layoutSetName));
export const getDatamodelMetadata = (owner: string, app: string, layoutSetName: string, dataModelName: string) => get<DatamodelMetadataResponse>(datamodelMetadataPath(owner, app, layoutSetName, dataModelName));
export const getDatamodelsJson = (owner: string, app: string) => get<DatamodelMetadataJson[]>(datamodelsPath(owner, app));
export const getDatamodelsXsd = (owner: string, app: string) => get<DatamodelMetadataXsd[]>(datamodelsXsdPath(owner, app));
export const getDeployPermissions = (owner: string, app: string) => get<string[]>(deployPermissionsPath(owner, app));
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/ux-editor-v3/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function App() {
const { data: layoutSets, isSuccess: areLayoutSetsFetched } = useLayoutSetsQuery(org, app);
const { isSuccess: areWidgetsFetched, isError: widgetFetchedError } = useWidgetsQuery(org, app);
const { isSuccess: isDatamodelFetched, isError: dataModelFetchedError } =
useDatamodelMetadataQuery(org, app, selectedLayoutSet);
useDatamodelMetadataQuery(org, app, selectedLayoutSet, undefined);
const { isSuccess: areTextResourcesFetched } = useTextResourcesQuery(org, app);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { mockUseTranslation } from '@studio/testing/mocks/i18nMock';
import { ComponentTypeV3 } from 'app-shared/types/ComponentTypeV3';
import { useDatamodelMetadataQuery } from '../../hooks/queries/useDatamodelMetadataQuery';
import type { DatamodelMetadataResponse } from 'app-shared/types/api';
import { layoutSet1NameMock } from '@altinn/ux-editor-v3/testing/layoutMock';
import { dataModelNameMock, layoutSet1NameMock } from '@altinn/ux-editor-v3/testing/layoutMock';
import { app, org } from '@studio/testing/testids';

const user = userEvent.setup();
Expand Down Expand Up @@ -226,7 +226,8 @@ const waitForData = async () => {
const dataModelMetadataResult = renderHookWithMockStore(
{},
{ getDatamodelMetadata },
)(() => useDatamodelMetadataQuery(org, app, layoutSet1NameMock)).renderHookResult.result;
)(() => useDatamodelMetadataQuery(org, app, layoutSet1NameMock, dataModelNameMock))
.renderHookResult.result;
await waitFor(() => expect(dataModelMetadataResult.current.isSuccess).toBe(true));
await waitFor(() => expect(layoutSchemaResult.current[0].isSuccess).toBe(true));
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const EditFormContainer = ({

const { selectedLayoutSet } = useAppContext();
const { data: formLayouts } = useFormLayoutsQuery(org, app, selectedLayoutSet);
const { data: dataModel } = useDatamodelMetadataQuery(org, app, selectedLayoutSet);
const { data: dataModel } = useDatamodelMetadataQuery(org, app, selectedLayoutSet, undefined);
const { components, containers } = useSelectedFormLayout();
const textResources: ITextResource[] = useTextResourcesSelector<ITextResource[]>(
textResourcesByLanguageSelector(DEFAULT_LANGUAGE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const DataSourceValue = ({
const { org, app } = useStudioUrlParams();
const { selectedLayoutSet } = useAppContext();
// TODO: Show spinner when isLoading
const datamodelQuery = useDatamodelMetadataQuery(org, app, selectedLayoutSet);
const datamodelQuery = useDatamodelMetadataQuery(org, app, selectedLayoutSet, undefined);
const { data: formLayoutsData } = useFormLayoutsQuery(org, app, selectedLayoutSet);
const t = useText();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { textMock } from '@studio/testing/mocks/i18nMock';
import { useDatamodelMetadataQuery } from '../../hooks/queries/useDatamodelMetadataQuery';
import userEvent from '@testing-library/user-event';
import type { DatamodelMetadataResponse } from 'app-shared/types/api';
import { layoutSet1NameMock } from '@altinn/ux-editor-v3/testing/layoutMock';
import { dataModelNameMock, layoutSet1NameMock } from '@altinn/ux-editor-v3/testing/layoutMock';
import { app, org } from '@studio/testing/testids';

const getDatamodelMetadata = () =>
Expand Down Expand Up @@ -55,13 +55,14 @@ const getDatamodelMetadata = () =>
const user = userEvent.setup();

const waitForData = async () => {
const datamodelMetadatResult = renderHookWithMockStore(
const datamodelMetadataResult = renderHookWithMockStore(
{},
{
getDatamodelMetadata,
},
)(() => useDatamodelMetadataQuery(org, app, layoutSet1NameMock)).renderHookResult.result;
await waitFor(() => expect(datamodelMetadatResult.current.isSuccess).toBe(true));
)(() => useDatamodelMetadataQuery(org, app, layoutSet1NameMock, dataModelNameMock))
.renderHookResult.result;
await waitFor(() => expect(datamodelMetadataResult.current.isSuccess).toBe(true));
};

const render = async ({ dataModelBindings = {}, handleComponentChange = jest.fn() } = {}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const SelectDataModelComponent = ({
}: ISelectDataModelProps) => {
const { org, app } = useStudioUrlParams();
const { selectedLayoutSet } = useAppContext();
const { data } = useDatamodelMetadataQuery(org, app, selectedLayoutSet);
const { data } = useDatamodelMetadataQuery(org, app, selectedLayoutSet, undefined);
const [dataModelElementNames, setDataModelElementNames] = React.useState<Option[]>([]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const EditDataModelBindings = ({
}: EditDataModelBindingsProps) => {
const { org, app } = useStudioUrlParams();
const { selectedLayoutSet } = useAppContext();
const { data } = useDatamodelMetadataQuery(org, app, selectedLayoutSet);
const { data } = useDatamodelMetadataQuery(org, app, selectedLayoutSet, undefined);
const t = useText();

const handleDataModelChange = (selectedDataModelElement: string, key = 'simpleBinding') => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ export const useDatamodelMetadataQuery = (
org: string,
app: string,
layoutSetName: string,
dataModelName: string,
): UseQueryResult<DatamodelFieldElement[]> => {
const { getDatamodelMetadata } = useServicesContext();
return useQuery<DatamodelFieldElement[]>({
queryKey: [QueryKey.DatamodelMetadata, org, app, layoutSetName],
queryKey: [QueryKey.DatamodelMetadata, org, app, layoutSetName, dataModelName],
queryFn: () =>
getDatamodelMetadata(org, app, layoutSetName).then((res) => {
getDatamodelMetadata(org, app, layoutSetName, dataModelName).then((res) => {
const dataModelFields: DatamodelFieldElement[] = [];
Object.keys(res.elements).forEach((dataModelField) => {
if (dataModelField) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/ux-editor-v3/src/testing/layoutMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const layout1NameMock = 'Side1';
export const layout2NameMock = 'Side2';
export const layoutSet1NameMock = 'test-layout-set';
export const layoutSet2NameMock = 'test-layout-set-2';

export const dataModelNameMock = 'test-data-model';
export const baseContainerIdMock = BASE_CONTAINER_ID;
export const component1IdMock = 'Component-1';
export const component1TypeMock = ComponentTypeV3.Input;
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/ux-editor/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function App() {
const { selectedFormLayoutSetName } = useAppContext();
const { isSuccess: areWidgetsFetched, isError: widgetFetchedError } = useWidgetsQuery(org, app);
const { isSuccess: isDatamodelFetched, isError: dataModelFetchedError } =
useDatamodelMetadataQuery(org, app, selectedFormLayoutSetName);
useDatamodelMetadataQuery(org, app, selectedFormLayoutSetName, undefined);
const { isSuccess: areTextResourcesFetched } = useTextResourcesQuery(org, app);

const componentIsReady = areWidgetsFetched && isDatamodelFetched && areTextResourcesFetched;
Expand Down
Loading
Loading