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