mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:41:24 +08:00
DEV: Add rawTitle property support to modal-tab (#10221)
```js const panels = [ { id: "test1", rawTitle: "Test 1" }, { id: "test2", rawTitle: "Test 2" } ]; showModal("a-modal", { panels })); ```
This commit is contained in:
@ -54,6 +54,25 @@ QUnit.skip("modal", async function(assert) {
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("rawTitle in modal panels", async function(assert) {
|
||||
Ember.TEMPLATES["modal/test-raw-title-panels"] = Ember.HTMLBars.compile("");
|
||||
const panels = [
|
||||
{ id: "test1", rawTitle: "Test 1" },
|
||||
{ id: "test2", rawTitle: "Test 2" }
|
||||
];
|
||||
|
||||
await visit("/");
|
||||
run(() => showModal("test-raw-title-panels", { panels }));
|
||||
|
||||
assert.equal(
|
||||
find(".d-modal .modal-tab:first-child")
|
||||
.text()
|
||||
.trim(),
|
||||
"Test 1",
|
||||
"it should display the raw title"
|
||||
);
|
||||
});
|
||||
|
||||
acceptance("Modal Keyboard Events", { loggedIn: true });
|
||||
|
||||
QUnit.test("modal-keyboard-events", async function(assert) {
|
||||
|
Reference in New Issue
Block a user