Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Oct 11, 2018
1 parent 2565a3f commit 390379c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
4 changes: 4 additions & 0 deletions client/dist/js/TinyMCE_ssembed.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions client/dist/js/TinyMCE_sslink-file.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/entwine/TinyMCE_sslink-file.js")}({"./client/src/entwine/TinyMCE_sslink-file.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),l=n(24),a=i(l),s=n(0),u=i(s),c=n(6),d=i(c),f=n(7),p=i(f),g=n(8),_=i(g),m=n(10),k=i(m),h=n(3);a.default.addAction("sslink",{text:o.default._t("AssetAdmin.LINKLABEL_FILE","Link to a file"),onclick:function(e){return e.execCommand("sslinkfile")}}).addCommandWithUrlTest("sslinkfile",/^\[file_link/);var x={init:function(e){e.addCommand("sslinkfile",function(){(0,p.default)("#"+e.id).entwine("ss").openLinkFileDialog()})}},b="insert-link__dialog-wrapper--file",v=(0,h.loadComponent)(k.default);p.default.entwine("ss",function(e){e(".insert-link__dialog-wrapper--internal .nav-link, .insert-media-react__dialog-wrapper .breadcrumb__container a").entwine({onclick:function(e){return e.preventDefault()}}),e("textarea.htmleditor").entwine({openLinkFileDialog:function(){var t=e("#"+b);t.length||(t=e('<div id="'+b+'" />'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(".js-injector-boot #"+b).entwine({renderModal:function(e){var t=this,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),o=tinymce.activeEditor.selection,l=o.getContent()||"",a=o.getNode().tagName,s="A"!==a&&""===l.trim();d.default.render(u.default.createElement(v,{isOpen:e,type:"insert-link",onInsert:i,onClosed:n,title:!1,bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:r,requireLinkText:s}),this[0])},buildAttributes:function(e){return{href:_.default.serialise({name:"file_link",properties:{id:e.ID}},!0)+(e.Anchor&&e.Anchor.length?"#"+e.Anchor:""),target:e.TargetBlank?"_blank":"",title:e.Description}},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("#");if(!i[0])return{};var r=_.default.match("file_link",!1,i[0]);return r?{ID:r.properties.id?parseInt(r.properties.id,10):0,Anchor:i[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})}),tinymce.PluginManager.add("sslinkfile",function(e){return x.init(e)}),t.default=x},0:function(e,t){e.exports=React},10:function(e,t){e.exports=InsertMediaModal},2:function(e,t){e.exports=i18n},24:function(e,t){e.exports=TinyMCEActionRegistrar},3:function(e,t){e.exports=Injector},6:function(e,t){e.exports=ReactDom},7:function(e,t){e.exports=jQuery},8:function(e,t){e.exports=ShortcodeSerialiser}});
=======
/******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -296,3 +297,6 @@ module.exports = ShortcodeSerialiser;
=======
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/entwine/TinyMCE_sslink-file.js")}({"./client/src/entwine/TinyMCE_sslink-file.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=i(r),l=n(23),a=i(l),s=n(0),u=i(s),c=n(5),d=i(c),f=n(6),p=i(f),g=n(7),_=i(g),m=n(9),k=i(m),h=n(2);a.default.addAction("sslink",{text:o.default._t("AssetAdmin.LINKLABEL_FILE","Link to a file"),onclick:function(e){return e.execCommand("sslinkfile")}}).addCommandWithUrlTest("sslinkfile",/^\[file_link/);var x={init:function(e){e.addCommand("sslinkfile",function(){(0,p.default)("#"+e.id).entwine("ss").openLinkFileDialog()})}},b="insert-link__dialog-wrapper--file",v=(0,h.loadComponent)(k.default);p.default.entwine("ss",function(e){e(".insert-link__dialog-wrapper--internal .nav-link, .insert-media-react__dialog-wrapper .breadcrumb__container a").entwine({onclick:function(e){return e.preventDefault()}}),e("textarea.htmleditor").entwine({openLinkFileDialog:function(){var t=e("#"+b);t.length||(t=e('<div id="'+b+'" />'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(".js-injector-boot #"+b).entwine({renderModal:function(e){var t=this,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),o=tinymce.activeEditor.selection,l=o.getContent()||"",a=o.getNode().tagName,s="A"!==a&&""===l.trim();d.default.render(u.default.createElement(v,{isOpen:e,type:"insert-link",onInsert:i,onClosed:n,title:!1,bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:r,requireLinkText:s}),this[0])},buildAttributes:function(e){return{href:_.default.serialise({name:"file_link",properties:{id:e.ID}},!0)+(e.Anchor&&e.Anchor.length?"#"+e.Anchor:""),target:e.TargetBlank?"_blank":"",title:e.Description}},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("#");if(!i[0])return{};var r=_.default.match("file_link",!1,i[0]);return r?{ID:r.properties.id?parseInt(r.properties.id,10):0,Anchor:i[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})}),tinymce.PluginManager.add("sslinkfile",function(e){return x.init(e)}),t.default=x},0:function(e,t){e.exports=React},1:function(e,t){e.exports=i18n},2:function(e,t){e.exports=Injector},23:function(e,t){e.exports=TinyMCEActionRegistrar},5:function(e,t){e.exports=ReactDom},6:function(e,t){e.exports=jQuery},7:function(e,t){e.exports=ShortcodeSerialiser},9:function(e,t){e.exports=InsertMediaModal}});
>>>>>>> Build
=======
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/entwine/TinyMCE_sslink-file.js")}({"./client/src/entwine/TinyMCE_sslink-file.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=i(r),l=n(25),a=i(l),s=n(0),u=i(s),c=n(5),d=i(c),f=n(6),p=i(f),g=n(7),_=i(g),m=n(9),k=i(m),h=n(2);a.default.addAction("sslink",{text:o.default._t("AssetAdmin.LINKLABEL_FILE","Link to a file"),onclick:function(e){return e.execCommand("sslinkfile")}}).addCommandWithUrlTest("sslinkfile",/^\[file_link/);var x={init:function(e){e.addCommand("sslinkfile",function(){(0,p.default)("#"+e.id).entwine("ss").openLinkFileDialog()})}},b="insert-link__dialog-wrapper--file",v=(0,h.loadComponent)(k.default);p.default.entwine("ss",function(e){e(".insert-link__dialog-wrapper--internal .nav-link, .insert-media-react__dialog-wrapper .breadcrumb__container a").entwine({onclick:function(e){return e.preventDefault()}}),e("textarea.htmleditor").entwine({openLinkFileDialog:function(){var t=e("#"+b);t.length||(t=e('<div id="'+b+'" />'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(".js-injector-boot #"+b).entwine({renderModal:function(e){var t=this,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),o=tinymce.activeEditor.selection,l=o.getContent()||"",a=o.getNode().tagName,s="A"!==a&&""===l.trim();d.default.render(u.default.createElement(v,{isOpen:e,type:"insert-link",onInsert:i,onClosed:n,title:!1,bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:r,requireLinkText:s}),this[0])},buildAttributes:function(e){return{href:_.default.serialise({name:"file_link",properties:{id:e.ID}},!0)+(e.Anchor&&e.Anchor.length?"#"+e.Anchor:""),target:e.TargetBlank?"_blank":"",title:e.Description}},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("#");if(!i[0])return{};var r=_.default.match("file_link",!1,i[0]);return r?{ID:r.properties.id?parseInt(r.properties.id,10):0,Anchor:i[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})}),tinymce.PluginManager.add("sslinkfile",function(e){return x.init(e)}),t.default=x},0:function(e,t){e.exports=React},1:function(e,t){e.exports=i18n},2:function(e,t){e.exports=Injector},25:function(e,t){e.exports=TinyMCEActionRegistrar},5:function(e,t){e.exports=ReactDom},6:function(e,t){e.exports=jQuery},7:function(e,t){e.exports=ShortcodeSerialiser},9:function(e,t){e.exports=InsertMediaModal}});
>>>>>>> Fix tests
4 changes: 4 additions & 0 deletions client/dist/js/bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/src/boot/registerQueries.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Injector from 'lib/Injector';
import { fileInterface, file, folder } from 'lib/fileFragments';
import readFilesQuery from 'state/files/readFilesQuery';

const registerQueries = () => {
Injector.query.registerFragment('FileInterfaceFields', fileInterface);
Injector.query.registerFragment('FileFields', file);
Expand Down
9 changes: 3 additions & 6 deletions client/src/state/files/readFilesQuery.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
import { fileInterface, file as fileFragment, folder as folderFragment } from 'lib/fileFragments';
import { hasFilters } from 'components/Search/Search';
import { graphqlTemplates} from 'lib/Injector';
import { graphqlTemplates } from 'lib/Injector';

const apolloConfig = {
options({ sectionConfig, folderId, fileId, query: params }) {
Expand Down Expand Up @@ -106,7 +103,7 @@ const query = {
sortBy: '[ChildrenSortInputType]',
},
args: {
'root': {
root: {
filter: 'rootFilter'
},
'root/edges/node/...on Folder/children': {
Expand Down Expand Up @@ -151,4 +148,4 @@ const query = {
],
],
};
export default query;
export default query;
3 changes: 2 additions & 1 deletion client/src/state/files/tests/readFilesQuery-test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* global jest, describe, it, pit, expect, beforeEach, jasmine */

import { config } from '../readFilesQuery';
import query from '../readFilesQuery';

describe('readFilesQuery', () => {
const config = query.apolloConfig;
let graphqlData = null;
let child1 = null;
let child2 = null;
Expand Down

0 comments on commit 390379c

Please sign in to comment.