-
Notifications
You must be signed in to change notification settings - Fork 116
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
DEP Upgrade front-end build stack #1032
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10 | ||
18 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,9 @@ const ArchiveAction = (MenuComponent) => (props) => { | |
if (handleArchiveBlock && window.confirm(archiveMessage)) { | ||
handleArchiveBlock(id).then(() => { | ||
const preview = window.jQuery('.cms-preview'); | ||
preview.entwine('ss.preview')._loadUrl(preview.find('iframe').attr('src')); | ||
if (preview && typeof preview.entwine === 'function') { | ||
preview.entwine('ss.preview')._loadUrl(preview.find('iframe').attr('src')); | ||
} | ||
Comment on lines
-33
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required for testing purposes, where we don't actually have jquery with entwine in the DOM. |
||
}); | ||
} | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
/* global jest, describe, it, expect, window */ | ||
|
||
jest.mock('isomorphic-fetch', () => | ||
() => Promise.resolve({ | ||
json: () => ({}), | ||
}) | ||
); | ||
|
||
Comment on lines
+4
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Taken from TreeDropdownField-test.js to avoid |
||
import React from 'react'; | ||
import { Component as PublishAction } from '../PublishAction'; | ||
import Enzyme, { mount } from 'enzyme'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,11 @@ | |
use DNADesign\Elemental\Models\BaseElement; | ||
use DNADesign\Elemental\Models\ElementalArea; | ||
use DNADesign\Elemental\Models\ElementContent; | ||
use SilverStripe\BehatExtension\Context\FixtureContext as BaseFixtureContext; | ||
use SilverStripe\CMS\Tests\Behaviour\FixtureContext as BaseFixtureContext; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Necessary to include the anchor dropdown fixture method - we can't just add the |
||
use SilverStripe\Core\ClassInfo; | ||
use SilverStripe\ORM\DB; | ||
use SilverStripe\ORM\Queries\SQLInsert; | ||
|
||
if (!class_exists(BaseFixtureContext::class)) { | ||
return; | ||
} | ||
/** | ||
* Context used to create fixtures in the SilverStripe ORM. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See silverstripe/silverstripe-asset-admin#1320 (comment) for explanation of this file