Skip to content

fix: active transcript preference not loading - #682

Merged
KristinAoki merged 3 commits into
masterfrom
KristinAoki/fix-loading-saved-transcript-provider
Nov 14, 2023
Merged

KristinAoki merged 3 commits into
masterfrom
KristinAoki/fix-loading-saved-transcript-provider

Conversation

@KristinAoki

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Nov 13, 2023 •

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sweet thanks!

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