Commit bab1d5fc authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼 Committed by Rafael Monnerat

slapos_jio: fix computer view after clicking 'Save'

Add the corresponding test.
parent af4e4819
...@@ -63,8 +63,7 @@ ...@@ -63,8 +63,7 @@
}) })
.push(function (content) { .push(function (content) {
return gadget.updateDocument(content) return gadget.updateDocument(content)
.push(function () { .push(function (ndoc) {
var ndoc = gadget.state.doc;
ndoc.allocation_scope = content.allocation_scope; ndoc.allocation_scope = content.allocation_scope;
return gadget.render({ return gadget.render({
jio_key: gadget.state.jio_key, jio_key: gadget.state.jio_key,
......
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>974.62049.17150.785</string> </value> <value> <string>978.36756.24043.65297</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1558467914.28</float> <float>1568971483.48</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -33,7 +33,10 @@ ...@@ -33,7 +33,10 @@
doc[property] = content[property]; doc[property] = content[property];
} }
} }
return gadget.jio_put(gadget.state.jio_key, doc); return gadget.jio_put(gadget.state.jio_key, doc)
.push(function () {
return doc;
});
}) })
.declareMethod('triggerSubmit', function () { .declareMethod('triggerSubmit', function () {
return this.getDeclaredGadget('fg') return this.getDeclaredGadget('fg')
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.9867.41515.40260</string> </value> <value> <string>978.36745.20465.19319</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1561425760.83</float> <float>1568971515.61</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -415,11 +415,30 @@ ...@@ -415,11 +415,30 @@
<tr> <tr>
<td>select</td> <td>select</td>
<td>//select[@id="allocation_scope"]</td> <td>//select[@id="allocation_scope"]</td>
<td>Closed forever</td> <td>Open for Friends only</td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" />
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@id="subject_list"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@id="subject_list"]</td>
<td>demo@user.com</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" />
<tr>
<td>assertValue</td>
<td>//textarea[@id="subject_list"]</td>
<td>demo@user.com</td>
</tr>
<tal:block define="menu_item python: 'Servers'; header menu_item"> <tal:block define="menu_item python: 'Servers'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block> </tal:block>
...@@ -430,7 +449,7 @@ ...@@ -430,7 +449,7 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block> </tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(0)', 'footer': 'No records'}"> <tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block> </tal:block>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment