Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #29342 All Revisions ] Back to Issue ]
Summary 0029342: Stabilization: The 'cacheAvailableForUser' localStorage value is not reset when the cache is missing the terminal data
Revision 2015-03-18 20:11 by Orekaria
Steps To Reproduce Log in the WebPOS
Logout
Set a breakpoint in this line of 'ob-terminal-model.js':

if (me.isUserCacheAvailable() && window.localStorage.getItem('cacheAvailableForUser:' + OB.MobileApp.model.user) && window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') === OB.MobileApp.model.get('terminalName'))) {

Log in
When the flow stops,
Verify that the above condition is true (CORRECT)

Now, Execute this command
window.localStorage.setItem('cacheAvailableForUser:' + OB.MobileApp.model.user, false);

Verify that the above condition is true (INCORRECT)

The reason is that the false value is inserted as "false" and the condition is true


2)
Log in with Vallblanca
Set a breakpoint in 'ob-profile.js' in the line of this code:
  window.localStorage.removeItem('cacheAvailableForUser:' + OB.MobileApp.model.get('context').user.name);

Verify that the content of OB.MobileApp.model.user is 'vallblanca' (CORRECT)
Verify that the content of OB.MobileApp.model.get('context').user.name is not 'vallblanca' (INCORRECT)
Revision 2015-03-18 19:29 by Orekaria
Steps To Reproduce Log in the WebPOS
Logout
Set a breakpoint in this line of 'ob-terminal-model.js':

if (me.isUserCacheAvailable() && window.localStorage.getItem('cacheAvailableForUser:' + OB.MobileApp.model.user) && window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') === OB.MobileApp.model.get('terminalName'))) {

Log in
When the flow stops,
Verify that the above condition is true (CORRECT)

Now, Execute this command
window.localStorage.setItem('cacheAvailableForUser:' + OB.MobileApp.model.user, false);

Verify that the above condition is true (INCORRECT)

The reason is that the false value is inserted as "false"
Revision 2015-03-18 19:29 by Orekaria
Steps To Reproduce 1)
Log in the WebPOS
Logout
Set a breakpoint in this line of 'ob-terminal-model.js':

if (me.isUserCacheAvailable() && window.localStorage.getItem('cacheAvailableForUser:' + OB.MobileApp.model.user) && window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') === OB.MobileApp.model.get('terminalName'))) {

Log in
When the flow stops,
Verify that the above condition is true (CORRECT)

Now, Execute this command
window.localStorage.setItem('cacheAvailableForUser:' + OB.MobileApp.model.user, false);

Verify that the above condition is true (INCORRECT)

The reason is that the false value is inserted as "false"
Revision 2015-03-18 18:53 by Orekaria
Steps To Reproduce 1)
Log in the WebPOS
Logout
Set a breakpoint in this line of 'ob-terminal-model.js':

if (me.isUserCacheAvailable() && window.localStorage.getItem('cacheAvailableForUser:' + OB.MobileApp.model.user) && window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') === OB.MobileApp.model.get('terminalName'))) {

Log in
When the flow stops,
Verify that the above condition is true (CORRECT)

Now, Execute this command
window.localStorage.setItem('cacheAvailableForUser:' + OB.MobileApp.model.user, false);

Verify that the above condition is true (INCORRECT)

The reason is that the false value is inserted as "false"

2)
Verify that this line is removing a non existing attribute
window.localStorage.removeItem('cacheAvailableForUser:' + OB.MobileApp.model.get('context').user.name);
Revision 2015-03-18 18:53 by Orekaria
Steps To Reproduce 1)
Log in the WebPOS
Logout
Set a breakpoint in this line of 'ob-terminal-model.js':

if (me.isUserCacheAvailable() && window.localStorage.getItem('cacheAvailableForUser:' + OB.MobileApp.model.user) && window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') === OB.MobileApp.model.get('terminalName'))) {

Log in
When the flow stops,
Verify that the above condition is true (CORRECT)

Now, Execute this command
window.localStorage.setItem('cacheAvailableForUser:' + OB.MobileApp.model.user, false);

Verify that the above condition is true (INCORRECT)

The reason is that the false value is inserted as "false"

2)
Verify that this line is removing an unexisting attribute
window.localStorage.removeItem('cacheAvailableForUser:' + OB.MobileApp.model.get('context').user.name);
Revision 2015-03-18 18:51 by Orekaria
Steps To Reproduce Log in the WebPOS
Logout
Set a breakpoint in this line of 'ob-terminal-model.js':

if (me.isUserCacheAvailable() && window.localStorage.getItem('cacheAvailableForUser:' + OB.MobileApp.model.user) && window.localStorage.getItem('loggedTerminalName') && (window.localStorage.getItem('loggedTerminalName') === OB.MobileApp.model.get('terminalName'))) {

Log in
When the flow stops,
Verify that the above condition is true (CORRECT)

Now, Execute this command
window.localStorage.setItem('cacheAvailableForUser:' + OB.MobileApp.model.user, false);

Verify that the above condition is true (INCORRECT)

The reason is that the false value is inserted as "false"




Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker