Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions e2e/testcafe-devextreme/tests/common/shadowDOM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fixture.disablePageReloads`Shadow DOM - Adopted DX css styles`
const dxWidgetHostStyles = '.dx-widget-shadow { font-size: 20px; }';
const dxWidgetShadowStyles = '.dx-widget-shadow { font-size: 40px; }';

const setupShadowDOMTest = (copyStylesToShadowDom) => ClientFunction((copyStyles) => {
const setupShadowDomTest = (copyStylesToShadowDom) => ClientFunction((copyStyles) => {
if (!copyStyles) {
(window as any).DevExpress.config({ copyStylesToShadowDom: copyStyles });
}
Expand Down Expand Up @@ -64,7 +64,7 @@ const getAdoptedStyleSheets = ClientFunction(() => {
});

test('Copies DX css styles from the host to the shadow root when rendering a DX widget', async (t) => {
await setupShadowDOMTest(true);
await setupShadowDomTest(true);

const { firstSheetRules, secondSheetRules } = await getAdoptedStyleSheets();

Expand All @@ -76,7 +76,7 @@ test('Copies DX css styles from the host to the shadow root when rendering a DX
});

test('Does not copy DX css styles when copyStylesToShadowDom is disabled', async (t) => {
await setupShadowDOMTest(false);
await setupShadowDomTest(false);

const { firstSheetRules, secondSheetRules } = await getAdoptedStyleSheets();
await t.expect(firstSheetRules === null && secondSheetRules === null)
Expand Down
1 change: 1 addition & 0 deletions packages/devextreme/js/__internal/core/m_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const config = {
useJQuery: undefined,
editorStylingMode: undefined,
useLegacyVisibleIndex: false,
versionAssertions: [],
copyStylesToShadowDom: true,

floatingActionButtonConfig: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import { computeStyleSheetsHash, addShadowDomStyles } from '__internal/core/utils/m_shadow_dom';

QUnit.module('computeStyleSheetsHash', () => {
Expand Down Expand Up @@ -36,6 +37,7 @@ QUnit.module('addShadowDomStyles', () => {

const div = document.createElement('div');
shadow.appendChild(div);

const $div = $(div);

addShadowDomStyles($div);
Expand Down
Loading