@@ -61,67 +61,23 @@ export async function loadAxeCore(t: TestController): Promise<void> {
6161 } ) ) . with ( { boundTestRun : t } ) ( ) ;
6262}
6363
64- export async function loadGantt ( t : TestController ) : Promise < void > {
64+ export async function loadShadowDomExtension ( t : TestController ) : Promise < void > {
6565 await ClientFunction ( ( ) => new Promise < void > ( ( resolve , reject ) => {
66- if ( document . getElementById ( 'dx-gantt -script' ) ) {
66+ if ( document . getElementById ( 'shadow-dom-extension -script' ) ) {
6767 resolve ( ) ;
6868 return ;
6969 }
7070
7171 const script = document . createElement ( 'script' ) ;
72- script . id = 'dx-gantt -script' ;
73- script . src = '../../../packages/devextreme/artifacts/js/dx-gantt.min .js' ;
72+ script . id = 'shadow-dom-extension -script' ;
73+ script . src = '../../helpers/shadowDom/shadowDomExtension .js' ;
7474 // @ts -expect-error ts-error
7575 script . onload = resolve ;
7676 script . onerror = reject ;
77- document . head . prepend ( script ) ;
78- } ) ) . with ( { boundTestRun : t } ) ( ) ;
79- }
80-
81- export async function loadQuill ( t : TestController ) : Promise < void > {
82- await ClientFunction ( ( ) => new Promise < void > ( ( resolve , reject ) => {
83- // @ts -expect-error ts-error
84- if ( window . Quill ) {
85- resolve ( ) ;
86- return ;
87- }
88-
89- const script = document . createElement ( 'script' ) ;
90- script . id = 'dx-quill-script' ;
91- script . src = '../../../packages/devextreme/artifacts/js/dx-quill.min.js' ;
92- // @ts -expect-error ts-error
93- script . onload = resolve ;
94- script . onerror = reject ;
95- document . head . prepend ( script ) ;
96- } ) ) . with ( { boundTestRun : t } ) ( ) ;
97- }
98-
99- export async function loadDevExtreme ( t : TestController ) : Promise < void > {
100- await ClientFunction ( ( ) => new Promise < void > ( ( resolve , reject ) => {
101- if ( document . getElementById ( 'dx-all-script' ) ) {
102- resolve ( ) ;
103- return ;
104- }
105-
106- const script = document . createElement ( 'script' ) ;
107- script . id = 'dx-all-script' ;
108- script . src = '../../../packages/devextreme/artifacts/js/dx.all.js' ;
109- // @ts -expect-error ts-error
110- script . onload = resolve ;
111- script . onerror = reject ;
112- document . head . prepend ( script ) ;
77+ document . head . appendChild ( script ) ;
11378 } ) ) . with ( { boundTestRun : t } ) ( ) ;
11479}
11580
116- export async function removeScript ( t : TestController , scriptId : string ) : Promise < void > {
117- await ClientFunction ( ( id : string ) => {
118- const script = document . getElementById ( id ) ;
119- if ( script ) {
120- script . remove ( ) ;
121- }
122- } ) . with ( { boundTestRun : t } ) ( scriptId ) ;
123- }
124-
12581export const addShadowRootTree = async ( t : TestController ) : Promise < void > => {
12682 await ClientFunction ( ( ) => {
12783 const root = document . querySelector ( '#parentContainer' ) as HTMLElement ;
0 commit comments