Skip to content

Commit f5a8e72

Browse files
committed
convert query param to enum format, update test
1 parent 910b81f commit f5a8e72

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

api/__tests__/migrate.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('api/migrate', () => {
1919
const mockAppId = 67890;
2020
const mockMigrationId = 54321;
2121
const mockPlatformVersion = '2025.2';
22+
const convertedPlatformVersion = 'V2025_2';
2223
const mockProjectName = 'Test Project';
2324
const mockComponentUids = { 'component-1': 'uid-1', 'component-2': 'uid-2' };
2425

@@ -59,7 +60,7 @@ describe('api/migrate', () => {
5960
expect(http.get).toHaveBeenCalledWith(mockAccountId, {
6061
url: 'dfs/migrations/v2/list-apps',
6162
params: {
62-
platformVersion: mockPlatformVersion,
63+
platformVersion: convertedPlatformVersion,
6364
},
6465
});
6566
expect(result).toEqual(mockResponse);
@@ -82,7 +83,7 @@ describe('api/migrate', () => {
8283
url: 'dfs/migrations/v2/migrations',
8384
data: {
8485
applicationId: mockAppId,
85-
platformVersion: 'V2025_2',
86+
platformVersion: convertedPlatformVersion,
8687
},
8788
});
8889
expect(result).toEqual(mockResponse);

api/migrate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export async function listAppsForMigration(
100100
return http.get<ListAppsResponse>(accountId, {
101101
url: `${MIGRATIONS_API_PATH_V2}/list-apps`,
102102
params: {
103-
platformVersion,
103+
platformVersion: mapPlatformVersionToEnum(platformVersion),
104104
},
105105
});
106106
}

0 commit comments

Comments
 (0)