Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031928Retail ModulesWeb POSpublic2016-01-18 13:242024-02-08 14:44
jorge-garcia 
Retail 
urgentminoralways
closedout of date 
5
 
 
No
0031928: Test I31827_Error401WhenCashup is failling
The solution of the issue and the test is ok. The problem is the infrastructure of the tests.
1) Execute test I31827_Error401WhenCashup
2) Check that the test fails and show this error:
"The preferences (permissions) have changed. If you changed the preferences within the test, restore them to the original values"
The infrastructure of the test checks the permission when the test do a login and a logout. These checks must be done when the test starts and when the test ends.
Maybe, the solution is to change this function in MobileCoreTerminalHelper:
private void verifyThatThePermissionsHaveNotChanged() {
    if (SequentialTestInfo.isTestCompatible() == false) {
      return;
    }
    TestLogger.getLogger().debug("Verifying that the 'permissions/preferences' have not changed");
    final String expectedPermissions = SequentialTestInfo.getPermissions();
    final String script = String.format(""
        + "var expectedPermissions = %s;"
        + "var currentPermissions = OB.MobileApp.model.attributes.permissions;" //
        + "if (currentPermissions === expectedPermissions) {" + " return '{}';"
        + "} else if (currentPermissions === null) {" //
        + " return JSON.stringify(expectedPermissions);" //
        + "} else if (expectedPermissions === null) {" //
        + " return JSON.stringify(currentPermissions);" //
        + "} else {" //
        + " return JSON.stringify(OB.UTIL.diffJson(currentPermissions, expectedPermissions));" //
        + "}" //
    , expectedPermissions); //
    final String currentPermissions = (String) SeleniumHelper.executeScript(script);
    assertThat(
        "The preferences (permissions) have changed. If you changed the preferences within the test, restore them to the original values",
        currentPermissions, equalTo("{}"));
  }
No tags attached.
related to defect 0031827 closed jorge-garcia 401 errors 
Issue History
2016-01-18 13:24jorge-garciaNew Issue
2016-01-18 13:24jorge-garciaAssigned To => Orekaria
2016-01-18 13:24jorge-garciaTriggers an Emergency Pack => No
2016-01-18 13:25jorge-garciaRelationship addedrelated to 0031827
2016-01-18 13:28hgbotCheckin
2016-01-18 13:28hgbotNote Added: 0083372
2016-11-10 18:15OrekariaAssigned ToOrekaria => Retail
2024-02-08 14:44shuehnerNote Added: 0160458
2024-02-08 14:44shuehnerStatusnew => closed
2024-02-08 14:44shuehnerResolutionopen => out of date

Notes
(0083372)
hgbot   
2016-01-18 13:28   
Repository: tools/automation/pi-mobile
Changeset: cdf0353f325fda344c47473b0651985bbdec799b
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Jan 18 13:27:43 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/cdf0353f325fda344c47473b0651985bbdec799b [^]

Related to issue 1827: 401 errors

The testAnnotation has change to avoid execution until the issue 31928 is fixed.

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/sessions/openstoretill/I31827_Error401WhenCashup.java
---
(0160458)
shuehner   
2024-02-08 14:44   
After mass reviewing old pos issues in 52891 => Closing as out of date