Get help with testing, discuss unit testing strategies etc.


Post by Kurt »

Hi there,

I am using phantomjs (browserless) for my tests and I am trying to tap/click a button:
{ tap: '>> #btnLogin' },
{ waitFor: 'CQ', args: 'nextView' },
After that I wait for the next view to show , but nothing happends. If I run the same test in the browser all shows fine.

What I found is:
[DEPRECATE][Ext.Button#getEl] getEl() is deprecated, please access the Component's element from the 'element' property instead
Does anyone know a solution for it?
Any hints are welcome,

Thanks.

Post by mats »

We cannot help you without a full clear test case I'm afraid.

Post by Eps »

Hi Mats,
Kurt an I are working on the same project, so here is our test case:
StartTest(function (t) {
	/**
	 * Test if the values entered on the loginscreen are reused on a second login
	 */
	t.chain(
		/**
		 * Enter values
		 */
		function (next) { t.diag('Write Values'); next(); },
		{ waitFor: 'CQ', args: 'login' },
		{ action: 'wait', delay: 500 },
		// set values
		function (next) {
			var _Ext = t.global.Ext,
				formpanel = t.cq1('formpanel'),
				cqName = formpanel.down('.textfield[name=name]'),
				cqPass = formpanel.down('.textfield[name=password]'),
				cqMsisdn = formpanel.down('.textfield[name=msisdn]');

			cqName.setValue('moso_prepaid');
			cqPass.setValue('dermosoihrpasswort');
			cqMsisdn.setValue('0198205114');

			next();
		},

		{ tap: '>> #btnLogin' },
		{ waitFor: 'CQ', args: 'verbrauchsdaten' }
           )
});

Post by mats »

This is still not a test case. A test case is something I can run locally in my own Siesta to see what is going on..

Post Reply