Bläddra i källkod

Fix failing tests due to template whitespace changes

JC Brand 1 år sedan
förälder
incheckning
2bd4c53288
2 ändrade filer med 13 tillägg och 16 borttagningar
  1. 11 14
      src/plugins/muc-views/tests/muc.js
  2. 2 2
      src/plugins/roomslist/tests/roomslist.js

+ 11 - 14
src/plugins/muc-views/tests/muc.js

@@ -1640,14 +1640,12 @@ describe("Groupchats", function () {
             await u.waitUntil(() => u.isVisible(modal), 1000);
 
             let features_list = modal.querySelector('.features-list');
-            let features_shown = features_list.textContent.split('\n').map(s => s.trim()).filter(s => s);
-
-            expect(features_shown.join(' ')).toBe(
-                'Password protected - This groupchat requires a password before entry '+
-                'Open - Anyone can join this groupchat '+
+            expect(features_list.textContent).toBe(
+                'Password protected - This groupchat requires a password before entry     '+
+                'Open - Anyone can join this groupchat  '+
                 'Temporary - This groupchat will disappear once the last person leaves '+
-                'Not anonymous - All other groupchat participants can see your XMPP address '+
-                'Not moderated - Participants entering this groupchat can write right away');
+                'Not anonymous - All other groupchat participants can see your XMPP address   '+
+                'Not moderated - Participants entering this groupchat can write right away ');
             expect(view.model.features.get('hidden')).toBe(false);
             expect(view.model.features.get('mam_enabled')).toBe(false);
             expect(view.model.features.get('membersonly')).toBe(false);
@@ -1798,14 +1796,13 @@ describe("Groupchats", function () {
             await u.waitUntil(() => u.isVisible(modal), 1000);
 
             features_list = modal.querySelector('.features-list');
-            features_shown = features_list.textContent.split('\n').map(s => s.trim()).filter(s => s);
-            expect(features_shown.join(' ')).toBe(
-                'Password protected - This groupchat requires a password before entry '+
-                'Hidden - This groupchat is not publicly searchable '+
-                'Members only - This groupchat is restricted to members only '+
+            expect(features_list.textContent).toBe(
+                'Password protected - This groupchat requires a password before entry  '+
+                'Hidden - This groupchat is not publicly searchable  '+
+                'Members only - This groupchat is restricted to members only   '+
                 'Temporary - This groupchat will disappear once the last person leaves '+
-                'Not anonymous - All other groupchat participants can see your XMPP address '+
-                'Not moderated - Participants entering this groupchat can write right away');
+                'Not anonymous - All other groupchat participants can see your XMPP address   '+
+                'Not moderated - Participants entering this groupchat can write right away ');
             expect(view.model.features.get('hidden')).toBe(true);
             expect(view.model.features.get('mam_enabled')).toBe(false);
             expect(view.model.features.get('membersonly')).toBe(true);

+ 2 - 2
src/plugins/roomslist/tests/roomslist.js

@@ -271,9 +271,9 @@ describe("A groupchat shown in the groupchats list", function () {
             'Password protected - This groupchat requires a password before entry'+
             'Hidden - This groupchat is not publicly searchable'+
             'Open - Anyone can join this groupchat'+
-            'Temporary - This groupchat will disappear once the last person leaves'+
+            'Temporary - This groupchat will disappear once the last person leaves '+
             'Not anonymous - All other groupchat participants can see your XMPP address'+
-            'Not moderated - Participants entering this groupchat can write right away'
+            'Not moderated - Participants entering this groupchat can write right away '
         );
         presence = $pres({
                 to: 'romeo@montague.lit/_converse.js-29092160',