PDA

View Full Version : Sencha Test 2.0.0.287 : Altering and saving a declaration fails to save



TABen
15 Nov 2016, 9:17 AM
Attempting to change the typingDelay value within the ST() declaration from within Sencha Test Studio allows a Save to be performed, but going to the declaration a second time shows that the value has been reverted to the original

vojtech.cerveny
16 Nov 2016, 1:32 AM
Hi,
can you please provide more informations? Some code, if I understand correctly :)

Vojtěch Červený.

TABen
16 Nov 2016, 1:35 AM
So I used the Event Recorder to create a simple script, placed the cursor on the ST.Player() function call, and selected "Go to Declaration" from the right click menu
I modified the wait time for a couple of items in the displayed init.js file and saved it
I selected the "Go to Declaration" option again and discovered that the changes I had made were no longer present

vojtech.cerveny
16 Nov 2016, 1:43 AM
If you want change typingDelay, best way how to do this is via ST.options - look at
http://docs-devel.sencha.com/sencha_test/ST.options.html#cfg-typingDelay

I prefer this:


describe('Button', function(){
var defaultTypingDelay;
beforeAll(function(){
defaultTypingDelay = ST.options.typingDelay;
// 3x slower
ST.options.typingDelay = 300;
})
afterAll(function(){
ST.options.typingDelay = defaultTypingDelay;
})
it('typing with different speed',function(){
//your code with different typingDelay;


});
});