Dynamic route called twice with different parameter value doesn't execute mounted method a 2nd time - vue-router

I finally thought I had found the solution for the horrible NavigationDuplicated error on $router.push.
For that, I have created a route: /send/:id/pay/:payId that executes send.vue.
If I call the route with /send/xxx/pay/1111 and then with /send/xxx/pay/2222 I expect send.vue to be loaded a 2nd time and the method mounted to be executed a 2nd time but it's not happening.
Only the 1st call executes mounted.
Shouldn't send.vue be loaded again?

Related

need to run while loop for multiple users in jmeter

I am using jmeter to test the performance for the ride booking app.I need to run the while controller which runs the events fetching api continuously until the ride is completed or if driver is not available. This runs correctly for one user .But if i run the plan for multiple users then the while controller enters infinite loop.How can I fix this?
While Controller is being executed unless its condition (a Function or Variable) resolves to true
If it runs into an endless loop - most probably your server responds with something you don't expect, i.e. an error because it gets overloaded.
So I would suggest taking 2 actions:
Temporarily enable storing of responses into .jtl or a separate file and inspect what does the server return and amend your While Controller's condition accordingly
And/or limit maximum number of iterations of the While Controller to some reasonable number, i.e. 10 or 20 or whatever is acceptable value, example __jexl3() function
${__jexl3("${status}" != "running" && ${__jm__While Controller__idx} < 20,)}

EB Guide (com. ed 6.8) scripting engine reports "Expected 'Function () void' but got 'Error'

I'm trying to start an animation in eb guide using a script (state entry action). The scripting engine reports the error:
Expected 'Function () : void' but got 'Error'
How can I fix this?
The used script is:
function()
{
f:animation_play(this->"View 1"->"Animation 1")
}
I try to get an animation similar to the one described in Sprite animation in eb guide (community ed), but it shall start when the state is entered.
Used version is eb guide 6.8 community edition.
There are two issues with the scripts:
Function returns wrong type:
The scripting engine always takes the return value of the last command as return value of the function.
In this case, f:animation_play does not get a valid parameter (see 2. below), which is interpreted as Error return value. In case the parameter would be correct, the return value would still be incorrect, because animation_play returns a boolean value (see EB GUIDE Studio manual). To return void, use the keyword unit as last line in the script.
State entry action tries to start animation
A script which is executed when a state is entered or left cannot access children of the state, as they are not created yet (or already destroyed in case the state is left).
To start the animation when entering the state, there are two possibilities (I suggest to use the first one):
Move the script to the animation widget (add a conditional script as user-defined property) with following code:
{
f:animation_play(v:this)
false
}
Note the falsekeyword which ensures that a boolean value is returned. The script is automatically run once as soon as the current state is entered and all widgets are initialized.
Fire an event in the entry action script; another script can react on this event to start the animation. This is helpful if you don't want to directly start the animation but have some delay. Otherwise, the first approach is simpler.

runtimeservice.getVariables does not work because it can't find process instance id

I'm new to flowable and I'm trying to start a process instance with variables. params here is the Map of <String,Object> that I'm using to start the process. It all goes well, but if I try to get my variables back it tells me
"execution 22f42f67-5f88-11e9-9df0-d46d6dbfea92 doesn't exist"
But if I search for it in my process instances list, is there. This is what I do:
pi = runtimeService.startProcessInstanceById(processDefinitionId, params);
runtimeService.getVariables(pi.getId());
I'm stuck with this problem and I do not understand why it keeps doing this. What am I missing?
Flowable has the concept of RuntimeService and HistoryService. The first one contains only the runtime data (what is currently active) and the second one has all the data. The runtime data is a subset of the history data.
The reason why you can’t find the variables via the RuntimeService is due to the fact that the process is completed.
If you use the HistoryService then it would work as expected.

Break test if "if-statement" fail

one question about if statement using webdriverjs/protractor (very similar). See the code: https://gist.github.com/anonymous/e95affba5f7e148c553e772e1962073b
Note that the function it('should search for rut and click in send push', function (done)​ does an if statement if the button is present on the screen, but my question is: If the button IS NOT present on the screen, how can I stop the test? That is, as not performing the function ​it('should send message', function (done)​ ?
use expect() method inside your test to check if button id displayed in the webpage or not. if expect() method fails then protractor will not execute the next step in that test.
expect(element(by.css("button")).isDisplayed()).toBeTruthy()
element(by.css("button")).click() //this line will not be executed if the above validation fails

Sencha Touch 2 store is loaded multiple time [Maximum call stack size exceeded]

I'm having a weird problem with the Sencha Touch 2 Store class. Here is what I have:
A simple view PollsList that defines a list view (with a store attribute set to Polls). I've included the required store as follow: requires:['Polls'],
A store class Polls with a model attribute set to Poll and a dummy data attribute,
A model class named Poll (the simplest possible),
An app.js file with the following launch methode:
var pollsListView = Ext.create('PollsList');
Ext.Viewport.add(pollsListView);
Ext.Viewport.setActiveItem(pollsListView);
I've also included the stores: ['Polls'] declaration in the app.js as required.
Now, the weird thing is when I access the PollsList view, the Poll store is being loaded indefinitely, till I got a the following error:
Uncaught RangeError: Maximum call stack size exceeded sencha-touch.js:598
And the stack seems to loop on the following calls:
Ext.ClassManager.instantiate sencha-touch.js:6378
(anonymous function) sencha-touch.js:3198
(anonymous function) app/store/Polls.js:4
Ext.apply.globalEval sencha-touch.js:598
Ext.apply.globalEval sencha-touch.js:599
Ext.apply.loadScriptFile sencha-touch.js:7673
Ext.apply.require sencha-touch.js:7831
Ext.apply.syncRequire sencha-touch.js:7695
(anonymous function)
Any idea?
Seems weird, done many a times, but did not went wrong.
Any ways, try removing the setActiveItem as there is only one view and it will take it as active.
Remove the require line from the code, as it seems that currently it is not required though.(Just because i want to make this sample running).
Now, try initializing the store, as
var store = Ext.create("YourStore") //
var listControl = Ext.craeate("YourList" ,{store : "aboveCreatedStore" , ..... });
listControl.setData( {name :'hello'} ); // hoping the model is having one String type field
Ext.ViewPort.add(listControl);
Thats it...
The above given code is not a complete solution(its like a patch), but it is to make you know what wrong you are doing in your current code.