DEV: address PR feedback
This commit is contained in:
parent
e9f6566474
commit
fd6bfdc082
|
@ -26,7 +26,7 @@
|
|||
{{#if n.can_delete}}
|
||||
<span class="controls">
|
||||
<DButton
|
||||
@action={{(fn this.removeNote n)}}
|
||||
@action={{fn this.removeNote n}}
|
||||
@icon="far-trash-alt"
|
||||
@class="btn-small btn-danger"
|
||||
@title="user_notes.remove"
|
||||
|
|
|
@ -10,17 +10,11 @@ export default class UserNotesModal extends Component {
|
|||
@service store;
|
||||
|
||||
@tracked newNote;
|
||||
@tracked userId;
|
||||
@tracked userId = this.args.model.userId;
|
||||
@tracked saving = false;
|
||||
postId;
|
||||
callback;
|
||||
postId = this.args.model.postId;
|
||||
callback = this.args.model.callback;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.userId = this.args.model.userId;
|
||||
this.callback = this.args.model.callback;
|
||||
this.postId = this.args.model.postId;
|
||||
}
|
||||
#refreshCount() {
|
||||
if (this.callback) {
|
||||
this.callback(this.args.model.note.length);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<DButton
|
||||
@class="btn btn-default show-user-notes-btn"
|
||||
class="btn-default show-user-notes-btn"
|
||||
@action={{@show}}
|
||||
@icon="pencil-alt"
|
||||
@translatedLabel={{this.label}}
|
||||
|
|
|
@ -41,15 +41,15 @@ acceptance("User Notes", function (needs) {
|
|||
test("creates note from user's profile", async function (assert) {
|
||||
await visit("/admin/users/1/eviltrout");
|
||||
|
||||
const modalClass = ".user-notes-modal .d-modal__container";
|
||||
const modalClass = ".user-notes-modal";
|
||||
assert
|
||||
.dom(".user-controls .show-user-notes-btn")
|
||||
.hasText(I18n.t("user_notes.title"));
|
||||
assert.dom(modalClass).isNotVisible();
|
||||
assert.dom(modalClass).doesNotExist();
|
||||
|
||||
await click(".user-controls .show-user-notes-btn");
|
||||
|
||||
assert.dom(modalClass).isVisible();
|
||||
assert.dom(modalClass).exists();
|
||||
|
||||
await fillIn(`${modalClass} textarea`, "Helpful user");
|
||||
|
||||
|
|
Loading…
Reference in New Issue