test compact today decks
This commit is contained in:
parent
fea6c3f7a8
commit
934965025e
1 changed files with 39 additions and 4 deletions
|
|
@ -86,6 +86,32 @@ describe("today's assignments", () => {
|
||||||
path: ['Genesis', 'The fall', 'Chapter 3'],
|
path: ['Genesis', 'The fall', 'Chapter 3'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 16,
|
||||||
|
scheduledDate: browserToday,
|
||||||
|
schedule: {
|
||||||
|
id: 73,
|
||||||
|
set: { name: 'Bible' },
|
||||||
|
},
|
||||||
|
element: {
|
||||||
|
name: 'Chapter 4',
|
||||||
|
kind: 'Chapter_sections-v2',
|
||||||
|
path: ['Genesis', 'Cain and Abel', 'Chapter 4'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 17,
|
||||||
|
scheduledDate: browserToday,
|
||||||
|
schedule: {
|
||||||
|
id: 73,
|
||||||
|
set: { name: 'Bible' },
|
||||||
|
},
|
||||||
|
element: {
|
||||||
|
name: 'Chapter 5',
|
||||||
|
kind: 'Chapter_sections-v2',
|
||||||
|
path: ['Genesis', 'Generations', 'Chapter 5'],
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -117,15 +143,22 @@ describe("today's assignments", () => {
|
||||||
)
|
)
|
||||||
cy.get('[data-today-assignment="14"]').should('not.exist')
|
cy.get('[data-today-assignment="14"]').should('not.exist')
|
||||||
cy.get('[data-today-assignment="15"]').should('not.exist')
|
cy.get('[data-today-assignment="15"]').should('not.exist')
|
||||||
|
cy.get('[data-today-assignment="16"]').should('not.exist')
|
||||||
|
cy.get('[data-today-assignment="17"]').should('not.exist')
|
||||||
cy.get('[data-today-schedule="73"]')
|
cy.get('[data-today-schedule="73"]')
|
||||||
.should('have.attr', 'data-due-count', '3')
|
.should('have.attr', 'data-due-count', '5')
|
||||||
.and('contain.text', '3 due now')
|
.and('contain.text', '5 due now')
|
||||||
.and('have.class', 'today-assignment-stack--queued')
|
.and('have.class', 'today-assignment-stack--queued')
|
||||||
|
.within(() => {
|
||||||
|
cy.get('[data-stack-layer]').should('have.length', 3)
|
||||||
|
})
|
||||||
cy.get('[data-today-schedule="81"]')
|
cy.get('[data-today-schedule="81"]')
|
||||||
.should('have.attr', 'data-due-count', '1')
|
.should('have.attr', 'data-due-count', '1')
|
||||||
.and('not.have.class', 'today-assignment-stack--queued')
|
.and('not.have.class', 'today-assignment-stack--queued')
|
||||||
.find('.today-assignment__queue-count')
|
.within(() => {
|
||||||
.should('not.exist')
|
cy.get('.today-assignment__queue-count').should('not.exist')
|
||||||
|
cy.get('[data-stack-layer]').should('not.exist')
|
||||||
|
})
|
||||||
cy.contains('a', 'Genesis / Creation / Chapter 1')
|
cy.contains('a', 'Genesis / Creation / Chapter 1')
|
||||||
.should('contain.text', 'Bible')
|
.should('contain.text', 'Bible')
|
||||||
.and('have.attr', 'href', '/schedules/73')
|
.and('have.attr', 'href', '/schedules/73')
|
||||||
|
|
@ -238,6 +271,7 @@ describe("today's assignments", () => {
|
||||||
cy.wait('@todayAssignments')
|
cy.wait('@todayAssignments')
|
||||||
|
|
||||||
cy.get('[data-today-assignment="12"]').within(() => {
|
cy.get('[data-today-assignment="12"]').within(() => {
|
||||||
|
cy.get('[data-stack-layer]').should('have.length', 1)
|
||||||
cy.contains('button', 'Mark complete').click()
|
cy.contains('button', 'Mark complete').click()
|
||||||
cy.contains('button', 'Completing...').should('be.disabled')
|
cy.contains('button', 'Completing...').should('be.disabled')
|
||||||
})
|
})
|
||||||
|
|
@ -246,6 +280,7 @@ describe("today's assignments", () => {
|
||||||
.should('contain.text', "We couldn't update this assignment.")
|
.should('contain.text', "We couldn't update this assignment.")
|
||||||
.and('contain.text', '2 due now')
|
.and('contain.text', '2 due now')
|
||||||
.within(() => {
|
.within(() => {
|
||||||
|
cy.get('[data-stack-layer]').should('have.length', 1)
|
||||||
cy.contains('button', 'Mark complete').click()
|
cy.contains('button', 'Mark complete').click()
|
||||||
cy.contains('button', 'Completing...').should('be.disabled')
|
cy.contains('button', 'Completing...').should('be.disabled')
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue