Skip to content

Commit

Permalink
Feature 7194/Add support for other bibles in scripture pane (#7248)
Browse files Browse the repository at this point in the history
* working on owner support for scripture pane

* update dependencies

* fix unit tests and loading resources
  • Loading branch information
PhotoNomad0 authored Feb 17, 2022
1 parent 3188958 commit 71ca242
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 20 deletions.
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"archiver": "3.0.0",
"axios": "0.19.1",
"babel-polyfill": "6.26.0",
"checking-tool-wrapper": "7.0.3",
"checking-tool-wrapper": "7.0.4",
"crypto-js": "3.1.8",
"csv": "1.2.1",
"deep-equal": "1.0.1",
Expand Down Expand Up @@ -179,7 +179,7 @@
"tc-source-content-updater": "1.2.2",
"tc-strings": "0.1.7",
"tc-tool": "4.1.0",
"tc-ui-toolkit": "6.0.3",
"tc-ui-toolkit": "6.0.4",
"truncate-utf8-bytes": "1.0.2",
"tsv-groupdata-parser": "0.10.3",
"usfm-js": "3.3.1",
Expand Down
8 changes: 6 additions & 2 deletions src/__tests__/ResourcesActions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('ResourcesActions', () => {

const ugnt = require('./fixtures/project/en_gal/bibleData.json');

const store = mockStore({
const mockStoreInit = {
actions: {},
toolsReducer: { selectedTool: WORD_ALIGNMENT },
resourcesReducer: {
Expand Down Expand Up @@ -130,7 +130,10 @@ describe('ResourcesActions', () => {
},
},
},
});
};
// add owner support
mockStoreInit.resourcesReducer.bibles['originalLanguage_Door43-Catalog'] = mockStoreInit.resourcesReducer.bibles.originalLanguage;
const store = mockStore(mockStoreInit);
const contextId = {
reference: {
bookId: bookId,
Expand Down Expand Up @@ -264,6 +267,7 @@ function loadMockFsWithProjectAndResources() {
const copyResourceFiles = [
'en/bibles/ult',
'en/bibles/ust',
'en/lexicons',
'el-x-koine/bibles/ugnt',
'en/translationHelps/translationWords',
'en/translationHelps/translationAcademy',
Expand Down
2 changes: 1 addition & 1 deletion src/js/actions/ResourcesActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export const makeSureBiblesLoadedForTool = (contextId) => (dispatch, getState) =
// load resources not in resources reducer
if (Array.isArray(resources)) {
removeBibleFromList(resources, TARGET_BIBLE, TARGET_LANGUAGE);
resources.forEach(paneSetting => dispatch(loadBibleBook(paneSetting.bibleId, bookId, paneSetting.languageId)));
resources.forEach(paneSetting => dispatch(loadBibleBook(paneSetting.bibleId, bookId, paneSetting.languageId, null, paneSetting.owner)));
}
};

Expand Down

0 comments on commit 71ca242

Please sign in to comment.