Update new component

This commit is contained in:
Ramon Wenger 2021-09-01 15:48:31 +02:00
parent 16f7208db2
commit b494fc08d3
3 changed files with 15 additions and 8 deletions

View File

@ -111,7 +111,7 @@ describe('The Room Page', () => {
cy.visit(`/room/${slug}`);
cy.getByDataCy('room-visibility-status').should('contain', 'alle Lernenden');
cy.getByDataCy('toggle-room-actions-menu').click();
cy.getByDataCy('toggle-more-actions-menu').click();
cy.getByDataCy('change-visibility').click();
cy.getByDataCy('modal-title').should('contain', 'Sichtbarkeit anpassen');
cy.get('.change-visibility__radio').should('have.length', 2);
@ -128,7 +128,7 @@ describe('The Room Page', () => {
checkRadioButton();
cy.getByDataCy('modal-save-button').click();
cy.getByDataCy('room-visibility-status').should('contain', 'eigenen Beiträge');
cy.getByDataCy('toggle-room-actions-menu').click();
cy.getByDataCy('toggle-more-actions-menu').click();
cy.getByDataCy('change-visibility').click();
cy.getByDataCy('modal-title').should('contain', 'Sichtbarkeit anpassen');
cy.get('.change-visibility__radio--selected').should('have.length', 1).should('contain', 'eigenen Beiträge');
@ -136,18 +136,23 @@ describe('The Room Page', () => {
});
it('deletes the room and goes back to the overview', () => {
const MeQuery = getMinimalMe();
const schoolClass = MeQuery.me.selectedClass;
const roomToDelete = {
id: 'room-to-delete',
id: btoa('RoomNode:room-to-delete'),
schoolClass,
slug: 'delete-me',
roomEntries: {
edges: [],
},
};
const otherRoom = {
id: 'otherRoom',
id: btoa('RoomNode:otherRoom'),
schoolClass,
};
let rooms = [roomToDelete, otherRoom];
const operations = {
MeQuery: getMinimalMe({}),
MeQuery,
RoomsQuery() {
return {
rooms: {
@ -171,7 +176,7 @@ describe('The Room Page', () => {
cy.visit(`/rooms`);
cy.getByDataCy('room-widget').should('have.length', 2);
cy.getByDataCy('room-widget').first().click();
cy.getByDataCy('toggle-room-actions-menu').click();
cy.getByDataCy('toggle-more-actions-menu').click();
cy.getByDataCy('delete-room').click();
cy.url().should('include', 'rooms');
cy.getByDataCy('room-widget').should('have.length', 1);

View File

@ -80,7 +80,7 @@ describe('The Rooms Page', () => {
cy.visit('/rooms');
cy.getByDataCy('room-widget').should('have.length', 1);
cy.getByDataCy('toggle-room-actions-menu').should('not.exist');
cy.getByDataCy('toggle-more-actions-menu').should('not.exist');
});
it('adds a room as teacher', () => {

View File

@ -1,5 +1,7 @@
<template>
<li class="popover-links__link">
<li
class="popover-links__link"
@click="$emit('link-action')">
<a
class="popover-link"
@click="$emit('link-action')">