This is an automated email from the ASF dual-hosted git repository.

jialiang pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new c0b46e4f65 AMBARI-26110: Metrics view test cases fail in some cases. 
#3805
c0b46e4f65 is described below

commit c0b46e4f657873c9d826d555cc676d19a9b96f6f
Author: zrain <[email protected]>
AuthorDate: Tue Nov 26 15:09:35 2024 +0800

    AMBARI-26110: Metrics view test cases fail in some cases. #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]

Reply via email to