diff --git a/strr-web/cypress/e2e/accessibility/accountSelect.cy.ts b/strr-web/cypress/e2e/accessibility/accountSelect.cy.ts index 04108591..503f8073 100644 --- a/strr-web/cypress/e2e/accessibility/accountSelect.cy.ts +++ b/strr-web/cypress/e2e/accessibility/accountSelect.cy.ts @@ -31,26 +31,29 @@ describe('accessibility -> Account Select', () => { // TODO - TC - change this to use our existing-account-list component instead it('checks the summary table passes accessibility', () => { - // cy.checkA11y('[data-cy=individualsSummaryTable]', { rules: { 'nested-interactive': { enabled: false } } }) - // cy.get('[data-cy=popover-button]').eq(0).click() - // cy.wait(100) - // cy.checkA11y('[data-cy=summary-table-buttons]', { - // rules: { - // 'nested-interactive': { enabled: false }, - // 'aria-hidden-focus': { enabled: false } - // } - // }) + // cy.checkA11y('[data-cy=individualsSummaryTable]', { rules: { 'nested-interactive': { enabled: false } } }) + + // cy.get('[data-cy=popover-button]').eq(0).click() + // cy.wait(100) + // cy.checkA11y('[data-cy=summary-table-buttons]', { + // rules: { + // 'nested-interactive': { enabled: false }, + // 'aria-hidden-focus': { enabled: false } + // } + // }) - // // close the popover panel - // cy.get('[data-cy=popover-button]').eq(0).click() + // // close the popover panel + // cy.get('[data-cy=popover-button]').eq(0).click() + + // // empty table + // cy.get('[data-cy=popover-button]').then((buttons) => { + // for (let i = 0; i < buttons.length; i++) { + // cy.get('[data-cy=popover-button]').first().click() + // cy.get('[data-cy=remove-button]').click() + // } + // }) + // cy.checkA11y('[data-cy=individualsSummaryTable]') + // - // // empty table - // cy.get('[data-cy=popover-button]').then((buttons) => { - // for (let i = 0; i < buttons.length; i++) { - // cy.get('[data-cy=popover-button]').first().click() - // cy.get('[data-cy=remove-button]').click() - // } - // }) - // cy.checkA11y('[data-cy=individualsSummaryTable]') }) }) diff --git a/strr-web/cypress/e2e/accessibility/layouts.cy.ts b/strr-web/cypress/e2e/accessibility/layouts.cy.ts index c7c8c789..dd49e9fb 100644 --- a/strr-web/cypress/e2e/accessibility/layouts.cy.ts +++ b/strr-web/cypress/e2e/accessibility/layouts.cy.ts @@ -15,6 +15,26 @@ describe('accessibility -> Business Layout', () => { // cy.checkA11y({ exclude: ['[data-cy=owner-change]'], include: ['[data-cy=header]'] }) }) + it('checks Account Select Page passes accessibility (logged in, active accounts)', () => { + sessionStorage.setItem('FAKE_LOGIN', 'true') + cy.visit('/account-select') + + // TODO: TC - change to our api call for empty return with just settings? + cy.wait(['@noAccounts']) + cy.injectAxe() + // TODO: TC - change to our api calls + cy.wait(['@accounts', '@accountDetails']) + cy.injectAxe() + + // TODO: TC - check out layout when someone is auth and has active accounts + // Click example below + // Include clicking the two buttons - create and choose - move this to AccountSelect? + + // // footer + // cy.checkA11y({ exclude: ['[data-cy=owner-change]'], include: ['[data-cy=footer]'] }) + }) + + // it('checks Account Select Page passes accessibility (logged in, active accounts)', () => { sessionStorage.setItem('FAKE_LOGIN', 'true') cy.visit('/account-select') @@ -32,7 +52,7 @@ describe('accessibility -> Business Layout', () => { // cy.wait(250) // cy.checkA11y({ exclude: ['[data-cy=owner-change]'], include: ['[data-cy=header]'] }) - // footer + // // footer // cy.checkA11y({ exclude: ['[data-cy=owner-change]'], include: ['[data-cy=footer]'] }) }) }) diff --git a/strr-web/cypress/e2e/layouts/accountSelect.cy.ts b/strr-web/cypress/e2e/layouts/accountSelect.cy.ts index e47ce502..2b04c4fa 100644 --- a/strr-web/cypress/e2e/layouts/accountSelect.cy.ts +++ b/strr-web/cypress/e2e/layouts/accountSelect.cy.ts @@ -1,5 +1,4 @@ import accounts from '../../fixtures/accounts.json' -import noAccounts from '../../fixtures/noAccounts.json' import accountDetails from '../../fixtures/accountDetails.json' describe('Layout -> Account Select (No Active Accounts)', () => { @@ -14,6 +13,7 @@ describe('Layout -> Account Select (No Active Accounts)', () => { 'GET', `https://auth-api-dev.apps.silver.devops.gov.bc.ca/api/v1/orgs/${account.id}`, accountDetails).as('accountDetails') + // TODO: TC do we need fake login for this? cy.visit('/account-select') @@ -35,6 +35,7 @@ describe('Layout -> Account Select (No Active Accounts)', () => { 'GET', `https://auth-api-dev.apps.silver.devops.gov.bc.ca/api/v1/orgs/${account.id}`, accountDetails).as('accountDetails') + // TODO: TC do we need fake login for this? cy.visit('/account-select') diff --git a/strr-web/cypress/e2e/pages/accountSelect.ts b/strr-web/cypress/e2e/pages/accountSelect.ts index e5b9f2f6..cb80a315 100644 --- a/strr-web/cypress/e2e/pages/accountSelect.ts +++ b/strr-web/cypress/e2e/pages/accountSelect.ts @@ -11,7 +11,23 @@ describe('pages -> Account Select', () => { it('shows expected profile values in the information table', () => { // TODO: TC - Adapt below to the existing account list structure to verify + // cy.get('[data-cy=myRegDetailsTable]').get('tr').should('have.length', 9) // +1 for header tr + // cy.get('[data-cy=myRegDetailsTable]').get('td').should('have.length', 16) + // const expectedData = [ + // { label: "Individual's Full Name", value: 'Wallaby Wobbles' }, + // { label: 'Birthdate', value: 'September 25, 1993' }, + // { label: 'Residential Address', value: '123 Fake StVictoria BC\u00A0\u00A0V2L 3T6Canada' }, + // { label: 'Email Address', value: '1@1.com' }, + // { + // label: 'Canada Revenue Agency (CRA) Tax Number', + // subLabel: 'Social Insurance Number (SIN)', + // value: '123 456 789' + // }, + // { label: 'Citizenship/Permanent Residency', subLabel: 'Citizenship', value: 'Canada' }, + // { label: 'Tax Residency', value: 'Canada' }, + // { label: 'Competency', value: 'I am able to manage my own financial affairs.' } + // ] // cy.get('[data-cy=myRegDetailsTable]').get('tr').should('have.length', 9) // +1 for header tr // cy.get('[data-cy=myRegDetailsTable]').get('td').should('have.length', 16) diff --git a/strr-web/pages/account-select.vue b/strr-web/pages/account-select.vue index 84ebef1c..15dbf04c 100644 --- a/strr-web/pages/account-select.vue +++ b/strr-web/pages/account-select.vue @@ -18,8 +18,8 @@