This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new e050e18e5a feat: fix test failed (#3805)
e050e18e5a is described below
commit e050e18e5a5aac613526f5b104acb666ebaf74ea
Author: zrain <[email protected]>
AuthorDate: Wed Aug 7 09:06:28 2024 +0800
feat: fix test failed (#3805)
---
ambari-web/test/views/main/service/info/metrics_view_test.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ambari-web/test/views/main/service/info/metrics_view_test.js
b/ambari-web/test/views/main/service/info/metrics_view_test.js
index 3c49044b6e..558091182e 100644
--- a/ambari-web/test/views/main/service/info/metrics_view_test.js
+++ b/ambari-web/test/views/main/service/info/metrics_view_test.js
@@ -214,17 +214,16 @@ describe('App.MainServiceInfoMetricsView', function() {
mock.sortable.restore();
});
- it("MutationObserver callback should be called", function() {
+ it("MutationObserver callback should be called", function(done) {
view.makeSortable('#widget_layout');
const callback = function () {
- expect(true).to.be.true;
expect(document.querySelector('#widget_layout')).to.not.be.null;
observer.disconnect();
done();
};
const observer = new MutationObserver(callback);
const body = document.body;
- observer.observe(body, { childList: true });
+ observer.observe(body, { childList: true, subtree: true });
const elementWidget = document.createElement('div');
elementWidget.id='widget_layout';
body.appendChild(elementWidget);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]