Skip to content

Commit

Permalink
[EAK-519] Updated test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
smiakchilo committed May 30, 2024
1 parent 33d50e4 commit eb1db23
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
path="/path/to/acs/list"
sling:resourceType="acs/list/resource/type"/>
</acsListOptions>
<customDatasourceOptions
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
disabled="{Boolean}false"
fieldLabel="Custom Datasource"
name="./customDatasourceOptions"
renderHidden="{Boolean}false"
required="{Boolean}false">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="acs/list/resource/type"/>
</customDatasourceOptions>
</items>
</column>
</items>
Expand Down
177 changes: 107 additions & 70 deletions plugin/src/test/resources/handlers/widgets/select/_cq_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,95 +8,132 @@
<content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container">
<layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"/>
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container">
<column jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<rating jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./rating"
fieldLabel="Rating"
disabled="{Boolean}false"
emptyText="Select rating"
multiple="{Boolean}true"
renderHidden="{Boolean}false"
required="{Boolean}false"
translateOptions="{Boolean}false"
variant="quick">
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./rating"
fieldLabel="Rating"
disabled="{Boolean}false"
emptyText="Select rating"
multiple="{Boolean}true"
renderHidden="{Boolean}false"
required="{Boolean}false"
translateOptions="{Boolean}false"
variant="quick">
<items jcr:primaryType="nt:unstructured">
<item jcr:primaryType="nt:unstructured" text="Empty" value=""/>
<item1 jcr:primaryType="nt:unstructured" text="Blank" value=" "/>
<item jcr:primaryType="nt:unstructured"
text="Empty"
value=""/>
<item1 jcr:primaryType="nt:unstructured"
text="Blank"
value=" "/>
<item2 jcr:primaryType="nt:unstructured"
text="1 star"
value="1"
selected="{Boolean}true"
statusIcon="/content/dam/samples/icons/1-star-rating.png"
statusText="This is to set 1-star rating"
statusVariant="success"/>
<item3 jcr:primaryType="nt:unstructured" text="2 stars" value="2"/>
<item4 jcr:primaryType="nt:unstructured" text="3 stars" value="3"/>
<item5 jcr:primaryType="nt:unstructured" text="4 stars" value="4" disabled="{Boolean}true"/>
<item6 jcr:primaryType="nt:unstructured" text="5 stars" value="5" disabled="{Boolean}true"/>
text="1 star"
value="1"
selected="{Boolean}true"
statusIcon="/content/dam/samples/icons/1-star-rating.png"
statusText="This is to set 1-star rating"
statusVariant="success"/>
<item3 jcr:primaryType="nt:unstructured"
text="2 stars"
value="2"/>
<item4 jcr:primaryType="nt:unstructured"
text="3 stars"
value="3"/>
<item5 jcr:primaryType="nt:unstructured"
text="4 stars"
value="4"
disabled="{Boolean}true"/>
<item6 jcr:primaryType="nt:unstructured"
text="5 stars"
value="5"
disabled="{Boolean}true"/>
</items>
</rating>
<timezone jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./timezone"
fieldLabel="Timezone"
disabled="{Boolean}false"
emptyOption="{Boolean}true"
emptyText="Select timezone"
ordered="{Boolean}true"
renderHidden="{Boolean}false"
required="{Boolean}false">
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./timezone"
fieldLabel="Timezone"
disabled="{Boolean}false"
emptyOption="{Boolean}true"
emptyText="Select timezone"
ordered="{Boolean}true"
renderHidden="{Boolean}false"
required="{Boolean}false">
<items jcr:primaryType="nt:unstructured">
<item0200 jcr:primaryType="nt:unstructured" text="UTC +2" value="+02:00"/>
<item0100 jcr:primaryType="nt:unstructured" text="UTC +1" value="+01:00"/>
<item0000 jcr:primaryType="nt:unstructured" text="UTC" value="00:00"/>
<item1 jcr:primaryType="nt:unstructured" text="UTC -1" value="-01:00"/>
<item2 jcr:primaryType="nt:unstructured" text="UTC -2" value="-02:00"/>
<item0200 jcr:primaryType="nt:unstructured"
text="UTC +2"
value="+02:00"/>
<item0100 jcr:primaryType="nt:unstructured"
text="UTC +1"
value="+01:00"/>
<item0000 jcr:primaryType="nt:unstructured"
text="UTC"
value="00:00"/>
<item1 jcr:primaryType="nt:unstructured"
text="UTC -1"
value="-01:00"/>
<item2 jcr:primaryType="nt:unstructured"
text="UTC -2"
value="-02:00"/>
</items>
</timezone>
<optionList jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./optionList"
fieldLabel="Provided options list"
disabled="{Boolean}false"
renderHidden="{Boolean}false"
required="{Boolean}false">
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./optionList"
fieldLabel="Provided options list"
disabled="{Boolean}false"
renderHidden="{Boolean}false"
required="{Boolean}false">
<datasource jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/etoolbox-authoring-kit/datasources/option-provider"
prepend="[None:none]"
path1="/path/to/acs/list"
path2="/path/to/acs/list2"
textMember2="pageTitle"
selected="none"
sorted="{Boolean}true"/>
sling:resourceType="/apps/etoolbox-authoring-kit/datasources/option-provider"
prepend="[None:none]"
path1="/path/to/acs/list"
path2="/path/to/acs/list2"
textMember2="pageTitle"
selected="none"
sorted="{Boolean}true"/>
</optionList>
<staticOptionList jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./staticOptionList"
fieldLabel="Provided options list with only static options"
disabled="{Boolean}false"
renderHidden="{Boolean}false"
required="{Boolean}false">
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./staticOptionList"
fieldLabel="Provided options list with only static options"
disabled="{Boolean}false"
renderHidden="{Boolean}false"
required="{Boolean}false">
<datasource jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/etoolbox-authoring-kit/datasources/option-provider"
prepend="[None:none,Null:null]"
append="[All:all,Any:any]"
selected="none"
sorted="{Boolean}true"/>
sling:resourceType="/apps/etoolbox-authoring-kit/datasources/option-provider"
prepend="[None:none,Null:null]"
append="[All:all,Any:any]"
selected="none"
sorted="{Boolean}true"/>
</staticOptionList>
<acsListOptions jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./acsListOptions"
fieldLabel="ACS options list"
deleteHint="{Boolean}false"
disabled="{Boolean}false"
renderHidden="{Boolean}false"
required="{Boolean}false">
sling:resourceType="granite/ui/components/coral/foundation/form/select"
name="./acsListOptions"
fieldLabel="ACS options list"
deleteHint="{Boolean}false"
disabled="{Boolean}false"
renderHidden="{Boolean}false"
required="{Boolean}false">
<datasource jcr:primaryType="nt:unstructured"
sling:resourceType="acs/list/resource/type"
path="/path/to/acs/list"/>
sling:resourceType="acs/list/resource/type"
path="/path/to/acs/list"/>
</acsListOptions>
<customDatasourceOptions
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
disabled="{Boolean}false"
fieldLabel="Custom Datasource"
name="./customDatasourceOptions"
renderHidden="{Boolean}false"
required="{Boolean}false">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="acs/list/resource/type"/>
</customDatasourceOptions>
</items>
</column>
</items>
Expand Down

0 comments on commit eb1db23

Please sign in to comment.