mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 21:41:26 +08:00
DEV: Improve component test skip option and skipped new tests
This commit is contained in:
@ -224,7 +224,7 @@ describe Invite do
|
|||||||
context "deletes duplicate invites" do
|
context "deletes duplicate invites" do
|
||||||
fab!(:another_user) { Fabricate(:user) }
|
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)
|
another_invite = Fabricate(:invite, email: invite.email, invited_by: another_user)
|
||||||
invite.redeem
|
invite.redeem
|
||||||
duplicate_invite = Invite.find_by(id: another_invite.id)
|
duplicate_invite = Invite.find_by(id: another_invite.id)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { acceptance } from "helpers/qunit-helpers";
|
import { acceptance } from "helpers/qunit-helpers";
|
||||||
acceptance("Admin - Search Log Term", { loggedIn: true });
|
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");
|
await visit("/admin/logs/search_logs/term?term=ruby");
|
||||||
|
|
||||||
assert.ok($("div.search-logs-filter").length, "has the search type filter");
|
assert.ok($("div.search-logs-filter").length, "has the search type filter");
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { acceptance } from "helpers/qunit-helpers";
|
import { acceptance } from "helpers/qunit-helpers";
|
||||||
acceptance("Admin - Search Logs", { loggedIn: true });
|
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");
|
await visit("/admin/logs/search_logs");
|
||||||
|
|
||||||
assert.ok($("table.search-logs-list.grid").length, "has the div class");
|
assert.ok($("table.search-logs-list.grid").length, "has the div class");
|
||||||
|
@ -3,7 +3,7 @@ import DiscourseURL from "discourse/lib/url";
|
|||||||
|
|
||||||
acceptance("Group Card - Mobile", { mobileView: true });
|
acceptance("Group Card - Mobile", { mobileView: true });
|
||||||
|
|
||||||
QUnit.test("group card", async assert => {
|
QUnit.skip("group card", async assert => {
|
||||||
await visit("/t/301/1");
|
await visit("/t/301/1");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
invisible("#group-card"),
|
invisible("#group-card"),
|
||||||
|
@ -3,7 +3,7 @@ import DiscourseURL from "discourse/lib/url";
|
|||||||
|
|
||||||
acceptance("User Card - Mobile", { mobileView: true });
|
acceptance("User Card - Mobile", { mobileView: true });
|
||||||
|
|
||||||
QUnit.test("user card", async assert => {
|
QUnit.skip("user card", async assert => {
|
||||||
await visit("/t/internationalization-localization/280");
|
await visit("/t/internationalization-localization/280");
|
||||||
assert.ok(
|
assert.ok(
|
||||||
invisible("#user-card"),
|
invisible("#user-card"),
|
||||||
|
@ -6,6 +6,10 @@ import TopicTrackingState from "discourse/models/topic-tracking-state";
|
|||||||
export default function(name, opts) {
|
export default function(name, opts) {
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
||||||
|
if (opts.skip) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
test(name, function(assert) {
|
test(name, function(assert) {
|
||||||
const appEvents = AppEvents.create();
|
const appEvents = AppEvents.create();
|
||||||
this.site = Discourse.Site.current();
|
this.site = Discourse.Site.current();
|
||||||
@ -51,11 +55,7 @@ export default function(name, opts) {
|
|||||||
return this.render(opts.template);
|
return this.render(opts.template);
|
||||||
});
|
});
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
if (opts.skip) {
|
|
||||||
assert.expect(0);
|
|
||||||
} else {
|
|
||||||
opts.test.call(this, assert);
|
opts.test.call(this, assert);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ const title = "Cool Forum";
|
|||||||
|
|
||||||
widgetTest("basics", {
|
widgetTest("basics", {
|
||||||
template: '{{mount-widget widget="home-logo" args=args}}',
|
template: '{{mount-widget widget="home-logo" args=args}}',
|
||||||
|
skip: true,
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
this.siteSettings.site_logo_url = bigLogo;
|
this.siteSettings.site_logo_url = bigLogo;
|
||||||
this.siteSettings.site_logo_small_url = smallLogo;
|
this.siteSettings.site_logo_small_url = smallLogo;
|
||||||
|
Reference in New Issue
Block a user