test overdue dashboard assignments
This commit is contained in:
parent
2c38b01562
commit
7bc7ad207b
3 changed files with 42 additions and 26 deletions
|
|
@ -36,6 +36,7 @@ describe("today's assignments", () => {
|
|||
assignments: [
|
||||
{
|
||||
id: 12,
|
||||
scheduledDate: '2026-08-13',
|
||||
schedule: {
|
||||
id: 73,
|
||||
set: { name: 'Bible' },
|
||||
|
|
@ -48,6 +49,7 @@ describe("today's assignments", () => {
|
|||
},
|
||||
{
|
||||
id: 13,
|
||||
scheduledDate: browserToday,
|
||||
schedule: {
|
||||
id: 81,
|
||||
set: { name: 'Course' },
|
||||
|
|
@ -77,6 +79,16 @@ describe("today's assignments", () => {
|
|||
'have.length',
|
||||
2,
|
||||
)
|
||||
cy.get('[data-today-assignment]')
|
||||
.first()
|
||||
.should('have.attr', 'data-today-assignment', '12')
|
||||
cy.get('[data-today-assignment="12"] .today-assignment__overdue').should(
|
||||
'have.text',
|
||||
'Overdue · Due Aug 13, 2026',
|
||||
)
|
||||
cy.get('[data-today-assignment="13"] .today-assignment__overdue').should(
|
||||
'not.exist',
|
||||
)
|
||||
cy.contains('a', 'Genesis / Creation / Chapter 1')
|
||||
.should('contain.text', 'Bible')
|
||||
.and('have.attr', 'href', '/schedules/73')
|
||||
|
|
@ -109,7 +121,7 @@ describe("today's assignments", () => {
|
|||
|
||||
cy.get('.today-assignments [role="status"]').should(
|
||||
'contain.text',
|
||||
'Nothing is assigned for today.',
|
||||
'Nothing is due today.',
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -121,6 +133,7 @@ describe("today's assignments", () => {
|
|||
assignments: [
|
||||
{
|
||||
id: 12,
|
||||
scheduledDate: browserToday,
|
||||
schedule: {
|
||||
id: 73,
|
||||
set: { name: 'Bible' },
|
||||
|
|
@ -177,7 +190,7 @@ describe("today's assignments", () => {
|
|||
cy.get('[data-today-assignment="12"]').should('not.exist')
|
||||
cy.get('.today-assignments [role="status"]').should(
|
||||
'contain.text',
|
||||
'Nothing is assigned for today.',
|
||||
'Nothing is due today.',
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -219,7 +232,7 @@ describe("today's assignments", () => {
|
|||
|
||||
cy.get('.today-assignments [role="status"]').should(
|
||||
'contain.text',
|
||||
'Nothing is assigned for today.',
|
||||
'Nothing is due today.',
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue