Add new check for form title
This commit is contained in:
parent
704da5a749
commit
0977f53bcc
|
|
@ -5,7 +5,7 @@ describe('Onboarding', () => {
|
|||
cy.setup();
|
||||
});
|
||||
|
||||
it.only('shows the onboarding steps and finishes them', () => {
|
||||
it('shows the onboarding steps and finishes them', () => {
|
||||
let onboardingVisited = false;
|
||||
cy.mockGraphqlOps({
|
||||
operations: {
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ describe('The Room Page', () => {
|
|||
cy.getByDataCy('add-room-entry-modal').should('exist');
|
||||
});
|
||||
|
||||
it.only('changes class while on room page', () => {
|
||||
it('changes class while on room page', () => {
|
||||
const {me} = MeQuery;
|
||||
const operations = {
|
||||
MeQuery: {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ describe('The Rooms Page', () => {
|
|||
{
|
||||
node: {
|
||||
schoolClass: {
|
||||
id: 'selectedClassId',
|
||||
id: btoa('SchoolClassNode:selectedClassId'),
|
||||
},
|
||||
|
||||
},
|
||||
|
|
@ -85,6 +85,7 @@ describe('The Rooms Page', () => {
|
|||
});
|
||||
|
||||
it('adds a room as teacher', () => {
|
||||
const MeQuery = getMinimalMe({isTeacher: true});
|
||||
const getRoom = (title, appearance, description) => {
|
||||
let id = title.toLowerCase().replace(' ', '-');
|
||||
return {
|
||||
|
|
@ -94,6 +95,7 @@ describe('The Rooms Page', () => {
|
|||
entryCount: 3,
|
||||
appearance: appearance,
|
||||
description: description,
|
||||
schoolClass: MeQuery.me.selectedClass
|
||||
};
|
||||
};
|
||||
let rooms = [
|
||||
|
|
@ -101,7 +103,7 @@ describe('The Rooms Page', () => {
|
|||
];
|
||||
|
||||
const operations = {
|
||||
MeQuery: getMinimalMe({isTeacher: true}),
|
||||
MeQuery,
|
||||
RoomsQuery() {
|
||||
return {
|
||||
rooms: {
|
||||
|
|
@ -125,6 +127,7 @@ describe('The Rooms Page', () => {
|
|||
cy.visit('/rooms');
|
||||
cy.getByDataCy('room-widget').should('have.length', 1);
|
||||
cy.getByDataCy('add-room').click();
|
||||
cy.getByDataCy('form-title').should('contain', 'Neuer Raum');
|
||||
cy.getByDataCy('page-form-input-titel').type('Strg F');
|
||||
cy.getByDataCy('school-class-select').should('not.exist');
|
||||
cy.getByDataCy('color-select').eq(2).click();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
class="page-form"
|
||||
@submit.prevent="$emit('save')">
|
||||
<div class="page-form__content">
|
||||
<h1 class="page-form__heading">{{ title }}</h1>
|
||||
<h1
|
||||
class="page-form__heading"
|
||||
data-cy="form-title">{{ title }}</h1>
|
||||
<slot/>
|
||||
</div>
|
||||
<div class="page-form__footer">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<page-form
|
||||
class="room-form"
|
||||
title="Neues Board"
|
||||
title="Neuer Raum"
|
||||
@save="$emit('save', localRoom)">
|
||||
<page-form-input
|
||||
v-model="localRoom.title"
|
||||
|
|
|
|||
Loading…
Reference in New Issue