-
Notifications
You must be signed in to change notification settings - Fork 46
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' into 10429-design-debt
- Loading branch information
Showing
184 changed files
with
3,519 additions
and
1,948 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// An interface for exposing the cerebral controller on the window object, which | ||
// can be useful for temporarily overwriting constants in cypress. | ||
export interface ITestableWindow { | ||
cerebral: { | ||
getState: () => any; | ||
getModel: () => any; | ||
}; | ||
} |
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
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,19 @@ | ||
import { ITestableWindow } from '../../helpers/ITestableWindow'; | ||
|
||
// This is a hack, but I do not know a better way. | ||
export const overrideIdleTimeouts = ({ | ||
modalTimeout, | ||
sessionTimeout, | ||
windowObj, // For native cypress, this needs to be defined. For the puppeteer plugin, it should be left blank. | ||
}: { | ||
modalTimeout: number; | ||
sessionTimeout: number; | ||
windowObj?: ITestableWindow; | ||
}) => { | ||
const currentWindow = windowObj || (window as unknown as ITestableWindow); | ||
currentWindow.cerebral.getModel().set(['constants'], { | ||
...currentWindow.cerebral.getState().constants, | ||
SESSION_MODAL_TIMEOUT: modalTimeout, | ||
SESSION_TIMEOUT: sessionTimeout, | ||
}); | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import './commands'; | ||
import '@cypress/puppeteer/support'; | ||
import 'cypress-axe'; | ||
|
||
before(() => { | ||
|
15 changes: 15 additions & 0 deletions
15
...nly/tests/accessibility/petitionGeneration/petition-generation-before-filing-a-case.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,15 @@ | ||
import { checkA11y } from '../../../support/generalCommands/checkA11y'; | ||
import { loginAsPetitioner } from '../../../../helpers/authentication/login-as-helpers'; | ||
|
||
describe('Petition generation - intro pages', () => { | ||
it('welcome to dawson: should be free of a11y issues', () => { | ||
loginAsPetitioner('petitioner7'); | ||
checkA11y(); | ||
}); | ||
|
||
it('before filing a case: should be free of a11y issues', () => { | ||
loginAsPetitioner(); | ||
cy.visit('/before-filing-a-petition'); | ||
checkA11y(); | ||
}); | ||
}); |
146 changes: 146 additions & 0 deletions
146
cypress/local-only/tests/accessibility/petitionGeneration/petition-generation-step-1.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,146 @@ | ||
import { checkA11y } from '../../../support/generalCommands/checkA11y'; | ||
import { loginAsPetitioner } from '../../../../helpers/authentication/login-as-helpers'; | ||
|
||
describe('Petition generation - step 1', () => { | ||
beforeEach(() => { | ||
loginAsPetitioner(); | ||
cy.visit('/file-a-petition/new'); | ||
}); | ||
|
||
describe('Myself', () => { | ||
it('Myself - domestic: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-0"').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Myself - international: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-0"').click(); | ||
cy.get('[data-testid="international-country-btn"]').click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
describe('Myself and my spouse', () => { | ||
it('Myself and my spouse - deceased: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-1"').click(); | ||
cy.get('[data-testid="is-spouse-deceased-0"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Myself and my spouse - not deceased: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-1"').click(); | ||
cy.get('[data-testid="is-spouse-deceased-1"]').click(); | ||
cy.get('[data-testid="have-spouse-consent-label"').click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
describe('Business', () => { | ||
it('Corporation: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-2"').click(); | ||
cy.get('.business-type-radio-option').eq(0).click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Partnership (as the Tax Matters Partner): should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-2"').click(); | ||
cy.get('.business-type-radio-option').eq(1).click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Partnership (as a partner other than Tax Matters Partner): should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-2"').click(); | ||
cy.get('.business-type-radio-option').eq(2).click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Partnership (as a partnership representative under BBA): should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-2"').click(); | ||
cy.get('.business-type-radio-option').eq(3).click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
describe('Other', () => { | ||
describe('An estate or trust', () => { | ||
it('Estate with an executor/personal representative/fiduciary/etc.: should be free of a11y issues: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-0"]').click(); | ||
cy.get('[data-testid="estate-type-radio-option-0"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Estate without an executor/personal representative/fiduciary/etc.: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-0"]').click(); | ||
cy.get('[data-testid="estate-type-radio-option-1"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Trust: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-0"]').click(); | ||
cy.get('[data-testid="estate-type-radio-option-2"]').click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
|
||
describe('A minor or legally incompetent person', () => { | ||
it('Conservator: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-1"]').click(); | ||
cy.get('[data-testid="minor-incompetent-type-radio-option-0"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Guardian: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-1"]').click(); | ||
cy.get('[data-testid="minor-incompetent-type-radio-option-1"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Custodian: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-1"]').click(); | ||
cy.get('[data-testid="minor-incompetent-type-radio-option-2"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Next friend for a minor (without a guardian, conservator, or other like fiduciary): should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-1"]').click(); | ||
cy.get('[data-testid="minor-incompetent-type-radio-option-3"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Next friend for a legally incompetent person (without a guardian, conservator, or other like fiduciary): should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-1"]').click(); | ||
cy.get('[data-testid="minor-incompetent-type-radio-option-4"]').click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
|
||
describe('Donor', () => { | ||
it('Donor: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-2"]').click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
|
||
describe('Transferee', () => { | ||
it('Transferee: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-3"]').click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
|
||
describe('Deceased Spouse', () => { | ||
it('Deceased Spouse: should be free of a11y issues', () => { | ||
cy.get('[data-testid="filing-type-3"').click(); | ||
cy.get('[data-testid="other-type-radio-option-4"]').click(); | ||
checkA11y(); | ||
}); | ||
}); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
cypress/local-only/tests/accessibility/petitionGeneration/petition-generation-step-2.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,22 @@ | ||
import { checkA11y } from '../../../support/generalCommands/checkA11y'; | ||
import { fillPetitionerInformation } from '../../integration/fileAPetitionUpdated/petition-helper'; | ||
import { loginAsPetitioner } from '../../../../helpers/authentication/login-as-helpers'; | ||
|
||
describe('Petition generation - step 2', () => { | ||
beforeEach(() => { | ||
loginAsPetitioner(); | ||
cy.visit('/file-a-petition/new'); | ||
fillPetitionerInformation(); | ||
}); | ||
|
||
it('Auto generate Petition: should be free of a11y issues', () => { | ||
cy.get('[data-testid="add-another-reason-link-button"').click(); | ||
cy.get('[data-testid="add-another-fact-link-button"').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('Upload PDF Petition: should be free of a11y issues', () => { | ||
cy.get('[data-testid="upload-a-petition-label"').click(); | ||
checkA11y(); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
cypress/local-only/tests/accessibility/petitionGeneration/petition-generation-step-3.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,27 @@ | ||
import { checkA11y } from '../../../support/generalCommands/checkA11y'; | ||
import { | ||
fillPetitionFileInformation, | ||
fillPetitionerInformation, | ||
} from '../../integration/fileAPetitionUpdated/petition-helper'; | ||
import { loginAsPetitioner } from '../../../../helpers/authentication/login-as-helpers'; | ||
|
||
describe('Petition generation - step 3', () => { | ||
const VALID_FILE = '../../helpers/file/sample.pdf'; | ||
|
||
beforeEach(() => { | ||
loginAsPetitioner(); | ||
cy.visit('/file-a-petition/new'); | ||
fillPetitionerInformation(); | ||
fillPetitionFileInformation(VALID_FILE); | ||
}); | ||
|
||
it('IRS Notice Provided: should be free of a11y issues', () => { | ||
cy.get('[data-testid="irs-notice-Yes"]').click(); | ||
checkA11y(); | ||
}); | ||
|
||
it('IRS Notice not Provided: should be free of a11y issues', () => { | ||
cy.get('[data-testid="irs-notice-No"]').click(); | ||
checkA11y(); | ||
}); | ||
}); |
Oops, something went wrong.