mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-17 13:54:51 +01:00
Fix unit tests
This commit is contained in:
parent
cbda2a3325
commit
e2dee7ac0f
@ -300,6 +300,7 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
isReadOnly={false}
|
||||||
/>
|
/>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
<PivotItem
|
<PivotItem
|
||||||
|
@ -740,12 +740,38 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the Mo
|
|||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`createDatabaseTreeNodes generates the correct tree structure for the SQL API, on Fabric non read-only 1`] = `
|
exports[`createDatabaseTreeNodes generates the correct tree structure for the SQL API, on Fabric non read-only (native) 1`] = `
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"children": undefined,
|
"children": [
|
||||||
|
{
|
||||||
|
"contextMenu": [
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "New SQL Query",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "Delete Container",
|
||||||
|
"onClick": [Function],
|
||||||
|
"styleClass": "deleteCollectionMenuItem",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"id": "",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Items",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Settings",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
],
|
||||||
"className": "collectionNode",
|
"className": "collectionNode",
|
||||||
"contextMenu": [
|
"contextMenu": [
|
||||||
{
|
{
|
||||||
@ -772,7 +798,38 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the SQ
|
|||||||
"onExpanded": [Function],
|
"onExpanded": [Function],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"children": undefined,
|
"children": [
|
||||||
|
{
|
||||||
|
"contextMenu": [
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "New SQL Query",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "Delete Container",
|
||||||
|
"onClick": [Function],
|
||||||
|
"styleClass": "deleteCollectionMenuItem",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"id": "",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Items",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Settings",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Conflicts",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
],
|
||||||
"className": "collectionNode",
|
"className": "collectionNode",
|
||||||
"contextMenu": [
|
"contextMenu": [
|
||||||
{
|
{
|
||||||
@ -806,12 +863,6 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the SQ
|
|||||||
"label": "New Container",
|
"label": "New Container",
|
||||||
"onClick": [Function],
|
"onClick": [Function],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"iconSrc": {},
|
|
||||||
"label": "Delete Database",
|
|
||||||
"onClick": [Function],
|
|
||||||
"styleClass": "deleteDatabaseMenuItem",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
"iconSrc": <DatabaseRegular
|
"iconSrc": <DatabaseRegular
|
||||||
fontSize={16}
|
fontSize={16}
|
||||||
@ -826,7 +877,33 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the SQ
|
|||||||
{
|
{
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"children": undefined,
|
"children": [
|
||||||
|
{
|
||||||
|
"contextMenu": [
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "New SQL Query",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "Delete Container",
|
||||||
|
"onClick": [Function],
|
||||||
|
"styleClass": "deleteCollectionMenuItem",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"id": "sampleItems",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Items",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sampleSettings",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Settings",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
],
|
||||||
"className": "collectionNode",
|
"className": "collectionNode",
|
||||||
"contextMenu": [
|
"contextMenu": [
|
||||||
{
|
{
|
||||||
@ -860,12 +937,6 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the SQ
|
|||||||
"label": "New Container",
|
"label": "New Container",
|
||||||
"onClick": [Function],
|
"onClick": [Function],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"iconSrc": {},
|
|
||||||
"label": "Delete Database",
|
|
||||||
"onClick": [Function],
|
|
||||||
"styleClass": "deleteDatabaseMenuItem",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
"iconSrc": <DatabaseRegular
|
"iconSrc": <DatabaseRegular
|
||||||
fontSize={16}
|
fontSize={16}
|
||||||
@ -880,7 +951,88 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the SQ
|
|||||||
{
|
{
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"children": undefined,
|
"children": [
|
||||||
|
{
|
||||||
|
"contextMenu": [
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "New SQL Query",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"iconSrc": {},
|
||||||
|
"label": "Delete Container",
|
||||||
|
"onClick": [Function],
|
||||||
|
"styleClass": "deleteCollectionMenuItem",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"id": "",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Items",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "",
|
||||||
|
"isSelected": [Function],
|
||||||
|
"label": "Settings",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"label": "string",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "HasNulls: false",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"label": "street",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"label": "string",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "HasNulls: true",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"label": "line2",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"label": "number",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "HasNulls: false",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"label": "zip",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"label": "address",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"label": "string",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "HasNulls: false",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"label": "orderId",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"label": "Schema",
|
||||||
|
"onClick": [Function],
|
||||||
|
},
|
||||||
|
],
|
||||||
"className": "collectionNode",
|
"className": "collectionNode",
|
||||||
"contextMenu": [
|
"contextMenu": [
|
||||||
{
|
{
|
||||||
@ -919,12 +1071,6 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the SQ
|
|||||||
"label": "New Container",
|
"label": "New Container",
|
||||||
"onClick": [Function],
|
"onClick": [Function],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"iconSrc": {},
|
|
||||||
"label": "Delete Database",
|
|
||||||
"onClick": [Function],
|
|
||||||
"styleClass": "deleteDatabaseMenuItem",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
"iconSrc": <DatabaseRegular
|
"iconSrc": <DatabaseRegular
|
||||||
fontSize={16}
|
fontSize={16}
|
||||||
@ -939,7 +1085,7 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the SQ
|
|||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`createDatabaseTreeNodes generates the correct tree structure for the SQL API, on Fabric read-only 1`] = `
|
exports[`createDatabaseTreeNodes generates the correct tree structure for the SQL API, on Fabric read-only (mirrored) 1`] = `
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"children": [
|
"children": [
|
||||||
|
@ -363,18 +363,28 @@ describe("createDatabaseTreeNodes", () => {
|
|||||||
|
|
||||||
it.each<[string, Platform, boolean, Partial<DataModels.DatabaseAccountExtendedProperties>, Partial<UserContext>]>([
|
it.each<[string, Platform, boolean, Partial<DataModels.DatabaseAccountExtendedProperties>, Partial<UserContext>]>([
|
||||||
[
|
[
|
||||||
"the SQL API, on Fabric read-only",
|
"the SQL API, on Fabric read-only (mirrored)",
|
||||||
Platform.Fabric,
|
Platform.Fabric,
|
||||||
false,
|
false,
|
||||||
{ capabilities: [], enableMultipleWriteLocations: true },
|
{ capabilities: [], enableMultipleWriteLocations: true },
|
||||||
{ fabricContext: { isReadOnly: true } as FabricContext<CosmosDbArtifactType> },
|
{
|
||||||
|
fabricContext: {
|
||||||
|
isReadOnly: true,
|
||||||
|
artifactType: CosmosDbArtifactType.MIRRORED_KEY,
|
||||||
|
} as FabricContext<CosmosDbArtifactType>,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"the SQL API, on Fabric non read-only",
|
"the SQL API, on Fabric non read-only (native)",
|
||||||
Platform.Fabric,
|
Platform.Fabric,
|
||||||
false,
|
false,
|
||||||
{ capabilities: [], enableMultipleWriteLocations: true },
|
{ capabilities: [], enableMultipleWriteLocations: true },
|
||||||
{ fabricContext: { isReadOnly: false } as FabricContext<CosmosDbArtifactType> },
|
{
|
||||||
|
fabricContext: {
|
||||||
|
isReadOnly: false,
|
||||||
|
artifactType: CosmosDbArtifactType.NATIVE,
|
||||||
|
} as FabricContext<CosmosDbArtifactType>,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"the SQL API, on Portal",
|
"the SQL API, on Portal",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user