|
@@ -5,6 +5,8 @@ import { RouteParams } from 'lib/paths';
|
|
const clusterName = 'test-cluster-name';
|
|
const clusterName = 'test-cluster-name';
|
|
const groupId = 'test-group-id';
|
|
const groupId = 'test-group-id';
|
|
const schemaId = 'test-schema-id';
|
|
const schemaId = 'test-schema-id';
|
|
|
|
+const schemaIdWithNonAsciiChars = 'test/test';
|
|
|
|
+const schemaIdWithNonAsciiCharsEncoded = 'test%2Ftest';
|
|
const topicId = 'test-topic-id';
|
|
const topicId = 'test-topic-id';
|
|
const brokerId = 'test-Broker-id';
|
|
const brokerId = 'test-Broker-id';
|
|
const connectName = 'test-connect-name';
|
|
const connectName = 'test-connect-name';
|
|
@@ -112,6 +114,13 @@ describe('Paths', () => {
|
|
expect(paths.clusterSchemaPath()).toEqual(
|
|
expect(paths.clusterSchemaPath()).toEqual(
|
|
paths.clusterSchemaPath(RouteParams.clusterName, RouteParams.subject)
|
|
paths.clusterSchemaPath(RouteParams.clusterName, RouteParams.subject)
|
|
);
|
|
);
|
|
|
|
+ expect(
|
|
|
|
+ paths.clusterSchemaPath(clusterName, schemaIdWithNonAsciiChars)
|
|
|
|
+ ).toEqual(
|
|
|
|
+ `${paths.clusterSchemasPath(
|
|
|
|
+ clusterName
|
|
|
|
+ )}/${schemaIdWithNonAsciiCharsEncoded}`
|
|
|
|
+ );
|
|
});
|
|
});
|
|
it('clusterSchemaEditPath', () => {
|
|
it('clusterSchemaEditPath', () => {
|
|
expect(paths.clusterSchemaEditPath(clusterName, schemaId)).toEqual(
|
|
expect(paths.clusterSchemaEditPath(clusterName, schemaId)).toEqual(
|
|
@@ -120,6 +129,11 @@ describe('Paths', () => {
|
|
expect(paths.clusterSchemaEditPath()).toEqual(
|
|
expect(paths.clusterSchemaEditPath()).toEqual(
|
|
paths.clusterSchemaEditPath(RouteParams.clusterName, RouteParams.subject)
|
|
paths.clusterSchemaEditPath(RouteParams.clusterName, RouteParams.subject)
|
|
);
|
|
);
|
|
|
|
+ expect(
|
|
|
|
+ paths.clusterSchemaEditPath(clusterName, schemaIdWithNonAsciiChars)
|
|
|
|
+ ).toEqual(
|
|
|
|
+ `${paths.clusterSchemaPath(clusterName, schemaIdWithNonAsciiChars)}/edit`
|
|
|
|
+ );
|
|
});
|
|
});
|
|
it('clusterSchemaComparePath', () => {
|
|
it('clusterSchemaComparePath', () => {
|
|
expect(paths.clusterSchemaComparePath(clusterName, schemaId)).toEqual(
|
|
expect(paths.clusterSchemaComparePath(clusterName, schemaId)).toEqual(
|