test verbatim layout kinds

This commit is contained in:
Yisroel Baum 2026-08-14 09:52:46 +03:00
parent 00cfeebb9a
commit 2101ab50d2
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -8,7 +8,7 @@ const bibleLayout = {
levels: [ levels: [
{ id: 1, kind: 'book', depth: 0, elementCount: 2 }, { id: 1, kind: 'book', depth: 0, elementCount: 2 },
{ id: 2, kind: 'portion', depth: 1, elementCount: 2 }, { id: 2, kind: 'portion', depth: 1, elementCount: 2 },
{ id: 3, kind: 'chapter', depth: 2, elementCount: 1 }, { id: 3, kind: 'Chapter_sections-v2', depth: 2, elementCount: 1 },
], ],
elements: [ elements: [
{ {
@ -26,7 +26,7 @@ const bibleLayout = {
{ {
id: 4, id: 4,
name: 'Chapter 1', name: 'Chapter 1',
kind: 'chapter', kind: 'Chapter_sections-v2',
levelId: 3, levelId: 3,
children: [], children: [],
}, },
@ -90,7 +90,9 @@ describe('set element layout', () => {
.and('have.attr', 'data-element-id', '4') .and('have.attr', 'data-element-id', '4')
cy.contains('.element-node__card', 'Chapter 1') cy.contains('.element-node__card', 'Chapter 1')
.should('be.visible') .should('be.visible')
.and('contain.text', 'chapter') .find('.element-node__kind')
.should('have.text', 'Chapter_sections-v2')
.and('have.css', 'text-transform', 'none')
}) })
it('shows loading and empty layout states', () => { it('shows loading and empty layout states', () => {