[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake/master] Remove tests referring to BadgeUI



commit a164d61f1641b13b12f467b4639838f136f6f300
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Mon Jul 15 09:32:03 2019 +0200

    Remove tests referring to BadgeUI
    
    Since that's been overhauled.  The whole ui.spec.js file probably needs
    redoing.
---
 proxy/spec/ui.spec.js | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/proxy/spec/ui.spec.js b/proxy/spec/ui.spec.js
index 3386a2d..dc9aa35 100644
--- a/proxy/spec/ui.spec.js
+++ b/proxy/spec/ui.spec.js
@@ -1,4 +1,4 @@
-/* global expect, it, describe, spyOn, DebugUI, BadgeUI */
+/* global expect, it, describe, spyOn, DebugUI */
 /* eslint no-redeclare: 0 */
 
 /*
@@ -30,20 +30,6 @@ describe('UI', function() {
     expect(u.$msglog).not.toBeNull();
   });
 
-  it('is not debug mode when badge exists', function() {
-    var u;
-    spyOn(document, 'getElementById').and.callFake(function(id) {
-      if ('badge' === id) {
-        return {};
-      }
-      return null;
-    });
-    u = new BadgeUI();
-    expect(document.getElementById).toHaveBeenCalled();
-    expect(document.getElementById.calls.count()).toEqual(1);
-    expect(u.$badge).not.toBeNull();
-  });
-
   it('sets status message when in debug mode', function() {
     var u;
     u = new DebugUI();
@@ -66,16 +52,6 @@ describe('UI', function() {
     expect(u.$msglog.className).toEqual('');
   });
 
-  it('sets badge css correctly for non-debug mode', function() {
-    var u;
-    u = new BadgeUI();
-    u.$badge = {};
-    u.setActive(true);
-    expect(u.$badge.className).toEqual('active');
-    u.setActive(false);
-    expect(u.$badge.className).toEqual('');
-  });
-
   it('logs to the textarea correctly when debug mode', function() {
     var u;
     u = new DebugUI();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits