Add failing test for the support problem on 2023-08-29
This commit is contained in:
parent
f71f7eff0f
commit
ea21a2ddc2
|
|
@ -0,0 +1,70 @@
|
|||
import { getMinimalMe } from '../../../support/helpers';
|
||||
|
||||
describe('Displays Edit Room Entry Page', () => {
|
||||
const MeQuery = getMinimalMe();
|
||||
const roomEntry = {
|
||||
id: 1,
|
||||
slug: 'hello',
|
||||
title: 'A Room Entry',
|
||||
comments: [],
|
||||
author: {
|
||||
id: MeQuery.me.id,
|
||||
},
|
||||
};
|
||||
const content = {
|
||||
id: '4885f806-1096-46a3-bfb1-fcf33bdec045',
|
||||
type: 'subtitle',
|
||||
value: {
|
||||
text: 'I like turtles!',
|
||||
},
|
||||
};
|
||||
const operations = {
|
||||
MeQuery,
|
||||
RoomEntryQuery: {
|
||||
roomEntry: {
|
||||
room: {
|
||||
slug: 'some-room',
|
||||
},
|
||||
comments: undefined,
|
||||
...roomEntry,
|
||||
contents: [content],
|
||||
},
|
||||
},
|
||||
RoomEntriesQuery: {
|
||||
room: {
|
||||
roomEntries: {
|
||||
edges: [
|
||||
{
|
||||
node: roomEntry,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
cy.setup();
|
||||
cy.mockGraphqlOps({
|
||||
operations,
|
||||
});
|
||||
});
|
||||
|
||||
it('visits the page and fills out the form', () => {
|
||||
cy.visit('/room/some-room');
|
||||
|
||||
cy.getByDataCy('room-entry').within(() => {
|
||||
cy.getByDataCy('toggle-more-actions-menu').click();
|
||||
cy.getByDataCy('edit-room-entry').click();
|
||||
});
|
||||
|
||||
cy.getByDataCy('content-form-title-section').within(() => {
|
||||
cy.getByDataCy('input-with-label-input').should('contain.value', roomEntry.title);
|
||||
});
|
||||
|
||||
cy.getByDataCy('content-form-section-title').should('contain', 'Untertitel');
|
||||
cy.getByDataCy('subtitle-form-input').within(() => {
|
||||
cy.getByDataCy('input-with-label-input').should('contain.value', content.value.text);
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue