Fix school class cypress test
This commit is contained in:
parent
da6bab1789
commit
7407284722
|
|
@ -321,8 +321,9 @@ describe('Teacher Class Management', () => {
|
|||
|
||||
it('tries to create a new class with duplicate name', () => {
|
||||
const name = 'Hill Billy Valley';
|
||||
const oldName = 'Some stupid class';
|
||||
let selectedClass = teacher.selectedClass;
|
||||
selectedClass.name = 'Some stupid class';
|
||||
selectedClass.name = oldName;
|
||||
|
||||
const schoolClasses = [teacher.selectedClass];
|
||||
|
||||
|
|
@ -337,10 +338,6 @@ describe('Teacher Class Management', () => {
|
|||
MeQuery: () => ({
|
||||
me: me(),
|
||||
}),
|
||||
WhateverNode() {
|
||||
console.log('Through here');
|
||||
return {};
|
||||
},
|
||||
MySchoolClassQuery: () => ({
|
||||
me: me(),
|
||||
}),
|
||||
|
|
@ -366,6 +363,7 @@ describe('Teacher Class Management', () => {
|
|||
cy.visit('/me/my-class');
|
||||
|
||||
cy.get('h1').should('exist');
|
||||
cy.getByDataCy('group-list-name').should('contain', oldName);
|
||||
|
||||
cy.get('[data-cy=header-user-widget]').within(() => {
|
||||
cy.get('[data-cy=user-widget-avatar]').click();
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@
|
|||
<div
|
||||
data-cy="class-selection"
|
||||
class="class-selection__selected-class selected-class"
|
||||
@click.stop="showPopover = !showPopover"
|
||||
@click.stop="toggle"
|
||||
>
|
||||
<current-class class="selected-class__text" />
|
||||
<current-class
|
||||
class="selected-class__text"
|
||||
/>
|
||||
<chevron-down class="selected-class__dropdown-icon" />
|
||||
</div>
|
||||
<widget-popover
|
||||
|
|
@ -100,6 +102,9 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
toggle() {
|
||||
this.showPopover = !this.showPopover;
|
||||
},
|
||||
updateSelectedClassAndHidePopover(selectedClass) {
|
||||
this.updateSelectedClass(selectedClass);
|
||||
this.showPopover = false;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<span
|
||||
class="current-class"
|
||||
data-cy="current-class-name"
|
||||
@click.stop="$emit('click', $event)"
|
||||
>{{ currentClassName }}</span>
|
||||
</template>
|
||||
|
||||
|
|
@ -10,7 +9,6 @@
|
|||
import me from '@/mixins/me';
|
||||
|
||||
export default {
|
||||
emits: ['click'],
|
||||
mixins: [me],
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue