DEV: skip tests instead of commenting them (#7774)
This commit is contained in:
@@ -1,50 +1,54 @@
|
||||
// import componentTest from "helpers/component-test";
|
||||
//
|
||||
// moduleForComponent("ace-editor", { integration: true });
|
||||
//
|
||||
// componentTest("css editor", {
|
||||
// template: '{{ace-editor mode="css"}}',
|
||||
// test(assert) {
|
||||
// assert.expect(1);
|
||||
// assert.ok(find(".ace_editor").length, "it renders the ace editor");
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// componentTest("html editor", {
|
||||
// template: '{{ace-editor mode="html" content="<b>wat</b>"}}',
|
||||
// test(assert) {
|
||||
// assert.expect(1);
|
||||
// assert.ok(find(".ace_editor").length, "it renders the ace editor");
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// componentTest("sql editor", {
|
||||
// template: '{{ace-editor mode="sql" content="SELECT * FROM users"}}',
|
||||
// test(assert) {
|
||||
// assert.expect(1);
|
||||
// assert.ok(find(".ace_editor").length, "it renders the ace editor");
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// componentTest("disabled editor", {
|
||||
// template:
|
||||
// '{{ace-editor mode="sql" content="SELECT * FROM users" disabled=true}}',
|
||||
// test(assert) {
|
||||
// const $ace = find(".ace_editor");
|
||||
// assert.expect(3);
|
||||
// assert.ok($ace.length, "it renders the ace editor");
|
||||
// assert.equal(
|
||||
// $ace
|
||||
// .parent()
|
||||
// .data()
|
||||
// .editor.getReadOnly(),
|
||||
// true,
|
||||
// "it sets ACE to read-only mode"
|
||||
// );
|
||||
// assert.equal(
|
||||
// $ace.parent().attr("data-disabled"),
|
||||
// "true",
|
||||
// "ACE wrapper has `data-disabled` attribute set to true"
|
||||
// );
|
||||
// }
|
||||
// });
|
||||
import componentTest from "helpers/component-test";
|
||||
|
||||
moduleForComponent("ace-editor", { integration: true });
|
||||
|
||||
componentTest("css editor", {
|
||||
skip: true,
|
||||
template: '{{ace-editor mode="css"}}',
|
||||
test(assert) {
|
||||
assert.expect(1);
|
||||
assert.ok(find(".ace_editor").length, "it renders the ace editor");
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("html editor", {
|
||||
skip: true,
|
||||
template: '{{ace-editor mode="html" content="<b>wat</b>"}}',
|
||||
test(assert) {
|
||||
assert.expect(1);
|
||||
assert.ok(find(".ace_editor").length, "it renders the ace editor");
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("sql editor", {
|
||||
skip: true,
|
||||
template: '{{ace-editor mode="sql" content="SELECT * FROM users"}}',
|
||||
test(assert) {
|
||||
assert.expect(1);
|
||||
assert.ok(find(".ace_editor").length, "it renders the ace editor");
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("disabled editor", {
|
||||
skip: true,
|
||||
template:
|
||||
'{{ace-editor mode="sql" content="SELECT * FROM users" disabled=true}}',
|
||||
test(assert) {
|
||||
const $ace = find(".ace_editor");
|
||||
assert.expect(3);
|
||||
assert.ok($ace.length, "it renders the ace editor");
|
||||
assert.equal(
|
||||
$ace
|
||||
.parent()
|
||||
.data()
|
||||
.editor.getReadOnly(),
|
||||
true,
|
||||
"it sets ACE to read-only mode"
|
||||
);
|
||||
assert.equal(
|
||||
$ace.parent().attr("data-disabled"),
|
||||
"true",
|
||||
"ACE wrapper has `data-disabled` attribute set to true"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import componentTest from "helpers/component-test";
|
||||
// import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import formatTextWithSelection from "helpers/d-editor-helper";
|
||||
import {
|
||||
setTextareaSelection,
|
||||
@@ -672,32 +672,33 @@ testCase(`doesn't jump to bottom with long text`, async function(
|
||||
assert.equal($(textarea).scrollTop(), 0, "it stays scrolled up");
|
||||
});
|
||||
|
||||
// componentTest("emoji", {
|
||||
// template: "{{d-editor value=value}}",
|
||||
// beforeEach() {
|
||||
// // Test adding a custom button
|
||||
// withPluginApi("0.1", api => {
|
||||
// api.onToolbarCreate(toolbar => {
|
||||
// toolbar.addButton({
|
||||
// id: "emoji",
|
||||
// group: "extras",
|
||||
// icon: "far-smile",
|
||||
// action: () => toolbar.context.send("emoji")
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// this.set("value", "hello world.");
|
||||
// },
|
||||
// async test(assert) {
|
||||
// jumpEnd(find("textarea.d-editor-input")[0]);
|
||||
// await click("button.emoji");
|
||||
//
|
||||
// await click(
|
||||
// '.emoji-picker .section[data-section="smileys_&_emotion"] button.emoji[title="grinning"]'
|
||||
// );
|
||||
// assert.equal(this.value, "hello world.:grinning:");
|
||||
// }
|
||||
// });
|
||||
componentTest("emoji", {
|
||||
skip: true,
|
||||
template: "{{d-editor value=value}}",
|
||||
beforeEach() {
|
||||
// Test adding a custom button
|
||||
withPluginApi("0.1", api => {
|
||||
api.onToolbarCreate(toolbar => {
|
||||
toolbar.addButton({
|
||||
id: "emoji",
|
||||
group: "extras",
|
||||
icon: "far-smile",
|
||||
action: () => toolbar.context.send("emoji")
|
||||
});
|
||||
});
|
||||
});
|
||||
this.set("value", "hello world.");
|
||||
},
|
||||
async test(assert) {
|
||||
jumpEnd(find("textarea.d-editor-input")[0]);
|
||||
await click("button.emoji");
|
||||
|
||||
await click(
|
||||
'.emoji-picker .section[data-section="smileys_&_emotion"] button.emoji[title="grinning"]'
|
||||
);
|
||||
assert.equal(this.value, "hello world.:grinning:");
|
||||
}
|
||||
});
|
||||
|
||||
testCase("replace-text event by default", async function(assert) {
|
||||
this.set("value", "red green blue");
|
||||
|
||||
Reference in New Issue
Block a user