Commit 984f3e4e authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

slapos_jio: fix computer view after clicking 'Save'

Add the corresponding test.
parent 616cdb26
......@@ -63,8 +63,7 @@
})
.push(function (content) {
return gadget.updateDocument(content)
.push(function () {
var ndoc = gadget.state.doc;
.push(function (ndoc) {
ndoc.allocation_scope = content.allocation_scope;
return gadget.render({
jio_key: gadget.state.jio_key,
......
......@@ -257,7 +257,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.62049.17150.785</string> </value>
<value> <string>978.36756.24043.65297</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -275,7 +275,7 @@
</tuple>
<state>
<tuple>
<float>1558467914.28</float>
<float>1568971483.48</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -33,7 +33,10 @@
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 () {
return this.getDeclaredGadget('fg')
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.9867.41515.40260</string> </value>
<value> <string>978.36745.20465.19319</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1561425760.83</float>
<float>1568971515.61</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -415,11 +415,30 @@
<tr>
<td>select</td>
<td>//select[@id="allocation_scope"]</td>
<td>Closed forever</td>
<td>Open for Friends only</td>
</tr>
<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 metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</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