diff --git a/frontend/website/cypress/e2e/set-scheduling.cy.ts b/frontend/website/cypress/e2e/set-scheduling.cy.ts index 77a5d41..1860145 100644 --- a/frontend/website/cypress/e2e/set-scheduling.cy.ts +++ b/frontend/website/cypress/e2e/set-scheduling.cy.ts @@ -8,7 +8,7 @@ const bibleLayout = { levels: [ { id: 1, kind: 'book', depth: 0, elementCount: 2 }, { id: 2, kind: 'portion', depth: 1, elementCount: 2 }, - { id: 3, kind: 'chapter', depth: 2, elementCount: 2 }, + { id: 3, kind: 'Chapter_sections-v2', depth: 2, elementCount: 2 }, ], elements: [ { @@ -26,7 +26,7 @@ const bibleLayout = { { id: 4, name: 'Chapter 1', - kind: 'chapter', + kind: 'Chapter_sections-v2', levelId: 3, children: [], }, @@ -49,7 +49,7 @@ const bibleLayout = { { id: 6, name: 'Chapter 1', - kind: 'chapter', + kind: 'Chapter_sections-v2', levelId: 3, children: [], }, @@ -64,7 +64,7 @@ const scheduleDetail = { schedule: { id: 73, set: { name: 'Bible' }, - elementKind: 'chapter', + elementKind: 'Chapter_sections-v2', startDate: '2026-08-10', targetDate: '2026-08-12', assignmentCount: 2, @@ -76,7 +76,7 @@ const scheduleDetail = { id: 1, element: { name: 'Chapter 1', - kind: 'chapter', + kind: 'Chapter_sections-v2', path: ['Genesis', 'Creation', 'Chapter 1'], }, }, @@ -90,7 +90,7 @@ const scheduleDetail = { id: 2, element: { name: 'Chapter 1', - kind: 'chapter', + kind: 'Chapter_sections-v2', path: ['Exodus', 'Shemot', 'Chapter 1'], }, }, @@ -139,7 +139,7 @@ describe('set scheduling', () => { cy.get('h1').should('have.text', 'Schedule Bible') cy.get('#schedule-level option').then(($options) => { expect([...$options].map((option) => option.textContent?.trim())).to.deep.equal( - ['Choose a level', 'Book (2)', 'Portion (2)', 'Chapter (2)'], + ['Choose a level', 'Book (2)', 'Portion (2)', 'Chapter_sections-v2 (2)'], ) }) cy.get('#schedule-level').select('3') @@ -153,7 +153,8 @@ describe('set scheduling', () => { cy.get('[data-schedule-day]').should('have.length', 3) cy.get('[data-schedule-date="2026-08-10"]') .should('contain.text', 'Genesis / Creation / Chapter 1') - .and('contain.text', 'Chapter') + .find('.assignment-kind') + .should('have.text', 'Chapter_sections-v2') cy.get('[data-schedule-date="2026-08-11"]') .should('contain.text', 'Rest day') .and('not.contain.text', 'Chapter 1') @@ -207,7 +208,8 @@ describe('set scheduling', () => { cy.wait('@me') cy.wait('@schedule') cy.get('h1').should('have.text', 'Bible schedule') - cy.contains('2 chapters across 3 days').should('be.visible') + cy.get('.eyebrow').should('have.text', 'Chapter_sections-v2 plan') + cy.contains('2 Chapter_sections-v2 assignments across 3 days').should('be.visible') cy.intercept('GET', '**/api/schedules/74', { statusCode: 404, @@ -232,7 +234,7 @@ describe('set scheduling', () => { { id: 73, set: { name: 'Bible' }, - elementKind: 'chapter', + elementKind: 'Chapter_sections-v2', startDate: '2026-08-10', targetDate: '2026-08-12', assignmentCount: 2, @@ -250,8 +252,8 @@ describe('set scheduling', () => { cy.get('#schedules-heading').should('have.text', 'Your schedules') cy.get('ul[aria-label="Your schedules"]') .should('contain.text', 'Bible') - .and('contain.text', 'Chapter') .and('contain.text', '2 assignments') + cy.get('.schedule-card__heading p').should('have.text', 'Chapter_sections-v2') cy.contains('a', 'Bible').should('have.attr', 'href', '/schedules/73') }) })