Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed-Values-Should-Actually-Be-Allowed does not work with Microsoft.Common.Dropdown elements with multiselect #646

Closed
malscent opened this issue May 4, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@malscent
Copy link

malscent commented May 4, 2022

If i have a parameter such as:

"couchbaseServices": {
  "type": "array",
  "defaultValue": [ "data", "index", "query" ]
},

Even if all of those items in the default value are present in a corresponding Microsoft.Common.Dropdown, it will fail

          {
            "name": "couchbaseServices",
            "type": "Microsoft.Common.DropDown",
            "label": "Couchbase Services",
            "multiselect": true,
            "selectAll": true,
            "toolTip": "The services that the primary cluster will utilize",
            "constraints": {
              "allowedValues": [
                {
                  "label": "Data",
                  "value": "data"
                },
                {
                  "label": "Index",
                  "value": "index"
                },
                {
                  "label": "Query",
                  "value": "query"
                },
                {
                  "label": "Search",
                  "value": "fts"
                },
                {
                  "label": "Eventing",
                  "value": "eventing"
                },
                {
                  "label": "Analytics",
                  "value": "analytics"
                },
                {
                  "label": "Backup",
                  "value": "backup"
                }
              ]
            },
            "visible": true
          }

image

@ghost ghost added the Needs: triage 🔍 label May 4, 2022
@malscent
Copy link
Author

malscent commented May 4, 2022

There's also a bug with Microsoft.Common.Dropdown with mutliselect that if a user does not interact with the element, it will return a string value instead of an array value. I've reported that here as I did not know where else to report it

@bmoore-msft bmoore-msft added bug Something isn't working and removed Needs: triage 🔍 labels May 20, 2022
@StartAutomating
Copy link
Collaborator

@malscent thanks for pointing this one out. We will see if we can expand this case to handle multiselect.

StartAutomating pushed a commit to StartAutomating/arm-ttk that referenced this issue Jun 10, 2022
StartAutomating pushed a commit to StartAutomating/arm-ttk that referenced this issue Jun 10, 2022
StartAutomating pushed a commit to StartAutomating/arm-ttk that referenced this issue Jun 10, 2022
StartAutomating pushed a commit to StartAutomating/arm-ttk that referenced this issue Jun 10, 2022
bmoore-msft pushed a commit that referenced this issue Jun 10, 2022
* Updating AllowedValues Test (fixing multiselect #646)

* Adding positive test for #646

* Updating AllowedValues Test (including bad default in errors, re #646)

* Adding negative test for #646

Co-authored-by: James Brundage <@github.com>
@bmoore-msft
Copy link
Contributor

should be in #652

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants