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

akonhilas/APPEALS-35728 #20095

Merged
merged 3 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 9 additions & 5 deletions client/app/hearings/components/dailyDocket/DailyDocketRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,12 @@ class DailyDocketRow extends React.Component {
isLegacyHearing = () => this.props.hearing?.docketName === 'legacy';

conferenceLinkOnClick = () => {
const { conferenceLink } = this.props;
const { conferenceLinks, hearing } = this.props;

window.open(conferenceLink?.hostLink, 'Recording Session').focus();
const linkType = hearing.conferenceProvider === 'webex' ? 'WebexConferenceLink' : 'PexipConferenceLink';
const link = conferenceLinks[0].type === linkType ? 0 : 1;

window.open(conferenceLinks[link].hostLink, 'Recording Session').focus();

}

Expand Down Expand Up @@ -503,7 +506,8 @@ DailyDocketRow.propTypes = {
externalId: PropTypes.string,
disposition: PropTypes.string,
scheduledForIsPast: PropTypes.bool,
scheduledTimeString: PropTypes.string
scheduledTimeString: PropTypes.string,
conferenceProvider: PropTypes.string
}),
user: PropTypes.shape({
userCanAssignHearingSchedule: PropTypes.bool,
Expand All @@ -518,13 +522,13 @@ DailyDocketRow.propTypes = {
onReceiveAlerts: PropTypes.func,
onReceiveTransitioningAlert: PropTypes.func,
transitionAlert: PropTypes.func,
conferenceLink: PropTypes.object,
conferenceLinks: PropTypes.object,
conferenceLinkError: PropTypes.bool
};

const mapStateToProps = (state, props) => ({
hearing: { ...props.hearing, ...state.dailyDocket.hearings[props.hearingId] },
conferenceLink: state.dailyDocket.hearingDay.conferenceLink,
conferenceLinks: state.dailyDocket.hearingDay.conferenceLinks,
conferenceLinkError: state.dailyDocket.conferenceLinkError
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { render } from '@testing-library/react';
import { render, screen } from '@testing-library/react';
import { axe } from 'jest-axe';
import { BrowserRouter as Router } from 'react-router-dom';
import { Provider } from 'react-redux';
Expand Down Expand Up @@ -36,7 +36,7 @@ describe('DailyDocketRow', () => {

expect(container).toMatchSnapshot();
});
// noelle's area

it('renders correctly for non virtual, judge', () => {
const { container } = render(
<Provider store={store}>
Expand All @@ -49,6 +49,18 @@ describe('DailyDocketRow', () => {
expect(container).toMatchSnapshot();
});

it('connect to recording renders correctly', () => {
render(
<Provider store={store}>
<Router>
<DailyDocketRow {...dailyDocketPropsHearingNotVirtualJudgeUser} />
</Router>
</Provider>
);

expect(screen.getByRole('button', { class: 'usa-button-secondary usa-button', name: 'Connect to Recording System' })).toBeInTheDocument();
});

it('renders correctly for non virtual, attorney', () => {
const { container } = render(
<Provider store={store}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,14 @@ exports[`DailyDocketRow renders correctly for non virtual, DVC 1`] = `
<div
data-css-leaxad=""
>
<div>
<span>
Host Link: N/A
</span>
</div>
<span>
<button
class="usa-button-secondary usa-button"
type="button"
>
Connect to Recording System
</button>
</span>
<div>
<b>
Pexip
Expand Down Expand Up @@ -838,11 +841,14 @@ exports[`DailyDocketRow renders correctly for non virtual, Transcriber 1`] = `
<div
data-css-leaxad=""
>
<div>
<span>
Host Link: N/A
</span>
</div>
<span>
<button
class="usa-button-secondary usa-button"
type="button"
>
Connect to Recording System
</button>
</span>
<div>
<b>
Webex
Expand Down Expand Up @@ -1200,14 +1206,13 @@ exports[`DailyDocketRow renders correctly for non virtual, Transcriber 1`] = `
>
<input
checked=""
disabled=""
id="hearingTime0_08:30"
name="hearingTime0"
type="radio"
value="08:30"
/>
<label
class="disabled"
class=""
for="hearingTime0_08:30"
>
8:30 AM Central Time (US & Canada) / 9:30 AM Eastern Time (US & Canada)
Expand All @@ -1217,14 +1222,13 @@ exports[`DailyDocketRow renders correctly for non virtual, Transcriber 1`] = `
class="cf-form-radio-option"
>
<input
disabled=""
id="hearingTime0_12:30"
name="hearingTime0"
type="radio"
value="12:30"
/>
<label
class="disabled"
class=""
for="hearingTime0_12:30"
>
12:30 PM Central Time (US & Canada) / 1:30 PM Eastern Time (US & Canada)
Expand All @@ -1234,14 +1238,13 @@ exports[`DailyDocketRow renders correctly for non virtual, Transcriber 1`] = `
class="cf-form-radio-option"
>
<input
disabled=""
id="hearingTime0_other"
name="hearingTime0"
type="radio"
value="other"
/>
<label
class="disabled"
class=""
for="hearingTime0_other"
>
Other
Expand Down Expand Up @@ -1731,14 +1734,13 @@ exports[`DailyDocketRow renders correctly for non virtual, VSO 1`] = `
>
<input
checked=""
disabled=""
id="hearingTime0_08:30"
name="hearingTime0"
type="radio"
value="08:30"
/>
<label
class="disabled"
class=""
for="hearingTime0_08:30"
>
8:30 AM Central Time (US & Canada) / 9:30 AM Eastern Time (US & Canada)
Expand All @@ -1748,14 +1750,13 @@ exports[`DailyDocketRow renders correctly for non virtual, VSO 1`] = `
class="cf-form-radio-option"
>
<input
disabled=""
id="hearingTime0_12:30"
name="hearingTime0"
type="radio"
value="12:30"
/>
<label
class="disabled"
class=""
for="hearingTime0_12:30"
>
12:30 PM Central Time (US & Canada) / 1:30 PM Eastern Time (US & Canada)
Expand All @@ -1765,14 +1766,13 @@ exports[`DailyDocketRow renders correctly for non virtual, VSO 1`] = `
class="cf-form-radio-option"
>
<input
disabled=""
id="hearingTime0_other"
name="hearingTime0"
type="radio"
value="other"
/>
<label
class="disabled"
class=""
for="hearingTime0_other"
>
Other
Expand Down Expand Up @@ -1986,11 +1986,14 @@ exports[`DailyDocketRow renders correctly for non virtual, attorney 1`] = `
<div
data-css-leaxad=""
>
<div>
<span>
Host Link: N/A
</span>
</div>
<span>
<button
class="usa-button-secondary usa-button"
type="button"
>
Connect to Recording System
</button>
</span>
<div>
<b>
Pexip
Expand Down Expand Up @@ -2575,11 +2578,14 @@ exports[`DailyDocketRow renders correctly for non virtual, hearing cooridnator 1
<div
data-css-leaxad=""
>
<div>
<span>
Host Link: N/A
</span>
</div>
<span>
<button
class="usa-button-secondary usa-button"
type="button"
>
Connect to Recording System
</button>
</span>
<div>
<b>
Webex
Expand Down Expand Up @@ -2937,14 +2943,13 @@ exports[`DailyDocketRow renders correctly for non virtual, hearing cooridnator 1
>
<input
checked=""
disabled=""
id="hearingTime0_08:30"
name="hearingTime0"
type="radio"
value="08:30"
/>
<label
class="disabled"
class=""
for="hearingTime0_08:30"
>
8:30 AM Central Time (US & Canada) / 9:30 AM Eastern Time (US & Canada)
Expand All @@ -2954,14 +2959,13 @@ exports[`DailyDocketRow renders correctly for non virtual, hearing cooridnator 1
class="cf-form-radio-option"
>
<input
disabled=""
id="hearingTime0_12:30"
name="hearingTime0"
type="radio"
value="12:30"
/>
<label
class="disabled"
class=""
for="hearingTime0_12:30"
>
12:30 PM Central Time (US & Canada) / 1:30 PM Eastern Time (US & Canada)
Expand All @@ -2971,14 +2975,13 @@ exports[`DailyDocketRow renders correctly for non virtual, hearing cooridnator 1
class="cf-form-radio-option"
>
<input
disabled=""
id="hearingTime0_other"
name="hearingTime0"
type="radio"
value="other"
/>
<label
class="disabled"
class=""
for="hearingTime0_other"
>
Other
Expand Down Expand Up @@ -3192,11 +3195,14 @@ exports[`DailyDocketRow renders correctly for non virtual, judge 1`] = `
<div
data-css-leaxad=""
>
<div>
<span>
Host Link: N/A
</span>
</div>
<span>
<button
class="usa-button-secondary usa-button"
type="button"
>
Connect to Recording System
</button>
</span>
<div>
<b>
Webex
Expand Down
2 changes: 1 addition & 1 deletion client/test/data/hearings/dailyDocket/dailyDocketProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const dailyDocketPropsHearingNotVirtualJudgeUser = {
regionalOfficeTimezone: 'America/Chicago',
room: '21',
scheduledFor: '2022-04-29T08:30:00.000-05:00',
scheduledForIsPast: true,
scheduledForIsPast: false,
scheduledTime: '2000-01-01T08:30:00.000-05:00',
scheduledTimeString: '08:30',
summary: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12082,7 +12082,7 @@ export const dailyDocketFullStore = {
regionalOfficeTimezone: 'America/Chicago',
room: '21',
scheduledFor: '2022-04-29T08:30:00.000-05:00',
scheduledForIsPast: true,
scheduledForIsPast: false,
scheduledTime: '2000-01-01T08:30:00.000-05:00',
scheduledTimeString: '08:30',
summary: null,
Expand Down
Loading