DEV: Improve component test skip option and skipped new tests

DEV: Improve component test skip option and skipped new tests

diff --git a/spec/models/invite_spec.rb b/spec/models/invite_spec.rb
index 8f1136e..fd9dffe 100644
--- a/spec/models/invite_spec.rb
+++ b/spec/models/invite_spec.rb
@@ -224,7 +224,7 @@ describe Invite do
     context "deletes duplicate invites" do
       fab!(:another_user) { Fabricate(:user) }
 
-      it 'delete duplicate invite' do
+      xit 'delete duplicate invite' do
         another_invite = Fabricate(:invite, email: invite.email, invited_by: another_user)
         invite.redeem
         duplicate_invite = Invite.find_by(id: another_invite.id)
diff --git a/test/javascripts/acceptance/admin-search-log-term-test.js.es6 b/test/javascripts/acceptance/admin-search-log-term-test.js.es6
index d5a2fcb..8ba2a43 100644
--- a/test/javascripts/acceptance/admin-search-log-term-test.js.es6
+++ b/test/javascripts/acceptance/admin-search-log-term-test.js.es6
@@ -1,7 +1,7 @@
 import { acceptance } from "helpers/qunit-helpers";
 acceptance("Admin - Search Log Term", { loggedIn: true });
 
-QUnit.test("show search log term details", async assert => {
+QUnit.skip("show search log term details", async assert => {
   await visit("/admin/logs/search_logs/term?term=ruby");
 
   assert.ok($("div.search-logs-filter").length, "has the search type filter");
diff --git a/test/javascripts/acceptance/admin-search-logs-test.js.es6 b/test/javascripts/acceptance/admin-search-logs-test.js.es6
index ceab951..f9b429c 100644
--- a/test/javascripts/acceptance/admin-search-logs-test.js.es6
+++ b/test/javascripts/acceptance/admin-search-logs-test.js.es6
@@ -1,7 +1,7 @@
 import { acceptance } from "helpers/qunit-helpers";
 acceptance("Admin - Search Logs", { loggedIn: true });
 
-QUnit.test("show search logs", async assert => {
+QUnit.skip("show search logs", async assert => {
   await visit("/admin/logs/search_logs");
 
   assert.ok($("table.search-logs-list.grid").length, "has the div class");
diff --git a/test/javascripts/acceptance/group-card-mobile-test.js.es6 b/test/javascripts/acceptance/group-card-mobile-test.js.es6
index 4d3e2ad..c16a7d8 100644
--- a/test/javascripts/acceptance/group-card-mobile-test.js.es6
+++ b/test/javascripts/acceptance/group-card-mobile-test.js.es6
@@ -3,7 +3,7 @@ import DiscourseURL from "discourse/lib/url";
 
 acceptance("Group Card - Mobile", { mobileView: true });
 
-QUnit.test("group card", async assert => {
+QUnit.skip("group card", async assert => {
   await visit("/t/301/1");
   assert.ok(
     invisible("#group-card"),
diff --git a/test/javascripts/acceptance/user-card-mobile-test.js.es6 b/test/javascripts/acceptance/user-card-mobile-test.js.es6
index 2bc41d2..981daee 100644
--- a/test/javascripts/acceptance/user-card-mobile-test.js.es6
+++ b/test/javascripts/acceptance/user-card-mobile-test.js.es6
@@ -3,7 +3,7 @@ import DiscourseURL from "discourse/lib/url";
 
 acceptance("User Card - Mobile", { mobileView: true });
 
-QUnit.test("user card", async assert => {
+QUnit.skip("user card", async assert => {
   await visit("/t/internationalization-localization/280");
   assert.ok(
     invisible("#user-card"),
diff --git a/test/javascripts/helpers/component-test.js.es6 b/test/javascripts/helpers/component-test.js.es6
index c2d5485..3b7ecdc 100644
--- a/test/javascripts/helpers/component-test.js.es6
+++ b/test/javascripts/helpers/component-test.js.es6
@@ -6,6 +6,10 @@ import TopicTrackingState from "discourse/models/topic-tracking-state";
 export default function(name, opts) {
   opts = opts || {};
 
+  if (opts.skip) { 
+    return; 
+  }
+
   test(name, function(assert) {
     const appEvents = AppEvents.create();
     this.site = Discourse.Site.current();
@@ -51,11 +55,7 @@ export default function(name, opts) {
       return this.render(opts.template);
     });
     andThen(() => {
-      if (opts.skip) {
-        assert.expect(0);
-      } else {
-        opts.test.call(this, assert);
-      }
+      opts.test.call(this, assert);
     });
   });
 }
diff --git a/test/javascripts/widgets/home-logo-test.js.es6 b/test/javascripts/widgets/home-logo-test.js.es6
index c68ad08..bffe7ee 100644
--- a/test/javascripts/widgets/home-logo-test.js.es6
+++ b/test/javascripts/widgets/home-logo-test.js.es6
@@ -9,6 +9,7 @@ const title = "Cool Forum";
 
 widgetTest("basics", {
   template: '{{mount-widget widget="home-logo" args=args}}',
+  skip: true,
   beforeEach() {
     this.siteSettings.site_logo_url = bigLogo;
     this.siteSettings.site_logo_small_url = smallLogo;

GitHub sha: b716439c

I fixed this one earlier this week :fox_face:

Awesome :medal_sports:

Will revert that change them.

1 Like

Done:

2 Likes

@jjaffeux FYI … we disabled a big bunch of JS tests.

Talking of this commit right DEV: Improve component test skip option and skipped new tests · discourse/discourse@b716439 · GitHub ?