Update new component
This commit is contained in:
parent
16f7208db2
commit
b494fc08d3
|
|
@ -111,7 +111,7 @@ describe('The Room Page', () => {
|
||||||
|
|
||||||
cy.visit(`/room/${slug}`);
|
cy.visit(`/room/${slug}`);
|
||||||
cy.getByDataCy('room-visibility-status').should('contain', 'alle Lernenden');
|
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('change-visibility').click();
|
||||||
cy.getByDataCy('modal-title').should('contain', 'Sichtbarkeit anpassen');
|
cy.getByDataCy('modal-title').should('contain', 'Sichtbarkeit anpassen');
|
||||||
cy.get('.change-visibility__radio').should('have.length', 2);
|
cy.get('.change-visibility__radio').should('have.length', 2);
|
||||||
|
|
@ -128,7 +128,7 @@ describe('The Room Page', () => {
|
||||||
checkRadioButton();
|
checkRadioButton();
|
||||||
cy.getByDataCy('modal-save-button').click();
|
cy.getByDataCy('modal-save-button').click();
|
||||||
cy.getByDataCy('room-visibility-status').should('contain', 'eigenen Beiträge');
|
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('change-visibility').click();
|
||||||
cy.getByDataCy('modal-title').should('contain', 'Sichtbarkeit anpassen');
|
cy.getByDataCy('modal-title').should('contain', 'Sichtbarkeit anpassen');
|
||||||
cy.get('.change-visibility__radio--selected').should('have.length', 1).should('contain', 'eigenen Beiträge');
|
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', () => {
|
it('deletes the room and goes back to the overview', () => {
|
||||||
|
const MeQuery = getMinimalMe();
|
||||||
|
const schoolClass = MeQuery.me.selectedClass;
|
||||||
const roomToDelete = {
|
const roomToDelete = {
|
||||||
id: 'room-to-delete',
|
id: btoa('RoomNode:room-to-delete'),
|
||||||
|
schoolClass,
|
||||||
|
slug: 'delete-me',
|
||||||
roomEntries: {
|
roomEntries: {
|
||||||
edges: [],
|
edges: [],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const otherRoom = {
|
const otherRoom = {
|
||||||
id: 'otherRoom',
|
id: btoa('RoomNode:otherRoom'),
|
||||||
|
schoolClass,
|
||||||
};
|
};
|
||||||
let rooms = [roomToDelete, otherRoom];
|
let rooms = [roomToDelete, otherRoom];
|
||||||
const operations = {
|
const operations = {
|
||||||
MeQuery: getMinimalMe({}),
|
MeQuery,
|
||||||
RoomsQuery() {
|
RoomsQuery() {
|
||||||
return {
|
return {
|
||||||
rooms: {
|
rooms: {
|
||||||
|
|
@ -171,7 +176,7 @@ describe('The Room Page', () => {
|
||||||
cy.visit(`/rooms`);
|
cy.visit(`/rooms`);
|
||||||
cy.getByDataCy('room-widget').should('have.length', 2);
|
cy.getByDataCy('room-widget').should('have.length', 2);
|
||||||
cy.getByDataCy('room-widget').first().click();
|
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.getByDataCy('delete-room').click();
|
||||||
cy.url().should('include', 'rooms');
|
cy.url().should('include', 'rooms');
|
||||||
cy.getByDataCy('room-widget').should('have.length', 1);
|
cy.getByDataCy('room-widget').should('have.length', 1);
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ describe('The Rooms Page', () => {
|
||||||
cy.visit('/rooms');
|
cy.visit('/rooms');
|
||||||
|
|
||||||
cy.getByDataCy('room-widget').should('have.length', 1);
|
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', () => {
|
it('adds a room as teacher', () => {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<li class="popover-links__link">
|
<li
|
||||||
|
class="popover-links__link"
|
||||||
|
@click="$emit('link-action')">
|
||||||
<a
|
<a
|
||||||
class="popover-link"
|
class="popover-link"
|
||||||
@click="$emit('link-action')">
|
@click="$emit('link-action')">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue