FIX: prevents exception when showing replacements (#28543)

This commit is contained in:
Joffrey JAFFEUX 2024-08-26 11:37:12 +02:00 committed by GitHub
parent 981110d96e
commit 3eb7aa866c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -9,7 +9,7 @@ export default class AdminWatchedWord extends Component {
@service dialog;
get tags() {
return this.args.word.replacement.replacement.split(",");
return this.args.word.replacement.split(",");
}
@action

View File

@ -147,6 +147,18 @@ acceptance("Admin - Watched Words", function (needs) {
assert.dom(".d-modal__body li .match").hasText("Hello");
assert.dom(".d-modal__body li .tag").hasText("greeting");
});
test("showing/hidding words - tag", async function (assert) {
await visit("/admin/customize/watched_words/action/tag");
await click(".show-words-checkbox");
assert.dom(".watched-word").hasText(" hello → greeting");
await click(".show-words-checkbox");
assert.dom(".watched-word").doesNotExist();
});
});
acceptance("Admin - Watched Words - Emoji Replacement", function (needs) {