Skip to content

Commit

Permalink
Fixes liferay#1341, liferay#1330, liferay#1285 - Adds tests isomorphic
Browse files Browse the repository at this point in the history
  • Loading branch information
matuzalemsteles committed Dec 4, 2018
1 parent 4993706 commit 88f3f32
Show file tree
Hide file tree
Showing 14 changed files with 236 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<ul class="dropdown-menu show" ref="dropdown"><li><a data-onclick="(any|null)" data-dropdown-item-index="0" id="item" class="dropdown-item" href="javascript:;"><strong>B</strong><strong>r</strong><strong>e</strong><strong>a</strong>d</a></li></ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<input class="my-classes"id="autocomplete" name="autocomplete"onBlur="&#39;(any|null)&#39;" onFocus="&#39;(any|null)&#39;" onInput="&#39;(any|null)&#39;" onKeydown="&#39;(any|null)&#39;" ref="input" type="text"value="input" />
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="dropdown-full my-classes" data-onkeydown="(any|null)"id="myId">(html|null)<input class="input element classes"id="input name" name="input name"onBlur="&#39;(any|null)&#39;" onFocus="&#39;(any|null)&#39;" onInput="&#39;(any|null)&#39;" onKeydown="&#39;(any|null)&#39;" ref="input" type="text"value="input value" /><ul class="dropdown-menu show" ref="dropdown"><li><a data-onclick="(any|null)" data-dropdown-item-index="0" id="item" class="dropdown-item" href="javascript:;"><strong>B</strong><strong>r</strong><strong>e</strong><strong>a</strong>d</a></li></ul></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Content
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="input-group input-group-stacked-sm-down"><div class="input-group-item"><div class="dropdown-full form-control form-control-tag-group" data-onkeydown="null"><input name="selectedItems"type="hidden" value="foo"><span class="label label-secondary label-dismissible"id="item-tag"tabIndex="0"><span class="label-item label-item-expand">Foo</span><span class="label-item label-item-after"><button class="btn close"aria-label="close"tabIndex="-1"type="button"><svg class="lexicon-icon lexicon-icon-times"focusable="false"role="presentation"><use xlink:href="icons.svg#times" /></svg></button></span></span><input class="form-control-inset"id="input name" name="input name"onBlur=" null " onFocus=" null " onInput=" null " onKeydown=" null " ref="input" type="text"value="input value" /><ul class="dropdown-menu show" ref="dropdown"><li><a data-onclick="null" data-dropdown-item-index="0" id="item" class="dropdown-item" href="javascript:;"><strong>B</strong><strong>r</strong><strong>e</strong><strong>a</strong>d</a></li></ul></div></div><div class="input-group-item input-group-item-shrink"><button class="btn btn-secondary"type="null">select</button></div></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<input name="selectedItems"type="hidden" value="foo"><span class="label label-secondary label-dismissible"id="item-tag"tabIndex="0"><span class="label-item label-item-expand">Foo</span><span class="label-item label-item-after"><button class="btn close"aria-label="close"tabIndex="-1"type="button"><svg class="lexicon-icon lexicon-icon-times"focusable="false"role="presentation"><use xlink:href="icons.svg#times" /></svg></button></span></span>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="from-group my-element-classes"id="myId"><label for="input name">Tags</label><div class="input-group input-group-stacked-sm-down"><div class="input-group-item"><div class="dropdown-full form-control form-control-tag-group" data-onkeydown="null"><input name="selectedItems"type="hidden" value="foo"><span class="label label-secondary label-dismissible"id="item-tag"tabIndex="0"><span class="label-item label-item-expand">Foo</span><span class="label-item label-item-after"><button class="btn close"aria-label="close"tabIndex="-1"type="button"><svg class="lexicon-icon lexicon-icon-times"focusable="false"role="presentation"><use xlink:href="icons.svg#times" /></svg></button></span></span><input class="form-control-inset"id="input name" name="input name"onBlur=" null " onFocus=" null " onInput=" null " onKeydown=" null " ref="input" type="text"value="inputValue" /><ul class="dropdown-menu show" ref="dropdown"><li><a data-onclick="null" data-dropdown-item-index="0" id="item" class="dropdown-item" href="javascript:;"><strong>B</strong><strong>r</strong><strong>e</strong><strong>a</strong>d</a></li></ul></div></div><div class="input-group-item input-group-item-shrink"><button class="btn btn-secondary"type="null">select</button></div></div></div>
38 changes: 38 additions & 0 deletions packages/clay-isomorphic/fixtures/input/ClayAutocomplete.dropdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"_handleDropdownItemClick": "(any|null)",
"requestPolling": 0,
"initialData": [],
"contentRenderer": "(null|string)",
"requestRetries": 5,
"_handleDataChange": "(any|null)",
"filteredItems": [
{
"index": 0,
"matches": [
{
"match": true,
"value": "B"
},
{
"match": true,
"value": "r"
},
{
"match": true,
"value": "e"
},
{
"match": true,
"value": "a"
},
{
"value": "d"
}
],
"originalString": "Bread",
"score": 26
}
],
"dataSource": "http://clay.datasource",
"requestTimeout": 20000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"_handleOnBlur": "(any|null)",
"_handleOnFocus": "(any|null)",
"_handleOnKeydown": "(any|null)",
"inputElementClasses": "my-classes",
"_handleOnInput": "(any|null)",
"inputValue": "input",
"inputName": "autocomplete"
}
48 changes: 48 additions & 0 deletions packages/clay-isomorphic/fixtures/input/ClayAutocomplete.render
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"_handleDropdownItemClick": "(any|null)",
"_handleOnBlur": "(any|null)",
"_handleOnFocus": "(any|null)",
"requestRetries": 5,
"_handleOnKeydown": "(any|null)",
"_handleDataChange": "(any|null)",
"filteredItems": [
{
"index": 0,
"matches": [
{
"match": true,
"value": "B"
},
{
"match": true,
"value": "r"
},
{
"match": true,
"value": "e"
},
{
"match": true,
"value": "a"
},
{
"value": "d"
}
],
"originalString": "Bread",
"score": 26
}
],
"contentRenderer": "(null|string)",
"elementClasses": "my-classes",
"inputName": "input name",
"requestPolling": 0,
"initialData": [],
"inputElementClasses": "input element classes",
"_handleOnInput": "(any|null)",
"inputValue": "input value",
"id": "myId",
"dataSource": "http://clay.datasource",
"requestTimeout": 20000,
"unstable_content": "(html|null)"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"content": "Content"
}
59 changes: 59 additions & 0 deletions packages/clay-isomorphic/fixtures/input/ClayMultiSelect.content
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"_handleDropdownItemClick": "(any|null)",
"enableAutocomplete": true,
"requestRetries": 5,
"helpText": "Help text",
"_handleOnKeydown": "(any|null)",
"_handleDataChange": "(any|null)",
"filteredItems": [
{
"index": 0,
"matches": [
{
"match": true,
"value": "B"
},
{
"match": true,
"value": "r"
},
{
"match": true,
"value": "e"
},
{
"match": true,
"value": "a"
},
{
"value": "d"
}
],
"originalString": "Bread",
"score": 26
}
],
"_handleButtonClicked": "(any|null)",
"contentRenderer": "(null|string)",
"inputName": "input name",
"spritemap": "icons.svg",
"requestPolling": 5,
"initialData": [],
"extractData": "(null|unknown)",
"_handleCloseButtonClick": "(any|null)",
"_removeFocusedItem": "(any|null)",
"_handleFilteredItemsChange": "(any|null)",
"_handleOnInput": "(any|null)",
"inputValue": "input value",
"dataSource": [
"Bread"
],
"requestTimeout": 10000,
"selectedItems": [
{
"label": "Foo",
"value": "foo"
}
],
"selectedItemsInputName": "selectedItems"
}
12 changes: 12 additions & 0 deletions packages/clay-isomorphic/fixtures/input/ClayMultiSelect.items
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"spritemap": "icons.svg",
"_handleCloseButtonClick": "(any|null)",
"contentRenderer": "(null|string)",
"selectedItems": [
{
"label": "Foo",
"value": "foo"
}
],
"selectedItemsInputName": "selectedItems"
}
60 changes: 60 additions & 0 deletions packages/clay-isomorphic/fixtures/input/ClayMultiSelect.render
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"_handleDropdownItemClick": "(any|null)",
"elementClasses": "my-element-classes",
"inputName": "input name",
"requestPolling": 0,
"extractData": "(null|unknown)",
"_removeFocusedItem": "(any|null)",
"_handleFilteredItemsChange": "(any|null)",
"_handleOnInput": "(any|null)",
"inputValue": "inputValue",
"id": "myId",
"requestTimeout": 1000,
"selectedItemsInputName": "selectedItems",
"enableAutocomplete": false,
"requestRetries": 10,
"helpText": "Help Text",
"_handleOnKeydown": "(any|null)",
"_handleDataChange": "(any|null)",
"filteredItems": [
{
"index": 0,
"matches": [
{
"match": true,
"value": "B"
},
{
"match": true,
"value": "r"
},
{
"match": true,
"value": "e"
},
{
"match": true,
"value": "a"
},
{
"value": "d"
}
],
"originalString": "Bread",
"score": 26
}
],
"_handleButtonClicked": "(any|null)",
"contentRenderer": "(null|string)",
"label": "Tags",
"spritemap": "icons.svg",
"initialData": [],
"_handleCloseButtonClick": "(any|null)",
"dataSource": "http://clay.datasource",
"selectedItems": [
{
"label": "Foo",
"value": "foo"
}
],
}

0 comments on commit 88f3f32

Please sign in to comment.