Fix cypress tests

This commit is contained in:
Ramon Wenger 2019-12-09 11:14:34 +01:00
parent 44ad1e6a8a
commit 3dc778d41b
2 changed files with 15 additions and 3 deletions

View File

@ -8,7 +8,7 @@
@edit-note="editNote"
:bookmarked="chapter.bookmark"
@bookmark="bookmark(!chapter.bookmark)"
:note="chapter.bookmark.note"
:note="note"
></bookmark-actions>
<p class="chapter__description">
{{chapter.description}}
@ -58,6 +58,12 @@
schoolClass() {
return this.me.selectedClass;
},
note() {
if (!(this.chapter && this.chapter.bookmark)) {
return;
}
return this.chapter.bookmark.note;
}
},
data() {
@ -77,7 +83,7 @@
bookmarked
}
},
update: (store, response) => {
update: (store, response) => {
const query = CHAPTER_QUERY;
const variables = {id};
const data = store.readQuery({

View File

@ -12,7 +12,7 @@
@add-note="addNote"
@edit-note="editNote"
:bookmarked="module.bookmark"
:note="module.bookmark.note"
:note="note"
@bookmark="bookmark(!module.bookmark)"></bookmark-actions>
<div class="module__intro" v-html="module.intro"></div>
</div>
@ -81,6 +81,12 @@
},
isStudent() {
return !this.me.permissions.includes('users.can_manage_school_class_content');
},
note() {
if (!(this.module && this.module.bookmark)) {
return;
}
return this.module.bookmark.note;
}
},