mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
apply prettier on gigantic find and replace (#7604)
This commit is contained in:
@ -15,24 +15,9 @@ componentTest("default", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue(1)
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue(2)
|
||||
.name(),
|
||||
"world"
|
||||
);
|
||||
assert.equal(this.subject.header().name(), "hello");
|
||||
assert.equal(this.subject.rowByValue(1).name(), "hello");
|
||||
assert.equal(this.subject.rowByValue(2).name(), "world");
|
||||
}
|
||||
});
|
||||
|
||||
@ -48,18 +33,8 @@ componentTest("with valueAttribute", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue(0)
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue(1)
|
||||
.name(),
|
||||
"world"
|
||||
);
|
||||
assert.equal(this.subject.rowByValue(0).name(), "hello");
|
||||
assert.equal(this.subject.rowByValue(1).name(), "world");
|
||||
}
|
||||
});
|
||||
|
||||
@ -72,18 +47,8 @@ componentTest("with nameProperty", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue(0)
|
||||
.name(),
|
||||
"hello"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue(1)
|
||||
.name(),
|
||||
"world"
|
||||
);
|
||||
assert.equal(this.subject.rowByValue(0).name(), "hello");
|
||||
assert.equal(this.subject.rowByValue(1).name(), "world");
|
||||
}
|
||||
});
|
||||
|
||||
@ -96,18 +61,8 @@ componentTest("with an array as content", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue("evil")
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue("trout")
|
||||
.name(),
|
||||
"trout"
|
||||
);
|
||||
assert.equal(this.subject.rowByValue("evil").name(), "evil");
|
||||
assert.equal(this.subject.rowByValue("trout").name(), "trout");
|
||||
}
|
||||
});
|
||||
|
||||
@ -122,30 +77,10 @@ componentTest("with value and none as a string", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.noneRow()
|
||||
.name(),
|
||||
"none"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue("evil")
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue("trout")
|
||||
.name(),
|
||||
"trout"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"trout"
|
||||
);
|
||||
assert.equal(this.subject.noneRow().name(), "none");
|
||||
assert.equal(this.subject.rowByValue("evil").name(), "evil");
|
||||
assert.equal(this.subject.rowByValue("trout").name(), "trout");
|
||||
assert.equal(this.subject.header().name(), "trout");
|
||||
assert.equal(this.value, "trout");
|
||||
|
||||
await this.subject.selectNoneRow();
|
||||
@ -165,30 +100,10 @@ componentTest("with value and none as an object", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.noneRow()
|
||||
.name(),
|
||||
"none"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue("evil")
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.rowByValue("trout")
|
||||
.name(),
|
||||
"trout"
|
||||
);
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"evil"
|
||||
);
|
||||
assert.equal(this.subject.noneRow().name(), "none");
|
||||
assert.equal(this.subject.rowByValue("evil").name(), "evil");
|
||||
assert.equal(this.subject.rowByValue("trout").name(), "trout");
|
||||
assert.equal(this.subject.header().name(), "evil");
|
||||
assert.equal(this.value, "evil");
|
||||
|
||||
await this.subject.selectNoneRow();
|
||||
@ -209,12 +124,7 @@ componentTest("with no value and none as an object", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"none"
|
||||
);
|
||||
assert.equal(this.subject.header().name(), "none");
|
||||
}
|
||||
});
|
||||
|
||||
@ -230,12 +140,7 @@ componentTest("with no value and none string", {
|
||||
async test(assert) {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
"none"
|
||||
);
|
||||
assert.equal(this.subject.header().name(), "none");
|
||||
}
|
||||
});
|
||||
|
||||
@ -250,9 +155,7 @@ componentTest("with no value and no none", {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
this.subject.header().name(),
|
||||
"evil",
|
||||
"it sets the first row as value"
|
||||
);
|
||||
@ -270,9 +173,7 @@ componentTest("with empty string as value", {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
this.subject.header().name(),
|
||||
"evil",
|
||||
"it sets the first row as value"
|
||||
);
|
||||
@ -292,9 +193,7 @@ componentTest("with noneLabel", {
|
||||
await this.subject.expand();
|
||||
|
||||
assert.equal(
|
||||
this.subject
|
||||
.header()
|
||||
.name(),
|
||||
this.subject.header().name(),
|
||||
"none",
|
||||
"it displays noneLabel as the header name"
|
||||
);
|
||||
|
Reference in New Issue
Block a user