Get help with testing, discuss unit testing strategies etc.


Post by Howard »

Hello,

We're currently upgrading our ExtJS app from version 5 to version 7.6 and have hit an issue with importing the Ext.charts package. This has been raised before by another forum member here- viewtopic.php?p=49856 - but there isn't a resolution on the thread.

Briefly, the charts library is under the Ext.charts namespace but the files are split across two locations (ext/packages/charts/src/chart and ext/packages/charts/classic/src/chart). How can we use the loaderPath to import classes from two different locations?

E.g.

loaderPath: {
	'Ext.chart': '../../../ext/packages/charts/src/chart' // <- Also needs the "classic" classes to be imported.
},

We are currently using Siesta 5.6.1.


Post by nickolay »

Hi,

If I'm correct, you need to set the correct "loader paths" for both namespaces, something like:

loaderPath: {
	'Ext.chart.commonFiles': '../../../ext/packages/charts/src/chart' ,
	'Ext.chart.Chart1': '../../../ext/packages/charts/classic/src/chart' 	
},

How does the loaderPath config looks like in your application? In theory, you can just copy that value from the application to the test suite.


Post by Howard »

Thanks, nickolay! Including 'Ext.chart.theme' and 'Ext.draw' for the main directories, along with specific file references for classes in the classic directories has worked.


Post by nickolay »

Glad it works, yw!


Post Reply