mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:51:05 +08:00
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592)
This commit is contained in:
@ -13,22 +13,22 @@ componentTest("default", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue(1)
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue(2)
|
||||
.name(),
|
||||
"world"
|
||||
@ -46,16 +46,16 @@ componentTest("with valueAttribute", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue(0)
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue(1)
|
||||
.name(),
|
||||
"world"
|
||||
@ -70,16 +70,16 @@ componentTest("with nameProperty", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue(0)
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue(1)
|
||||
.name(),
|
||||
"world"
|
||||
@ -94,16 +94,16 @@ componentTest("with an array as content", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue("evil")
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue("trout")
|
||||
.name(),
|
||||
"trout"
|
||||
@ -120,37 +120,37 @@ componentTest("with value and none as a string", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.noneRow()
|
||||
.name(),
|
||||
"none"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue("evil")
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue("trout")
|
||||
.name(),
|
||||
"trout"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"trout"
|
||||
);
|
||||
assert.equal(this.get("value"), "trout");
|
||||
assert.equal(this.value, "trout");
|
||||
|
||||
await this.get("subject").selectNoneRow();
|
||||
await this.subject.selectNoneRow();
|
||||
|
||||
assert.equal(this.get("value"), null);
|
||||
assert.equal(this.value, null);
|
||||
}
|
||||
});
|
||||
|
||||
@ -163,37 +163,37 @@ componentTest("with value and none as an object", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.noneRow()
|
||||
.name(),
|
||||
"none"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue("evil")
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.rowByValue("trout")
|
||||
.name(),
|
||||
"trout"
|
||||
);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(this.get("value"), "evil");
|
||||
assert.equal(this.value, "evil");
|
||||
|
||||
await this.get("subject").selectNoneRow();
|
||||
await this.subject.selectNoneRow();
|
||||
|
||||
assert.equal(this.get("value"), null);
|
||||
assert.equal(this.value, null);
|
||||
}
|
||||
});
|
||||
|
||||
@ -207,10 +207,10 @@ componentTest("with no value and none as an object", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"none"
|
||||
@ -228,10 +228,10 @@ componentTest("with no value and none string", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"none"
|
||||
@ -247,10 +247,10 @@ componentTest("with no value and no none", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"evil",
|
||||
@ -267,10 +267,10 @@ componentTest("with empty string as value", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"evil",
|
||||
@ -289,10 +289,10 @@ componentTest("with noneLabel", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"none",
|
||||
|
Reference in New Issue
Block a user