Package org.openbravo.test.views
Class ViewGenerationWithDifferentConfigLevelTest
- java.lang.Object
-
- org.openbravo.test.base.MockableBaseTest
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.views.GridConfigurationTest
-
- org.openbravo.test.views.ViewGenerationWithDifferentConfigLevelTest
-
public class ViewGenerationWithDifferentConfigLevelTest extends GridConfigurationTest
Test cases to check if the correct configurations are set, with the different grid configurations in tab, field and in system level.- Author:
- NaroaIriarte
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_INVOICE_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description ViewGenerationWithDifferentConfigLevelTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
gridConfigurationFieldAndSystemLevel()
Having grid configuration at field and System level.void
gridConfigurationFieldAndTabLevel()
Having grid configuration at field and tab level.void
gridConfigurationFieldLevel()
Having only grid configuration at field level.void
gridConfigurationSystemLevel()
Having only grid configuration in System level.void
gridConfigurationTabAndSystemLevel()
Having grid configuration at System and tab level.void
gridConfigurationTabLevel()
Having only grid configuration at tab level.void
shouldExecuteOnlyIfThereIsNoGridConfig()
Execute these test cases only if there is no custom grid config as it could make unstable results-
Methods inherited from class org.openbravo.test.views.GridConfigurationTest
getNumberOfGridConfigurations, getSystemGridConfig, getTabGridConfig
-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUp, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
Methods inherited from class org.openbravo.test.base.MockableBaseTest
mockStatic
-
-
-
-
Method Detail
-
shouldExecuteOnlyIfThereIsNoGridConfig
public void shouldExecuteOnlyIfThereIsNoGridConfig()
Execute these test cases only if there is no custom grid config as it could make unstable results
-
gridConfigurationSystemLevel
public void gridConfigurationSystemLevel() throws Exception
Having only grid configuration in System level. In the configuration, the "by default allow filtering" checkbox is checked, so, the expression "canFilter: true" must be found.- Throws:
Exception
-
gridConfigurationTabLevel
public void gridConfigurationTabLevel() throws Exception
Having only grid configuration at tab level. The "allow filtering" property in the grid configuration at tab level, in the Business Partner tab has been set to "No". So this test checks that the "canFilter: false" expression is present.- Throws:
Exception
-
gridConfigurationTabAndSystemLevel
public void gridConfigurationTabAndSystemLevel() throws Exception
Having grid configuration at System and tab level. The "allow filtering" property in the grid configuration at tab level, in the Business Partner tab has been set to "No". So this test checks that the "canFilter: false" expression is present. Also, the "allow sorting" property has been set to default, so, the taken value is going to be the one set in the grid configuration at system level, which is true. The test checks that the "canSort: true" expression is present.- Throws:
Exception
-
gridConfigurationFieldLevel
public void gridConfigurationFieldLevel() throws Exception
Having only grid configuration at field level. The Business Partner category field of business Partner has the property allow sorting set to "Yes", so the view must have "canSort: true" expression.- Throws:
Exception
-
gridConfigurationFieldAndSystemLevel
public void gridConfigurationFieldAndSystemLevel() throws Exception
Having grid configuration at field and System level. In the grid configuration at system level, the "by default allow sorting" checkbox is checked. The tests ensures that the expression "canSort: true" exists. The business partner category of the business partner tab has the allow filtering property set to "No". The test ensures that the "canFilter: false" expression is present.- Throws:
Exception
-
gridConfigurationFieldAndTabLevel
public void gridConfigurationFieldAndTabLevel() throws Exception
Having grid configuration at field and tab level. The field Business Partner category of Business Parter has the property "allow sorting" set to "Yes". The test checks if the "canSort: true" exists. In the tab configuration the allow filtering property is set to no, so the "canFilter: false" must exist.- Throws:
Exception
-
-