DEV: Improve component test skip option and skipped new tests

This commit is contained in:
romanrizzi 2019-05-16 15:15:37 -03:00
parent 80b3560050
commit b716439c3e
7 changed files with 11 additions and 10 deletions

View File

@ -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)

View File

@ -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");

View File

@ -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");

View File

@ -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"),

View File

@ -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"),

View File

@ -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);
});
});
}

View File

@ -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;