mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592)
This commit is contained in:
@ -12,13 +12,13 @@ componentTest("with value", {
|
||||
|
||||
test(assert) {
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.value(),
|
||||
2
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.title(),
|
||||
"feature"
|
||||
@ -30,10 +30,10 @@ componentTest("with excludeCategoryId", {
|
||||
template: "{{category-chooser excludeCategoryId=2}}",
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.notOk(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue(2)
|
||||
.exists()
|
||||
);
|
||||
@ -44,37 +44,37 @@ componentTest("with scopedCategoryId", {
|
||||
template: "{{category-chooser scopedCategoryId=2}}",
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByIndex(0)
|
||||
.title(),
|
||||
"Discussion about features or potential features of Discourse: how they work, why they work, etc."
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByIndex(0)
|
||||
.value(),
|
||||
2
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByIndex(1)
|
||||
.title(),
|
||||
"My idea here is to have mini specs for features we would like built but have no bandwidth to build"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByIndex(1)
|
||||
.value(),
|
||||
26
|
||||
);
|
||||
assert.equal(this.get("subject").rows().length, 2);
|
||||
assert.equal(this.subject.rows().length, 2);
|
||||
|
||||
await this.get("subject").fillInFilter("dev");
|
||||
await this.subject.fillInFilter("dev");
|
||||
|
||||
assert.equal(this.get("subject").rows().length, 3);
|
||||
assert.equal(this.subject.rows().length, 3);
|
||||
}
|
||||
});
|
||||
|
||||
@ -87,13 +87,13 @@ componentTest("with allowUncategorized=null", {
|
||||
|
||||
test(assert) {
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.value(),
|
||||
null
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.title(),
|
||||
"category"
|
||||
@ -110,13 +110,13 @@ componentTest("with allowUncategorized=null rootNone=true", {
|
||||
|
||||
test(assert) {
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.value(),
|
||||
null
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.title(),
|
||||
"category"
|
||||
@ -135,13 +135,13 @@ componentTest("with disallowed uncategorized, rootNone and rootNoneLabel", {
|
||||
|
||||
test(assert) {
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.value(),
|
||||
null
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.title(),
|
||||
"category"
|
||||
@ -158,13 +158,13 @@ componentTest("with allowed uncategorized", {
|
||||
|
||||
test(assert) {
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.value(),
|
||||
null
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.title(),
|
||||
"uncategorized"
|
||||
@ -181,13 +181,13 @@ componentTest("with allowed uncategorized and rootNone", {
|
||||
|
||||
test(assert) {
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.value(),
|
||||
null
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.title(),
|
||||
"(no category)"
|
||||
@ -206,13 +206,13 @@ componentTest("with allowed uncategorized rootNone and rootNoneLabel", {
|
||||
|
||||
test(assert) {
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.value(),
|
||||
null
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.title(),
|
||||
"root none label"
|
||||
|
Reference in New Issue
Block a user