Upgrade typescript to 4.9.5 and jest to 29.7.0 (and related packages) (#1884)

* Upgrade typescript to 4.9.5

* Fix compile issue and put back files in tsconfig.strict.json

* Update test snapshots

* Fix jest tests by upgrading jest and other related packages.

* Attempt to fix playwright test

* Revert "Attempt to fix playwright test"

This reverts commit 8293f34c9c.

* 2nd attempt to fix example test

* fix waitFor in playwright

* Remove unused describe section

* Attempt to fix e2e test

* Revert "Attempt to fix e2e test"

This reverts commit 9745bcd2ef.

* Upgrade playwright to latest

* Revert "Upgrade playwright to latest"

This reverts commit e2ea1d0189.

* Error test on e2e

* Revert "Error test on e2e"

This reverts commit 124e3764f7.

* Try to select dropdown item by xpath selector

* Revert "Try to select dropdown item by xpath selector"

This reverts commit 8eb42a64e2.

* Attempt to wait until page is fully loaded

* Revert "Attempt to wait until page is fully loaded"

This reverts commit bb43fcea6e.

* Use playwright selectOption to select dropdown option

* Revert "Use playwright selectOption to select dropdown option"

This reverts commit daa8cd0930.

* Select dropdown option with playwright api instead of manual click

* c7ab4c7ecf7b05f32a85568bce1a667ad8c62703Revert "Select dropdown option with playwright api instead of manual click"

This reverts commit c7ab4c7ecf.

* Wait for 5s after dropdown click

* Revert "Wait for 5s after dropdown click"

This reverts commit 847e9ad33f.

* Try forcing click

* Revert "Try forcing click"

This reverts commit 29b9fa1bda.

* Force click on the dropdown and set viewport size bigger.

* Force click on the dropdown and set viewport size bigger.

* try force clicking option

* Skip container test on webkit

* Add branded browsers to e2e tests

---------

Co-authored-by: Ashley Stanton-Nurse <ashleyst@microsoft.com>
This commit is contained in:
Laurent Nguyen
2024-07-31 00:41:41 +02:00
committed by GitHub
parent 0a1d16de1b
commit bcd8b7229f
112 changed files with 22078 additions and 24487 deletions

View File

@@ -6,8 +6,8 @@ exports[`IndexingPolicyRefreshComponent renders 1`] = `
>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},

View File

@@ -3,7 +3,7 @@
exports[`AddMongoIndexComponent renders 1`] = `
<Stack
tokens={
Object {
{
"childrenGap": 5,
}
}
@@ -11,7 +11,7 @@ exports[`AddMongoIndexComponent renders 1`] = `
<Stack
horizontal={true}
tokens={
Object {
{
"childrenGap": 20,
}
}
@@ -21,8 +21,8 @@ exports[`AddMongoIndexComponent renders 1`] = `
componentRef={[Function]}
onChange={[Function]}
styles={
Object {
"root": Object {
{
"root": {
"paddingLeft": 10,
"width": 210,
},
@@ -34,12 +34,12 @@ exports[`AddMongoIndexComponent renders 1`] = `
ariaLabel="Index Type 1"
onChange={[Function]}
options={
Array [
Object {
[
{
"key": "Single",
"text": "Single Field",
},
Object {
{
"key": "Wildcard",
"text": "Wildcard",
},
@@ -48,8 +48,8 @@ exports[`AddMongoIndexComponent renders 1`] = `
placeholder="Select an index type"
selectedKey="Single"
styles={
Object {
"dropdown": Object {
{
"dropdown": {
"paddingleft": 10,
"width": 202,
},
@@ -60,7 +60,7 @@ exports[`AddMongoIndexComponent renders 1`] = `
ariaLabel="Undo Button 1"
disabled={false}
iconProps={
Object {
{
"iconName": "Undo",
}
}
@@ -70,8 +70,8 @@ exports[`AddMongoIndexComponent renders 1`] = `
<StyledMessageBar
messageBarType={1}
styles={
Object {
"root": Object {
{
"root": {
"marginLeft": 10,
},
}

View File

@@ -9,7 +9,7 @@ exports[`MongoIndexingPolicyComponent error shown for collection with compound i
exports[`MongoIndexingPolicyComponent renders 1`] = `
<Stack
tokens={
Object {
{
"childrenGap": 20,
}
}
@@ -29,14 +29,14 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
</Text>
<Stack
styles={
Object {
"root": Object {
{
"root": {
"width": 600,
},
}
}
tokens={
Object {
{
"childrenGap": 5,
}
}
@@ -47,8 +47,8 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
>
<StyledWithViewportComponent
columns={
Array [
Object {
[
{
"fieldName": "definition",
"isResizable": true,
"key": "definition",
@@ -56,7 +56,7 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
"minWidth": 100,
"name": "Definition",
},
Object {
{
"fieldName": "type",
"isResizable": true,
"key": "type",
@@ -64,7 +64,7 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
"minWidth": 100,
"name": "Type",
},
Object {
{
"fieldName": "actionButton",
"isResizable": true,
"key": "actionButton",
@@ -75,15 +75,15 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
]
}
disableSelectionZone={true}
items={Array []}
items={[]}
layoutMode={1}
onRenderRow={[Function]}
selectionMode={0}
styles={
Object {
"root": Object {
"selectors": Object {
".ms-FocusZone": Object {
{
"root": {
"selectors": {
".ms-FocusZone": {
"paddingTop": 0,
},
},
@@ -93,14 +93,14 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
/>
<Stack
styles={
Object {
"root": Object {
{
"root": {
"width": 600,
},
}
}
tokens={
Object {
{
"childrenGap": 10,
}
}
@@ -117,11 +117,11 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
</Stack>
<Separator
styles={
Object {
"root": Array [
Object {
"selectors": Object {
"::before": Object {
{
"root": [
{
"selectors": {
"::before": {
"background": undefined,
},
},
@@ -132,8 +132,8 @@ exports[`MongoIndexingPolicyComponent renders 1`] = `
/>
<Stack
styles={
Object {
"root": Object {
{
"root": {
"width": 600,
},
}

View File

@@ -47,7 +47,7 @@ describe("ScaleComponent", () => {
expect(wrapper.exists(ThroughputInputAutoPilotV3Component)).toEqual(true);
expect(wrapper.exists("#throughputApplyLongDelayMessage")).toEqual(true);
expect(wrapper.exists("#throughputApplyShortDelayMessage")).toEqual(false);
expect(wrapper.find("#throughputApplyLongDelayMessage").html()).toContain(targetThroughput);
expect(wrapper.find("#throughputApplyLongDelayMessage").html()).toContain(`${targetThroughput}`);
const newCollection = { ...collection };
const maxThroughput = 5000;
@@ -66,7 +66,7 @@ describe("ScaleComponent", () => {
wrapper = shallow(<ScaleComponent {...newProps} />);
expect(wrapper.exists("#throughputApplyShortDelayMessage")).toEqual(true);
expect(wrapper.exists("#throughputApplyLongDelayMessage")).toEqual(false);
expect(wrapper.find("#throughputApplyShortDelayMessage").html()).toContain(maxThroughput);
expect(wrapper.find("#throughputApplyShortDelayMessage").html()).toContain(`${maxThroughput}`);
});
it("autoScale disabled", () => {

View File

@@ -3,14 +3,14 @@
exports[`ComputedPropertiesComponent renders 1`] = `
<Stack
tokens={
Object {
{
"childrenGap": 5,
}
}
>
<Text
style={
Object {
{
"marginBottom": "10px",
"marginLeft": "30px",
}

View File

@@ -3,7 +3,7 @@
exports[`ConflictResolutionComponent Path text field displayed 1`] = `
<Stack
tokens={
Object {
{
"childrenGap": 20,
}
}
@@ -12,12 +12,12 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
label="Mode"
onChange={[Function]}
options={
Array [
Object {
[
{
"key": "LastWriterWins",
"text": "Last Write Wins (default)",
},
Object {
{
"key": "Custom",
"text": "Merge Procedure (custom)",
},
@@ -25,19 +25,19 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
}
selectedKey="LastWriterWins"
styles={
Object {
"flexContainer": Array [
Object {
{
"flexContainer": [
{
"columnGap": "default",
"display": "default",
"selectors": Object {
".ms-ChoiceField-field.is-checked::after": Object {
"selectors": {
".ms-ChoiceField-field.is-checked::after": {
"borderColor": undefined,
},
".ms-ChoiceField-field.is-checked::before": Object {
".ms-ChoiceField-field.is-checked::before": {
"borderColor": undefined,
},
".ms-ChoiceField-wrapper label": Object {
".ms-ChoiceField-wrapper label": {
"fontFamily": undefined,
"fontSize": 14,
"padding": "2px 5px",
@@ -55,12 +55,12 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
onChange={[Function]}
onRenderLabel={[Function]}
styles={
Object {
"fieldGroup": Object {
{
"fieldGroup": {
"borderColor": "",
"height": 25,
"selectors": Object {
":disabled": Object {
"selectors": {
":disabled": {
"backgroundColor": undefined,
"borderColor": undefined,
},
@@ -77,7 +77,7 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
<Stack
tokens={
Object {
{
"childrenGap": 20,
}
}
@@ -86,12 +86,12 @@ exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
label="Mode"
onChange={[Function]}
options={
Array [
Object {
[
{
"key": "LastWriterWins",
"text": "Last Write Wins (default)",
},
Object {
{
"key": "Custom",
"text": "Merge Procedure (custom)",
},
@@ -99,19 +99,19 @@ exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
}
selectedKey="Custom"
styles={
Object {
"flexContainer": Array [
Object {
{
"flexContainer": [
{
"columnGap": "default",
"display": "default",
"selectors": Object {
".ms-ChoiceField-field.is-checked::after": Object {
"selectors": {
".ms-ChoiceField-field.is-checked::after": {
"borderColor": "",
},
".ms-ChoiceField-field.is-checked::before": Object {
".ms-ChoiceField-field.is-checked::before": {
"borderColor": "",
},
".ms-ChoiceField-wrapper label": Object {
".ms-ChoiceField-wrapper label": {
"fontFamily": undefined,
"fontSize": 14,
"padding": "2px 5px",
@@ -129,12 +129,12 @@ exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
onChange={[Function]}
onRenderLabel={[Function]}
styles={
Object {
"fieldGroup": Object {
{
"fieldGroup": {
"borderColor": "",
"height": 25,
"selectors": Object {
":disabled": Object {
"selectors": {
":disabled": {
"backgroundColor": undefined,
"borderColor": undefined,
},

View File

@@ -3,7 +3,7 @@
exports[`IndexingPolicyComponent renders 1`] = `
<Stack
tokens={
Object {
{
"childrenGap": 5,
}
}

View File

@@ -3,7 +3,7 @@
exports[`ScaleComponent renders with correct initial notification 1`] = `
<Stack
tokens={
Object {
{
"childrenGap": 20,
}
}
@@ -14,8 +14,8 @@ exports[`ScaleComponent renders with correct initial notification 1`] = `
<Text
id="throughputApplyLongDelayMessage"
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -30,7 +30,7 @@ exports[`ScaleComponent renders with correct initial notification 1`] = `
</StyledMessageBar>
<Stack
tokens={
Object {
{
"childrenGap": 20,
}
}

View File

@@ -5,7 +5,7 @@ exports[`ToolTipLabelComponent renders 1`] = `
<Stack
horizontal={true}
tokens={
Object {
{
"childrenGap": 6,
}
}
@@ -13,7 +13,7 @@ exports[`ToolTipLabelComponent renders 1`] = `
>
<Text
style={
Object {
{
"fontWeight": 600,
}
}
@@ -22,7 +22,7 @@ exports[`ToolTipLabelComponent renders 1`] = `
</Text>
<StyledTooltipHostBase
calloutProps={
Object {
{
"gapSpace": 0,
}
}
@@ -33,8 +33,8 @@ exports[`ToolTipLabelComponent renders 1`] = `
}
directionalHint={12}
styles={
Object {
"root": Object {
{
"root": {
"display": "inline-block",
"float": "right",
},
@@ -45,8 +45,8 @@ exports[`ToolTipLabelComponent renders 1`] = `
ariaLabel="Info"
iconName="Info"
styles={
Object {
"root": Object {
{
"root": {
"marginBottom": -3,
},
}

View File

@@ -16,14 +16,14 @@ exports[`SettingsComponent renders 1`] = `
itemKey="ScaleTab"
key="ScaleTab"
style={
Object {
{
"marginTop": 20,
}
}
>
<ScaleComponent
collection={
Object {
{
"analyticalStorageTtl": [Function],
"changeFeedPolicy": [Function],
"computedProperties": [Function],
@@ -36,7 +36,7 @@ exports[`SettingsComponent renders 1`] = `
"onRefreshResourcesClick": [Function],
"phoenixClient": PhoenixClient {
"armResourceId": undefined,
"retryOptions": Object {
"retryOptions": {
"maxTimeout": 5000,
"minTimeout": 5000,
"retries": 3,
@@ -60,16 +60,16 @@ exports[`SettingsComponent renders 1`] = `
"id": [Function],
"indexingPolicy": [Function],
"offer": [Function],
"partitionKey": Object {
"partitionKey": {
"kind": "hash",
"paths": Array [],
"paths": [],
"version": 2,
},
"partitionKeyProperties": Array [
"partitionKeyProperties": [
"partitionKey",
],
"readSettings": [Function],
"uniqueKeyPolicy": Object {},
"uniqueKeyPolicy": {},
"usageSizeInKB": [Function],
}
}
@@ -90,7 +90,7 @@ exports[`SettingsComponent renders 1`] = `
itemKey="SubSettingsTab"
key="SubSettingsTab"
style={
Object {
{
"marginTop": 20,
}
}
@@ -100,7 +100,7 @@ exports[`SettingsComponent renders 1`] = `
changeFeedPolicyBaseline="Off"
changeFeedPolicyVisible={false}
collection={
Object {
{
"analyticalStorageTtl": [Function],
"changeFeedPolicy": [Function],
"computedProperties": [Function],
@@ -113,7 +113,7 @@ exports[`SettingsComponent renders 1`] = `
"onRefreshResourcesClick": [Function],
"phoenixClient": PhoenixClient {
"armResourceId": undefined,
"retryOptions": Object {
"retryOptions": {
"maxTimeout": 5000,
"minTimeout": 5000,
"retries": 3,
@@ -137,16 +137,16 @@ exports[`SettingsComponent renders 1`] = `
"id": [Function],
"indexingPolicy": [Function],
"offer": [Function],
"partitionKey": Object {
"partitionKey": {
"kind": "hash",
"paths": Array [],
"paths": [],
"version": 2,
},
"partitionKeyProperties": Array [
"partitionKeyProperties": [
"partitionKey",
],
"readSettings": [Function],
"uniqueKeyPolicy": Object {},
"uniqueKeyPolicy": {},
"usageSizeInKB": [Function],
}
}
@@ -174,25 +174,25 @@ exports[`SettingsComponent renders 1`] = `
itemKey="IndexingPolicyTab"
key="IndexingPolicyTab"
style={
Object {
{
"marginTop": 20,
}
}
>
<IndexingPolicyComponent
indexingPolicyContent={
Object {
{
"automatic": true,
"excludedPaths": Array [],
"includedPaths": Array [],
"excludedPaths": [],
"includedPaths": [],
"indexingMode": "consistent",
}
}
indexingPolicyContentBaseline={
Object {
{
"automatic": true,
"excludedPaths": Array [],
"includedPaths": Array [],
"excludedPaths": [],
"includedPaths": [],
"indexingMode": "consistent",
}
}
@@ -210,14 +210,14 @@ exports[`SettingsComponent renders 1`] = `
itemKey="PartitionKeyTab"
key="PartitionKeyTab"
style={
Object {
{
"marginTop": 20,
}
}
>
<PartitionKeyComponent
collection={
Object {
{
"analyticalStorageTtl": [Function],
"changeFeedPolicy": [Function],
"computedProperties": [Function],
@@ -230,7 +230,7 @@ exports[`SettingsComponent renders 1`] = `
"onRefreshResourcesClick": [Function],
"phoenixClient": PhoenixClient {
"armResourceId": undefined,
"retryOptions": Object {
"retryOptions": {
"maxTimeout": 5000,
"minTimeout": 5000,
"retries": 3,
@@ -254,16 +254,16 @@ exports[`SettingsComponent renders 1`] = `
"id": [Function],
"indexingPolicy": [Function],
"offer": [Function],
"partitionKey": Object {
"partitionKey": {
"kind": "hash",
"paths": Array [],
"paths": [],
"version": 2,
},
"partitionKeyProperties": Array [
"partitionKeyProperties": [
"partitionKey",
],
"readSettings": [Function],
"uniqueKeyPolicy": Object {},
"uniqueKeyPolicy": {},
"usageSizeInKB": [Function],
}
}
@@ -276,7 +276,7 @@ exports[`SettingsComponent renders 1`] = `
"onRefreshResourcesClick": [Function],
"phoenixClient": PhoenixClient {
"armResourceId": undefined,
"retryOptions": Object {
"retryOptions": {
"maxTimeout": 5000,
"minTimeout": 5000,
"retries": 3,
@@ -301,23 +301,23 @@ exports[`SettingsComponent renders 1`] = `
itemKey="ComputedPropertiesTab"
key="ComputedPropertiesTab"
style={
Object {
{
"marginTop": 20,
}
}
>
<ComputedPropertiesComponent
computedPropertiesContent={
Array [
Object {
[
{
"name": "queryName",
"query": "query",
},
]
}
computedPropertiesContentBaseline={
Array [
Object {
[
{
"name": "queryName",
"query": "query",
},

View File

@@ -5,7 +5,7 @@ exports[`SettingsUtils functions render 1`] = `
<Stack>
<Text
style={
Object {
{
"fontWeight": 600,
}
}
@@ -14,7 +14,7 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
style={
Object {
{
"fontWeight": 600,
"marginTop": 15,
}
@@ -25,7 +25,7 @@ exports[`SettingsUtils functions render 1`] = `
<Stack
id="throughputSpendElement"
style={
Object {
{
"marginTop": 5,
}
}
@@ -49,7 +49,7 @@ exports[`SettingsUtils functions render 1`] = `
</Stack>
<Text
style={
Object {
{
"marginTop": 15,
}
}
@@ -63,8 +63,8 @@ exports[`SettingsUtils functions render 1`] = `
<Text
id="manualToAutoscaleDisclaimerElement"
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -81,8 +81,8 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -102,8 +102,8 @@ exports[`SettingsUtils functions render 1`] = `
<Text
id="updateThroughputDelayedApplyWarningMessage"
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -114,8 +114,8 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -134,8 +134,8 @@ exports[`SettingsUtils functions render 1`] = `
<Text
id="throughputApplyShortDelayMessage"
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -150,8 +150,8 @@ exports[`SettingsUtils functions render 1`] = `
<Text
id="throughputApplyLongDelayMessage"
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -165,8 +165,8 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -179,8 +179,8 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -191,8 +191,8 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -211,8 +211,8 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -247,15 +247,15 @@ exports[`SettingsUtils functions render 1`] = `
<Stack
horizontal={true}
tokens={
Object {
{
"childrenGap": 5,
}
}
>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -270,8 +270,8 @@ exports[`SettingsUtils functions render 1`] = `
</Stack>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},
@@ -287,8 +287,8 @@ exports[`SettingsUtils functions render 1`] = `
</Text>
<Text
styles={
Object {
"root": Object {
{
"root": {
"color": "windowtext",
"fontSize": 14,
},