-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5502 from flexion/10275-calendar-generator
10275 calendar generator
- Loading branch information
Showing
78 changed files
with
536,390 additions
and
3,274 deletions.
There are no files selected for viewing
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
39 changes: 39 additions & 0 deletions
39
cypress/local-only/tests/integration/trialSession/run-suggested-calendar-generator.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 { | ||
FORMATS, | ||
createISODateString, | ||
getBusinessDateInFuture, | ||
} from '../../../../../shared/src/business/utilities/DateHandler'; | ||
import { SUGGESTED_TRIAL_SESSION_TITLES } from '../../../../../shared/src/business/entities/EntityConstants'; | ||
import { loginAsPetitionsClerk1 } from '../../../../helpers/authentication/login-as-helpers'; | ||
|
||
describe('Run the suggested trial session calendar generator', () => { | ||
const tomorrow = getBusinessDateInFuture({ | ||
numberOfDays: 1, | ||
outputFormat: FORMATS.MMDDYYYY, | ||
startDate: createISODateString(), | ||
}); | ||
|
||
const oneMonthFromNow = getBusinessDateInFuture({ | ||
numberOfDays: 30, | ||
outputFormat: FORMATS.MMDDYYYY, | ||
startDate: createISODateString(), | ||
}); | ||
|
||
it('should run the suggested trial session calendar generator', () => { | ||
loginAsPetitionsClerk1(); | ||
cy.visit('/trial-sessions'); | ||
cy.get('[data-testId="open-create-term-modal-button"]').click(); | ||
cy.get('[data-testid="term-name-field"]').type('Test Term Name'); | ||
cy.get( | ||
'.usa-date-picker__wrapper > [data-testid="termStartDate-date-start-input"]', | ||
).type(tomorrow); | ||
cy.get( | ||
'.usa-date-picker__wrapper > [data-testid="termEndDate-date-end-input"]', | ||
).type(oneMonthFromNow); | ||
cy.get('[data-testid="modal-button-confirm"]').click(); | ||
cy.get('[data-testid="success-alert"]').should( | ||
'contain.text', | ||
SUGGESTED_TRIAL_SESSION_TITLES.success, | ||
); | ||
}); | ||
}); |
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.