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

[temp] feat: add detail taxonomy page #5

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d5cc567
fix(deps): update dependency react-transition-group to v4.4.5 (#647)
renovate[bot] Nov 6, 2023
09f908b
fix(deps): update dependency @edx/frontend-component-footer to v12.5.…
renovate[bot] Nov 6, 2023
f61f742
chore(deps): update dependency @edx/frontend-build to v13.0.4 (#641)
renovate[bot] Nov 6, 2023
02a683f
fix: end date error when certificate row not shown (#668)
KristinAoki Nov 7, 2023
05e90b5
fix: fidelity typo in preference api (#662)
KristinAoki Nov 7, 2023
2cfde7d
fix(deps): update dependency @edx/frontend-component-header to v4.9.3…
renovate[bot] Nov 7, 2023
4a3d1a1
fix(deps): update dependency @edx/frontend-lib-content-components to …
renovate[bot] Nov 7, 2023
3dac6aa
fix: modal exit redirect (#659)
KristinAoki Nov 7, 2023
78eb512
refactor: files-and-videos folder (#672)
KristinAoki Nov 8, 2023
7c7b3cd
feat: remove old/duplicate proctoring component (#671)
zacharis278 Nov 9, 2023
56dbdd2
feat: add taxonomy detail page
rpenido Nov 11, 2023
e41efba
feat: opt out is not supported by lti proctoring (#673)
zacharis278 Nov 13, 2023
2fbb490
fix: total file count update on add and delete (#681)
KristinAoki Nov 13, 2023
3378c8e
fix: combine filter and sort into one modal (#680)
KristinAoki Nov 13, 2023
7c7ea1f
fix: active transcript preference not loading (#682)
KristinAoki Nov 14, 2023
1ee80b6
feat: Taxonomy export menu [FC-0036] (#645)
ChrisChV Nov 14, 2023
ce9db57
fix: table search filter (#683)
KristinAoki Nov 14, 2023
14e3c25
fix(deps): update dependency @edx/brand to v1.2.3 (#667)
renovate[bot] Nov 15, 2023
416ac4f
chore(deps): update dependency @edx/frontend-build to v13.0.5 (#676)
renovate[bot] Nov 15, 2023
2804f38
chore(deps): update dependency axios-mock-adapter to v1.22.0 (#678)
renovate[bot] Nov 15, 2023
9c582ed
Merge branch 'master' into rpenido/fal-3529-bare-bones-taxonomy-detai…
pomegranited Nov 15, 2023
9df1699
fix: address nits in PR review
pomegranited Nov 15, 2023
0fdaa07
refactor: move data/selectors to data/apiHooks
pomegranited Nov 15, 2023
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
Prev Previous commit
Next Next commit
fix: fidelity typo in preference api (openedx#662)
  • Loading branch information
KristinAoki authored Nov 7, 2023
commit 05e90b59d2e054979e418276c57543b1a94dc1f0
2 changes: 1 addition & 1 deletion src/files-and-videos/videos-page/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export async function setTranscriptPreferences(courseId, preferences) {
videoSourceLanguage,
} = preferences;
const postJson = {
cielo24_fideltiy: cielo24Fidelity?.toUpperCase(),
cielo24_fidelity: cielo24Fidelity?.toUpperCase(),
cielo24_turnaround: cielo24Turnaround,
global,
preferred_languages: preferredLanguages,
Expand Down
7 changes: 6 additions & 1 deletion src/files-and-videos/videos-page/data/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,12 @@ export function updateTranscriptPreference({ courseId, data }) {
dispatch(updateTranscriptPreferenceSuccess(preferences));
dispatch(updateEditStatus({ editType: 'transcript', status: RequestStatus.SUCCESSFUL }));
} catch (error) {
dispatch(updateErrors({ error: 'transcript', message: `Failed to update ${data.provider} transcripts settings.` }));
if (error.response?.data?.error) {
const message = error.response.data.error;
dispatch(updateErrors({ error: 'transcript', message }));
} else {
dispatch(updateErrors({ error: 'transcript', message: `Failed to update ${data.provider} transcripts settings.` }));
}
dispatch(updateEditStatus({ editType: 'transcript', status: RequestStatus.FAILED }));
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ describe('TranscriptSettings', () => {
expect(screen.getByText('Failed to update Cielo24 transcripts settings.')).toBeVisible();
});

it('should show error alert on 3PlayMedia preferences update', async () => {
it('should show error alert with default message on 3PlayMedia preferences update', async () => {
const threePlayButton = screen.getAllByLabelText('3PlayMedia radio')[0];
await act(async () => {
userEvent.click(threePlayButton);
Expand Down Expand Up @@ -573,6 +573,39 @@ describe('TranscriptSettings', () => {

expect(screen.getByText('Failed to update 3PlayMedia transcripts settings.')).toBeVisible();
});

it('should show error alert with default message on 3PlayMedia preferences update', async () => {
const threePlayButton = screen.getAllByLabelText('3PlayMedia radio')[0];
await act(async () => {
userEvent.click(threePlayButton);
});
const updateButton = screen.getByText(messages.updateSettingsLabel.defaultMessage);
const turnaround = screen.getByText(messages.threePlayMediaTurnaroundPlaceholder.defaultMessage);
const source = screen.getByText(messages.threePlayMediaSourceLanguagePlaceholder.defaultMessage);

await waitFor(() => {
userEvent.click(turnaround);
userEvent.click(screen.getByText('2 hours'));

userEvent.click(source);
userEvent.click(screen.getByText('Spanish'));

const language = screen.getByText(messages.threePlayMediaTranscriptLanguagePlaceholder.defaultMessage);
userEvent.click(language);
userEvent.click(screen.getAllByText('English')[1]);
});
expect(updateButton).not.toHaveAttribute('disabled');

axiosMock.onPost(`${getApiBaseUrl()}/transcript_preferences/${courseId}`).reply(404, { error: 'Invalid turnaround.' });
await waitFor(() => {
userEvent.click(updateButton);
});
const { transcriptStatus } = store.getState().videos;

expect(transcriptStatus).toEqual(RequestStatus.FAILED);

expect(screen.getByText('Invalid turnaround.')).toBeVisible();
});
});
});
});