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

fix: active transcript preference not loading #682

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

KristinAoki
Copy link
Member

JIRA Ticket: TNL-11199

Transcript Settings panel does not automatically select the option with saved values when they exist
Shows
image

This PR corrects the loading of the active transcript preferences. Previously the selected transcript option was given the full object of preferences instead of the provider so none of the options were selected on load. Now the correct option is selected when the settings are loaded.

Testing (locally)

*Will need to be fully tested in stage environment where the video pipeline is fully enabled

  1. Replace (Lines 30 -34, TranscriptSettings.jsx)
const {
    activeTranscriptPreferences,
    transcriptCredentials,
    videoTranscriptSettings,
  } = pageSettings;

with

const {
    transcriptCredentials,
    videoTranscriptSettings,
} = pageSettings;
const activeTranscriptPreferences = {
    provider: 'Cielo 24',
    cielo24Fidelity: '',
    cielo24Turnaround: '',
    preferredLanguages: [],
    threePlayTurnaround: '',
    videoSourceLanguage: '',
};
  1. Navigate to the Videos page
  2. Click "Transcript settings"
  3. Setting overlay should load with "Cielo24" selected
  4. Undo code change
  5. Reload page
  6. Click "Transcript settings"
  7. Setting overlay should load with "Order transcripts" button

Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e41efba) 87.97% compared to head (7582e65) 88.32%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #682      +/-   ##
==========================================
+ Coverage   87.97%   88.32%   +0.34%     
==========================================
  Files         415      420       +5     
  Lines        6396     6526     +130     
  Branches     1379     1408      +29     
==========================================
+ Hits         5627     5764     +137     
+ Misses        745      737       -8     
- Partials       24       25       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -3,6 +3,7 @@ import {
act,
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at this file, I can't see a test case which matches the issue described in the ticket. Could you add a

"Now the correct option is selected when the settings are loaded" Test? That would improve my confidence in what this PR is trying to do.

userEvent.click(orderButton);
});

it('should load page with Cielo24 selected', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sweet thanks!

@KristinAoki KristinAoki merged commit 7c7ea1f into master Nov 14, 2023
5 checks passed
@KristinAoki KristinAoki deleted the KristinAoki/fix-loading-saved-transcript-provider branch November 14, 2023 15:43
Ian2012 pushed a commit to eduNEXT/frontend-app-course-authoring that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants