fix issue with actioncontainer, add tests

This commit is contained in:
Géry Debongnie
2019-02-06 13:26:21 +01:00
parent 7aa252c222
commit 91e51b2798
9 changed files with 198 additions and 34 deletions
@@ -0,0 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`can be rendered with a non empty stack 1`] = `"<div class=\\"o_content\\"><div>some client action</div></div>"`;
exports[`can be rendered with an empty stack 1`] = `"<div class=\\"o_content\\"></div>"`;
exports[`content is updated properly when new props are given 1`] = `"<div class=\\"o_content\\"><div>some client action</div></div>"`;
@@ -108,3 +108,69 @@ exports[`if url has action_id, will render action and navigate to proper menu_id
</div>
</div>"
`;
exports[`start with no action => clicks on client action => discuss is rendered 1`] = `
"<div class=\\"o_web_client\\">
<div class=\\"o_navbar\\">
<a aria-label=\\"Applications\\" class=\\"o_title fa fa-th\\" href=\\"#\\" title=\\"Applications\\" accesskey=\\"h\\"></a>
<a class=\\"o_menu_brand\\" href=\\"\\" role=\\"button\\">
Discuss
</a>
<ul class=\\"o_menu_sections\\">
<li>
<a href=\\"#\\" role=\\"button\\" class=\\"dropdown-toggle o-no-caret\\" data-toggle=\\"dropdown\\">
<span>
Integrations
</span>
</a>
<div class=\\"dropdown-menu\\" role=\\"menu\\">
<a href=\\"\\" data-toggle=\\"collapse\\" data-target=\\"#someid\\" role=\\"menuitem\\" class=\\"dropdown-item\\">
<span>
Github Repositories
</span>
</a>
</div>
</li>
</ul>
</div>
<div class=\\"o_content\\"><div class=\\"o_discuss\\">
<span>DISCUSS!!</span>
<button>Reset first counter</button>
<button>Reset counter 2 in 3s</button>
<button>Toggle Clock/counters</button>
<button>Toggle Color</button>
<button>Rerender this widget</button>
<input>
<div>
<button>-</button>
<span style=\\"font-weight:bold\\">Value: 4</span>
<button>+</button>
</div>
<div>
<button>-</button>
<span style=\\"font-weight:bold\\">Value: 400</span>
<button>+</button>
</div>
<div>
<span>Current Color: </span>
red
</div>
<button>Add notif</button>
<button>Add sticky notif</button>
</div></div>
<div class=\\"o_notification_container\\">
</div>
</div>"
`;