/** * Run the boolean cleanEvalTrue(String) method test. * * @throws Exception */ @Test public void testCleanEvalTrue_1() throws Exception { final ExtJSComponent cmp_result = new ExtJSComponent(driver, cmpIdBy); // byExtJsGetCmp.byExtJsGetCmp("null")); final boolean result = cmp_result.execScriptCleanReturnBoolean(cmp_result.getExpression()); assertEquals(false, result); }
/** * Run the boolean evalNullComponent(String) method test. * * @throws Exception */ @Test public void testEvalNullComponent() throws Exception { final ExtJSComponent cmp_result = new ExtJSComponent(driver, cmpIdBy); Mockito.when(js.executeScript("window.Ext.getCmp('cmp_id')")).thenReturn("null"); final boolean result = cmp_result.execScriptOnExtJSCmpReturnIsNull(cmp_result.getExpression()); assertTrue(result); }
/** * Run the boolean evalNullComponent(String) method test. return false * * @throws Exception */ @Test public void testEvalNullComponent_false() throws Exception { final ExtJSComponent cmp_result = new ExtJSComponent(driver, cmpIdBy); Mockito.when(js.executeScript(Mockito.contains("var extCmp = Ext.getCmp"))) .thenReturn("something"); final boolean result = cmp_result.execScriptOnExtJSCmpReturnIsNull(cmp_result.getExpression()); assertEquals(false, result); }