Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10461 Story: Public Trial Sessions Details Page #5552

Merged
merged 56 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
03473e9
10461-story: get most of the backend stuff working, with a broken stu…
Mwindo Oct 29, 2024
15ff2c7
10461-story: fix type errors in AppComponentPublic since I'm touching…
Mwindo Oct 30, 2024
b6baf10
10461-story: get swing session information for a trial; fix typing of…
Mwindo Oct 30, 2024
c7ac13c
10461-story: get PublicTrialSessionDetail.tsx displayed, and refactor…
Mwindo Oct 30, 2024
f7303b5
10461: WIP add session details
Mwindo Oct 30, 2024
2703eef
10461-story: refactor PublicTrialSessionDetail to avoid unnecessary d…
Mwindo Oct 30, 2024
cfb61ab
10461-story: conditionally render details card
Mwindo Oct 30, 2024
0accaf8
10461-story: add back to trial sessions button
Mwindo Oct 31, 2024
f9784fe
10461-story: commit todo so other devs can pick up ticket more easily…
Mwindo Oct 31, 2024
a2dc4e6
10461-story: WIP Getting the nonmobile table working; still need peti…
Mwindo Oct 31, 2024
eecd18f
10461-story: WIP getting the current as of timestamp, and trying to g…
Mwindo Oct 31, 2024
50fdd93
10461-story: WIP Use same logic for fetching calendared cases as in t…
Mwindo Oct 31, 2024
723789c
10461-story: fix case link in public view, update todo
Mwindo Oct 31, 2024
9ff8b20
10461-story: WIP getting mobile to display
Mwindo Oct 31, 2024
c3be5d9
10461: Rename to public
Oct 31, 2024
3fba0a2
10461: Add contact information for public case
Oct 31, 2024
fc121e0
10461: Update types
Oct 31, 2024
24abc89
10461-story: fix merge errors
Mwindo Nov 1, 2024
435152e
10461-story: beginning some test stuff
Mwindo Nov 1, 2024
0ffcfb4
10461: Switch to docker compose
Nov 1, 2024
44bdc06
10461-story: get sealed case icon appearing for internal users, and s…
Mwindo Nov 4, 2024
3277be9
10461-story: show only open calendared cases
Mwindo Nov 4, 2024
4604558
10461-story: fix some type errors
Mwindo Nov 4, 2024
866b7e6
10461-story: be consistent with sessiondetails vs sessiondetail
Mwindo Nov 4, 2024
2bf8bd0
10461-story: fix some renaming oversights, and fix some types since t…
Mwindo Nov 4, 2024
ec390e0
10461-story: fix a few failing tests
Mwindo Nov 4, 2024
a001e4e
10461-story: fix another failing test
Mwindo Nov 4, 2024
0ae8c2b
10461-story: add runPublicAction to avoid some type errors; fix a test
Mwindo Nov 4, 2024
814600c
10461-story: fix public action unit tests, using John's solutionm whi…
Mwindo Nov 5, 2024
0f65d83
10461-story: missed a public action test in previous commit
Mwindo Nov 5, 2024
a90fe3d
10461-story: tentatively add CaseIcons to EligibleCases.tsx, only use…
Mwindo Nov 5, 2024
807a950
10461-story: trying to get to-test PR green
Mwindo Nov 5, 2024
51cdb99
10461-story: remove console logs and add a test for publicTrialSessio…
Mwindo Nov 5, 2024
f14799b
10461-story: add unit test for getPublicTrialSessionDetailsAction
Mwindo Nov 5, 2024
a885af5
10461-story: a few small changes to tests
Mwindo Nov 5, 2024
75a3ec7
10461-story: remove isRemote, refactor to avoid using cerebral when n…
Mwindo Nov 5, 2024
560583c
10461-story: add a cypress test
Mwindo Nov 5, 2024
c828167
10461-story: add test for getPublicTrialSessionDetailsInteractor
Mwindo Nov 5, 2024
9bec3aa
10461-story: address UX feedback
Mwindo Nov 7, 2024
e703f27
10461-story: add scrolling, make count indicators even more closely a…
Mwindo Nov 7, 2024
f5e8746
10461-story: use text-right instead of push-right
Mwindo Nov 8, 2024
5e3363e
10461-story: fix icon spacing and count indicator
Mwindo Nov 11, 2024
8f78e2f
10461-story: make all counts use the div spacer instead of margin-bottom
Mwindo Nov 11, 2024
8ea8014
10461-story: put back in flex-column (facepalm) and add some spacing …
Mwindo Nov 12, 2024
c28d6b3
10461-story: merge in 10460
Mwindo Nov 13, 2024
6aa0c98
10461-story: get rid of TrialsSessions folder, and add an easier-to-u…
Mwindo Nov 13, 2024
edc3a68
10461-story: add tests for new sort function
Mwindo Nov 13, 2024
ae61338
10461-story: remove estimated end date
Mwindo Nov 13, 2024
79c16b7
10461-story: fix type errors
Mwindo Nov 13, 2024
825f128
10461-story: fix overlooked test
Mwindo Nov 13, 2024
162e883
10461-story: don't show docket entries
Mwindo Nov 13, 2024
6e3e22d
Merge remote-tracking branch 'ustc/staging' into 10461-story-with-104…
Mwindo Nov 14, 2024
0c28ec8
10461-story: fix lock file
Mwindo Nov 14, 2024
6276f61
10461-story: fix edge case in sorting function
Mwindo Nov 15, 2024
e3eec01
10461-story: merge staging
Mwindo Nov 15, 2024
8015399
Merge branch 'staging' into 10461-story-with-10460-merged
Mwindo Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/local-only/support/pages/public/advanced-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const searchForOrderByJudge = judge => {
};

export const publicHeader = () => {
return cy.get('h1.header-welcome-public');
return cy.get('div.header-welcome-public');
};

export const petitionHyperlink = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { checkA11y } from '../../../../support/generalCommands/checkA11y';

describe('Trial Session Details - Public Accessibility', () => {
beforeEach(() => {
Cypress.session.clearCurrentSessionData();
});

it('should be free of a11y issues', () => {
cy.visit('/trial-session-detail/959c4338-0fac-42eb-b0eb-d53b8d0195cc');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this trial session id come from seed data? Is this allowed for local-only tests?

Copy link
Contributor Author

@Mwindo Mwindo Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does come from the seed data, and yes. (It is basically just a copy of this:

describe('Trial session details', () => {
it('should be free of a11y issues', () => {
loginAsColvin();
cy.visit('/trial-session-detail/959c4338-0fac-42eb-b0eb-d53b8d0195cc');
cy.contains('Session Information').should('exist');
checkA11y();
});
});
But come to think of it, we probably don't need to use it. I can update this in the follow-up PR.

cy.get('[data-testid="public-open-cases"]').click();

checkA11y();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { selectTypeaheadInput } from '../../../../../helpers/components/typeAhead/select-typeahead-input';

describe('Public Trial Sessions', () => {
beforeEach(() => {
cy.visit('/trial-sessions');
});

it('should display table filters correctly', () => {
cy.get('[data-testid="proceeding-type-filter"]').should('be.visible');
cy.get('[data-testid="session-type-filter"]').should('be.visible');
cy.get('[data-testid="location-filter"]').should('be.visible');
cy.get('[data-testid="judge-filter"]').should('be.visible');

cy.get('[data-testid="remote-proceedings-card"]').should('be.visible');
cy.get('[data-testid="remote-proceedings-card"]')
.find('a')
.should('have.length', 2);

cy.get('[data-testid="trial-sessions-reset-filters-button"]').should(
'be.disabled',
);
});

it('should enable the reset filters button if there are any filters aplied', () => {
cy.get('[data-testid="trial-sessions-reset-filters-button"]').should(
'be.disabled',
);

cy.get('[data-testid="In Person-proceeding-label"]').click();

cy.get('[data-testid="trial-sessions-reset-filters-button"]').should(
'be.enabled',
);
});

it('should display Pill Button for every dropdown filter selected', () => {
const SESSION_TYPE = 'Regular';
selectTypeaheadInput('sessionTypes-filter-select', SESSION_TYPE);
cy.get(`[data-testid="sessionTypes-${SESSION_TYPE}-pill-button"]`);

const LOCATION = 'Mobile, Alabama';
selectTypeaheadInput('locations-filter-select', LOCATION);
cy.get(`[data-testid="locations-${LOCATION}-pill-button"]`);

const JUDGE = 'Buch';
selectTypeaheadInput('judges-filter-select', JUDGE);
cy.get(`[data-testid="judges-${JUDGE}-pill-button"]`);

cy.get(`[data-testid="sessionTypes-${SESSION_TYPE}-pill-button"]`)
.find('button')
.click();
cy.get(`[data-testid="sessionTypes-${SESSION_TYPE}-pill-button"]`).should(
'not.exist',
);

cy.get(`[data-testid="locations-${LOCATION}-pill-button"]`)
.find('button')
.click();
cy.get(`[data-testid="locations-${LOCATION}-pill-button"]`).should(
'not.exist',
);

cy.get(`[data-testid="judges-${JUDGE}-pill-button"]`)
.find('button')
.click();
cy.get(`[data-testid="judges-${JUDGE}-pill-button"]`).should('not.exist');
});
});
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
getCancelButton,
navigateTo as navigateToTrialSessionDetail,
navigateTo as navigateToTrialSessionDetails,
} from '../../../support/pages/edit-trial-session';
import { getCancelModalTitle } from '../../../support/pages/form-cancel-modal-dialog';

describe('Edit a trial session', () => {
it('should display a modal to confirm discarding changes when cancel is clicked', () => {
navigateToTrialSessionDetail(
navigateToTrialSessionDetails(
'petitionsclerk',
'208a959f-9526-4db5-b262-e58c476a4604',
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { SESSION_TYPES } from '../../../../../shared/src/business/entities/EntityConstants';
import { createTrialSession } from '../../../../helpers/trialSession/create-trial-session';
import { goToCase } from '../../../../helpers/caseDetail/go-to-case';
import {
loginAsDocketClerk,
loginAsPetitioner,
} from '../../../../helpers/authentication/login-as-helpers';
import { navigateToDashboard } from '../../../support/pages/maintenance';
import { petitionerCreatesElectronicCaseWithSpouse } from '../../../../helpers/fileAPetition/petitioner-creates-electronic-case';
import { petitionsClerkServesPetition } from '../../../../helpers/documentQC/petitionsclerk-serves-petition';

describe('Public Trial Session Details', () => {
const publicUrlPort = '5678';

it('should show trial session details', () => {
navigateToDashboard();
loginAsPetitioner();
petitionerCreatesElectronicCaseWithSpouse().then(docketNumber => {
petitionsClerkServesPetition(docketNumber);
loginAsDocketClerk();
createTrialSession({ sessionType: SESSION_TYPES.motionHearing }).then(
({ trialSessionId }) => {
goToCase(docketNumber);
// Add the case to the trial session, and seal it
cy.get('[data-testid="tab-case-information"]').click();
cy.get('#add-to-trial-session-btn').click();
cy.get('label[for="show-all-locations-true"]').click();
cy.get('select#trial-session').select(trialSessionId);
cy.get('select#trial-session').should('have.value', trialSessionId);
cy.get('#modal-root .modal-button-confirm').click();
cy.get('.usa-alert--success').should('exist');
cy.get('[data-testid="seal-case-button"]').click();
cy.get('[data-testid="modal-button-confirm"]').click();
cy.get('.usa-alert--success').contains('Case sealed');

// Visit the trial session details as a public user and check that expected information is rendered
cy.visit(
`http://localhost:${publicUrlPort}/trial-session-detail/${trialSessionId}`,
);
cy.get('[data-testid="public-trial-session-details-box"]').should(
'exist',
);
cy.contains(
/Information on this page is current as of \d{2}\/\d{2}\/\d{2} ([1-9]|1[0-2]):\d{2} (am|pm) Eastern\./,
).should('exist');
cy.contains('Count: 1');
cy.get(
`[data-testid="trial-session-detail-row-${docketNumber}"]`,
).should('exist');
cy.get('[data-testid="case-sealed-icon"]').should('exist');
cy.get('[data-testid="case-link"]').contains(docketNumber);
},
);
});
});
});
Loading
Loading