test explicit scheduling levels

This commit is contained in:
Yisroel Baum 2026-08-11 23:00:11 +03:00
parent 3cf1aff6a9
commit dfca13936a
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 38 additions and 12 deletions

View file

@ -5,29 +5,37 @@ const authenticatedUser = {
const bibleLayout = {
set: { id: 41, name: 'Bible' },
levels: [
{ id: 1, kind: 'book', depth: 0, elementCount: 2 },
{ id: 2, kind: 'portion', depth: 1, elementCount: 2 },
{ id: 3, kind: 'chapter', depth: 2, elementCount: 1 },
],
elements: [
{
id: 1,
name: 'Genesis',
kind: 'book',
levelId: 1,
children: [
{
id: 3,
name: 'Creation',
kind: 'portion',
levelId: 2,
children: [
{
id: 4,
name: 'Chapter 1',
kind: 'chapter',
levelId: 3,
children: [],
},
],
},
{ id: 5, name: 'Noah', kind: 'portion', children: [] },
{ id: 5, name: 'Noah', kind: 'portion', levelId: 2, children: [] },
],
},
{ id: 2, name: 'Exodus', kind: 'book', children: [] },
{ id: 2, name: 'Exodus', kind: 'book', levelId: 1, children: [] },
],
}
@ -89,7 +97,7 @@ describe('set element layout', () => {
cy.intercept('GET', '**/api/sets/41', {
delay: 500,
statusCode: 200,
body: { set: { id: 41, name: 'Empty set' }, elements: [] },
body: { set: { id: 41, name: 'Empty set' }, levels: [], elements: [] },
}).as('layout')
cy.visit('/sets/41')