forked from ustaxcourt/ef-cms
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' of https://github.com/ustaxcourt/ef-cms into 1…
…137-devex
- Loading branch information
Showing
56 changed files
with
636 additions
and
585 deletions.
There are no files selected for viewing
81 changes: 81 additions & 0 deletions
81
cypress/cypress-integration/integration/judges-notes-icon.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { | ||
createMessage, | ||
enterSubject, | ||
fillOutMessageField, | ||
selectChambers, | ||
selectRecipient, | ||
selectSection, | ||
sendMessage, | ||
} from '../support/pages/document-qc'; | ||
import { fillInCreateCaseFromPaperForm } from '../support/pages/create-paper-petition'; | ||
|
||
import { | ||
getCreateACaseButton, | ||
navigateTo as navigateToDocumentQC, | ||
} from '../support/pages/document-qc'; | ||
|
||
describe('Notes Icon triggered by Judges Notes', () => { | ||
let newDocketNumber: string; | ||
beforeEach(() => { | ||
navigateToDocumentQC('petitionsclerk'); | ||
|
||
getCreateACaseButton().click(); | ||
cy.get('#tab-parties').parent().should('have.attr', 'aria-selected'); | ||
|
||
fillInCreateCaseFromPaperForm(); | ||
|
||
cy.intercept('POST', '**/paper').as('postPaperCase'); | ||
cy.get('#submit-case').click(); | ||
|
||
cy.wait('@postPaperCase').then(({ response }) => { | ||
if (!response || !response.body?.docketNumber) { | ||
throw new Error( | ||
'Unable to get Docket Number from postPaperCase HTTP request', | ||
); | ||
} | ||
newDocketNumber = response.body?.docketNumber; | ||
}); | ||
}); | ||
|
||
it('should display the notes icon when logged in as a judge user and there are judges notes on the case we navigated to using the messages link', () => { | ||
cy.login('judgecolvin', `/case-detail/${newDocketNumber}`); | ||
cy.get('[data-testid="tab-notes"]').click(); | ||
cy.get('[data-testid="add-case-judge-notes-button"]').click(); | ||
cy.get('[data-testid="case-notes"]').type('SOME RANDOM NOTES'); | ||
cy.get('#confirm').click(); | ||
|
||
cy.login('docketclerk', `/case-detail/${newDocketNumber}`); | ||
createMessage(); | ||
selectSection('Chambers'); | ||
selectChambers('colvinsChambers'); | ||
selectRecipient('Judge Colvin'); | ||
enterSubject(); | ||
fillOutMessageField(); | ||
sendMessage(); | ||
|
||
cy.login('judgecolvin'); | ||
cy.get('[data-testid="message-header-link"]').first().click(); | ||
cy.get('[data-testid="notes-icon"]').should('exist'); | ||
}); | ||
|
||
it('should display the notes icon when logged in as a chambers user and there are judges notes on the case we navigated to using the messages link', () => { | ||
cy.login('judgecolvin', `/case-detail/${newDocketNumber}`); | ||
cy.get('[data-testid="tab-notes"]').click(); | ||
cy.get('[data-testid="add-case-judge-notes-button"]').click(); | ||
cy.get('[data-testid="case-notes"]').type('SOME RANDOM NOTES'); | ||
cy.get('#confirm').click(); | ||
|
||
cy.login('docketclerk', `/case-detail/${newDocketNumber}`); | ||
createMessage(); | ||
selectSection('Chambers'); | ||
selectChambers('colvinsChambers'); | ||
selectRecipient("Test Colvin's Chambers"); | ||
enterSubject(); | ||
fillOutMessageField(); | ||
sendMessage(); | ||
|
||
cy.login('colvinschambers'); | ||
cy.get('[data-testid="message-header-link"]').first().click(); | ||
cy.get('[data-testid="notes-icon"]').should('exist'); | ||
}); | ||
}); |
39 changes: 39 additions & 0 deletions
39
cypress/cypress-integration/integration/message-count-on-header.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { | ||
createMessage, | ||
enterSubject, | ||
fillOutMessageField, | ||
selectChambers, | ||
selectRecipient, | ||
selectSection, | ||
sendMessage, | ||
} from '../support/pages/document-qc'; | ||
|
||
describe('Message Count', () => { | ||
it("should display the message count on the Judge's dashboard", () => { | ||
cy.login('docketclerk', '/case-detail/103-20'); | ||
createMessage(); | ||
selectSection('Chambers'); | ||
selectChambers('colvinsChambers'); | ||
selectRecipient('Judge Colvin'); | ||
enterSubject(); | ||
fillOutMessageField(); | ||
sendMessage(); | ||
|
||
cy.login('judgecolvin'); | ||
cy.get('[data-testid="header-message-count"]').should('exist'); | ||
}); | ||
|
||
it("should display the message count on the Chamber's dashboard", () => { | ||
cy.login('docketclerk', '/case-detail/103-20'); | ||
createMessage(); | ||
selectSection('Chambers'); | ||
selectChambers('colvinsChambers'); | ||
selectRecipient("Test Colvin's Chambers"); | ||
enterSubject(); | ||
fillOutMessageField(); | ||
sendMessage(); | ||
|
||
cy.login('colvinschambers'); | ||
cy.get('[data-testid="header-message-count"]').should('exist'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.