Skip to content

Commit 49deb24

Browse files
committed
fix: update dynamic.available to dynamic in tests
1 parent 2f3fee3 commit 49deb24

4 files changed

Lines changed: 47 additions & 47 deletions

File tree

packages/pluggableWidgets/combobox-web/src/__tests__/MultiSelection.spec.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ describe("Combo box (Association)", () => {
4141
optionsSourceAssociationCaptionExpression: listExpression(() => "$currentObject/CountryName"),
4242
optionsSourceAssociationCustomContentType: "no",
4343
optionsSourceAssociationCustomContent: undefined,
44-
emptyOptionText: dynamic.available("Select an option 111"),
45-
ariaRequired: dynamic.available(true),
44+
emptyOptionText: dynamic("Select an option 111"),
45+
ariaRequired: dynamic(true),
4646
clearable: true,
4747
filterType: "contains",
4848
selectedItemsStyle: "text",
4949
readOnlyStyle: "bordered",
5050
lazyLoading: false,
5151
loadingType: "spinner",
52-
noOptionsText: dynamic.available("no options found"),
53-
clearButtonAriaLabel: dynamic.available("Clear selection"),
54-
removeValueAriaLabel: dynamic.available("Remove value"),
52+
noOptionsText: dynamic("no options found"),
53+
clearButtonAriaLabel: dynamic("Clear selection"),
54+
removeValueAriaLabel: dynamic("Remove value"),
5555
selectAllButton: true, // Causes +1 option to be added to the menu
56-
selectAllButtonCaption: dynamic.available("Select All"),
56+
selectAllButtonCaption: dynamic("Select All"),
5757
selectionMethod: "checkbox",
58-
a11ySelectedValue: dynamic.available("Selected value:"),
59-
a11yOptionsAvailable: dynamic.available("Options available:"),
60-
a11yInstructions: dynamic.available("a11yInstructions"),
58+
a11ySelectedValue: dynamic("Selected value:"),
59+
a11yOptionsAvailable: dynamic("Options available:"),
60+
a11yInstructions: dynamic("a11yInstructions"),
6161
showFooter: false,
6262
databaseAttributeString: new EditableValueBuilder<string | Big>().build(),
6363
optionsSourceDatabaseCaptionType: "attribute",
@@ -66,23 +66,23 @@ describe("Combo box (Association)", () => {
6666
staticAttribute: new EditableValueBuilder<string>().build(),
6767
optionsSourceStaticDataSource: [
6868
{
69-
staticDataSourceValue: dynamic.available("value1"),
69+
staticDataSourceValue: dynamic("value1"),
7070
staticDataSourceCustomContent: undefined,
71-
staticDataSourceCaption: dynamic.available("caption1")
71+
staticDataSourceCaption: dynamic("caption1")
7272
},
7373
{
74-
staticDataSourceValue: dynamic.available("value2"),
74+
staticDataSourceValue: dynamic("value2"),
7575
staticDataSourceCustomContent: undefined,
76-
staticDataSourceCaption: dynamic.available("caption2")
76+
staticDataSourceCaption: dynamic("caption2")
7777
}
7878
],
7979
selectedItemsSorting: "none",
8080
customEditability: "default",
81-
customEditabilityExpression: dynamic.available(false),
81+
customEditabilityExpression: dynamic(false),
8282
filterInputDebounceInterval: 200
8383
};
8484
if (defaultProps.optionsSourceAssociationCaptionType === "expression") {
85-
defaultProps.optionsSourceAssociationCaptionExpression!.get = i => dynamic.available(`${i.id}`);
85+
defaultProps.optionsSourceAssociationCaptionExpression!.get = i => dynamic(`${i.id}`);
8686
}
8787
});
8888

packages/pluggableWidgets/combobox-web/src/__tests__/SingleSelection.spec.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,22 @@ describe("Combo box (Association)", () => {
5151
optionsSourceAssociationCaptionExpression: listExpression(() => "$currentObject/CountryName"),
5252
optionsSourceAssociationCustomContentType: "no",
5353
optionsSourceAssociationCustomContent: undefined,
54-
emptyOptionText: dynamic.available("Select an option 111"),
55-
ariaRequired: dynamic.available(true),
54+
emptyOptionText: dynamic("Select an option 111"),
55+
ariaRequired: dynamic(true),
5656
clearable: true,
5757
filterType: "contains",
5858
selectedItemsStyle: "text",
5959
readOnlyStyle: "bordered",
6060
lazyLoading: false,
6161
loadingType: "spinner",
62-
clearButtonAriaLabel: dynamic.available("Clear selection"),
63-
removeValueAriaLabel: dynamic.available("Remove value"),
64-
selectAllButtonCaption: dynamic.available("Select All"),
62+
clearButtonAriaLabel: dynamic("Clear selection"),
63+
removeValueAriaLabel: dynamic("Remove value"),
64+
selectAllButtonCaption: dynamic("Select All"),
6565
selectAllButton: false,
6666
selectionMethod: "checkbox",
67-
a11ySelectedValue: dynamic.available("Selected value:"),
68-
a11yOptionsAvailable: dynamic.available("Options available:"),
69-
a11yInstructions: dynamic.available("a11yInstructions"),
67+
a11ySelectedValue: dynamic("Selected value:"),
68+
a11yOptionsAvailable: dynamic("Options available:"),
69+
a11yInstructions: dynamic("a11yInstructions"),
7070
showFooter: false,
7171
databaseAttributeString: new EditableValueBuilder<string | Big>().build(),
7272
optionsSourceDatabaseCaptionType: "attribute",
@@ -75,23 +75,23 @@ describe("Combo box (Association)", () => {
7575
staticAttribute: new EditableValueBuilder<string>().build(),
7676
optionsSourceStaticDataSource: [
7777
{
78-
staticDataSourceValue: dynamic.available("value1"),
78+
staticDataSourceValue: dynamic("value1"),
7979
staticDataSourceCustomContent: undefined,
80-
staticDataSourceCaption: dynamic.available("caption1")
80+
staticDataSourceCaption: dynamic("caption1")
8181
},
8282
{
83-
staticDataSourceValue: dynamic.available("value2"),
83+
staticDataSourceValue: dynamic("value2"),
8484
staticDataSourceCustomContent: undefined,
85-
staticDataSourceCaption: dynamic.available("caption2")
85+
staticDataSourceCaption: dynamic("caption2")
8686
}
8787
],
8888
selectedItemsSorting: "none",
8989
customEditability: "default",
90-
customEditabilityExpression: dynamic.available(false),
90+
customEditabilityExpression: dynamic(false),
9191
filterInputDebounceInterval: 200
9292
};
9393
if (defaultProps.optionsSourceAssociationCaptionType === "expression") {
94-
defaultProps.optionsSourceAssociationCaptionExpression!.get = i => dynamic.available(`${i.id}`);
94+
defaultProps.optionsSourceAssociationCaptionExpression!.get = i => dynamic(`${i.id}`);
9595
}
9696
});
9797
it("renders combobox widget", () => {

packages/pluggableWidgets/combobox-web/src/__tests__/StaticSelection.spec.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,22 @@ describe("Combo box (Static values)", () => {
5151
optionsSourceAssociationCaptionExpression: listExpression(() => "$currentObject/CountryName"),
5252
optionsSourceAssociationCustomContentType: "no",
5353
optionsSourceAssociationCustomContent: undefined,
54-
emptyOptionText: dynamic.available("Select an option 111"),
55-
ariaRequired: dynamic.available(true),
54+
emptyOptionText: dynamic("Select an option 111"),
55+
ariaRequired: dynamic(true),
5656
clearable: true,
5757
filterType: "contains",
5858
selectedItemsStyle: "text",
5959
readOnlyStyle: "bordered",
6060
lazyLoading: false,
6161
loadingType: "spinner",
62-
clearButtonAriaLabel: dynamic.available("Clear selection"),
63-
removeValueAriaLabel: dynamic.available("Remove value"),
64-
selectAllButtonCaption: dynamic.available("Select All"),
62+
clearButtonAriaLabel: dynamic("Clear selection"),
63+
removeValueAriaLabel: dynamic("Remove value"),
64+
selectAllButtonCaption: dynamic("Select All"),
6565
selectAllButton: false,
6666
selectionMethod: "checkbox",
67-
a11ySelectedValue: dynamic.available("Selected value:"),
68-
a11yOptionsAvailable: dynamic.available("Options available:"),
69-
a11yInstructions: dynamic.available("a11yInstructions"),
67+
a11ySelectedValue: dynamic("Selected value:"),
68+
a11yOptionsAvailable: dynamic("Options available:"),
69+
a11yInstructions: dynamic("a11yInstructions"),
7070
showFooter: false,
7171
databaseAttributeString: new EditableValueBuilder<string | Big>().build(),
7272
optionsSourceDatabaseCaptionType: "attribute",
@@ -75,23 +75,23 @@ describe("Combo box (Static values)", () => {
7575
staticAttribute: new EditableValueBuilder<string>().withValue("value1").build(),
7676
optionsSourceStaticDataSource: [
7777
{
78-
staticDataSourceValue: dynamic.available("value1"),
78+
staticDataSourceValue: dynamic("value1"),
7979
staticDataSourceCustomContent: undefined,
80-
staticDataSourceCaption: dynamic.available("caption1")
80+
staticDataSourceCaption: dynamic("caption1")
8181
},
8282
{
83-
staticDataSourceValue: dynamic.available("value2"),
83+
staticDataSourceValue: dynamic("value2"),
8484
staticDataSourceCustomContent: undefined,
85-
staticDataSourceCaption: dynamic.available("caption2")
85+
staticDataSourceCaption: dynamic("caption2")
8686
}
8787
],
8888
selectedItemsSorting: "none",
8989
customEditability: "default",
90-
customEditabilityExpression: dynamic.available(false),
90+
customEditabilityExpression: dynamic(false),
9191
filterInputDebounceInterval: 200
9292
};
9393
if (defaultProps.optionsSourceAssociationCaptionType === "expression") {
94-
defaultProps.optionsSourceAssociationCaptionExpression!.get = i => dynamic.available(`${i.id}`);
94+
defaultProps.optionsSourceAssociationCaptionExpression!.get = i => dynamic(`${i.id}`);
9595
}
9696
});
9797
it("renders combobox widget", () => {

packages/pluggableWidgets/combobox-web/src/helpers/Database/__tests__/DatabaseSingleSelectionSelector.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function buildProps({ items, values, targetValue, selection }: PropsOverrides):
4040
optionsSourceDatabaseCaptionAttribute: captionAttr,
4141
optionsSourceDatabaseValueAttribute: valueAttr,
4242
databaseAttributeString: targetAttr as any,
43-
emptyOptionText: dynamic.available("Select..."),
43+
emptyOptionText: dynamic("Select..."),
4444
optionsSourceDatabaseCustomContentType: "no",
4545
optionsSourceAssociationCustomContentType: "no",
4646
staticDataSourceCustomContentType: "no",
@@ -50,14 +50,14 @@ function buildProps({ items, values, targetValue, selection }: PropsOverrides):
5050
lazyLoading: false,
5151
loadingType: "spinner",
5252
customEditability: "default",
53-
customEditabilityExpression: dynamic.available(false),
53+
customEditabilityExpression: dynamic(false),
5454
filterInputDebounceInterval: 200,
5555
selectedItemsStyle: "text",
5656
readOnlyStyle: "bordered",
5757
selectionMethod: "checkbox",
5858
selectAllButton: false,
59-
selectAllButtonCaption: dynamic.available("Select All"),
60-
ariaRequired: dynamic.available(true),
59+
selectAllButtonCaption: dynamic("Select All"),
60+
ariaRequired: dynamic(true),
6161
showFooter: false,
6262
selectedItemsSorting: "none",
6363
attributeEnumeration: new EditableValueBuilder<string>().build(),

0 commit comments

Comments
 (0)