@Test public void testTasksView() { LOG.info("HsTasksPage"); AppContext appContext = new MockAppContext(0, 1, 1, 1); Map<String, String> params = TestAMWebApp.getTaskParams(appContext); WebAppTests.testPage(HsTasksPage.class, AppContext.class, appContext, params); }
@Test public void testTaskView() { LOG.info("HsTaskPage"); AppContext appContext = new MockAppContext(0, 1, 1, 1); Map<String, String> params = TestAMWebApp.getTaskParams(appContext); WebAppTests .testPage(HsTaskPage.class, AppContext.class, appContext, params); }
@Test public void testAttemptsView() { LOG.info("HsAttemptsPage"); AppContext appContext = new MockAppContext(0, 1, 1, 1); Map<String, String> params = TestAMWebApp.getTaskParams(appContext); WebAppTests.testPage(HsAttemptsPage.class, AppContext.class, appContext, params); }
@Test public void testJobCounterView() { LOG.info("JobCounterView"); AppContext appContext = new MockAppContext(0, 1, 1, 1); Map<String, String> params = TestAMWebApp.getJobParams(appContext); WebAppTests.testPage(HsCountersPage.class, AppContext.class, appContext, params); }
@Test public void testJobCounterViewForKilledJob() { LOG.info("JobCounterViewForKilledJob"); AppContext appContext = new MockAppContext(0, 1, 1, 1, true); Map<String, String> params = TestAMWebApp.getJobParams(appContext); WebAppTests.testPage(HsCountersPage.class, AppContext.class, appContext, params); }
@Test public void testTasksViewNaturalSortType() { LOG.info("HsTasksPage"); AppContext appContext = new MockAppContext(0, 1, 1, 1); Map<String, String> params = TestAMWebApp.getTaskParams(appContext); Injector testPage = WebAppTests.testPage(HsTasksPage.class, AppContext.class, appContext, params); View viewInstance = testPage.getInstance(HsTasksPage.class); Map<String, String> moreParams = viewInstance.context().requestContext().moreParams(); String appTableColumnsMeta = moreParams.get("ui.dataTables.selector.init"); Assert.assertTrue(appTableColumnsMeta.indexOf("natural") != -1); }
@Test public void testTaskViewNaturalSortType() { LOG.info("HsTaskPage"); AppContext appContext = new MockAppContext(0, 1, 1, 1); Map<String, String> params = TestAMWebApp.getTaskParams(appContext); Injector testPage = WebAppTests.testPage(HsTaskPage.class, AppContext.class, appContext, params); View viewInstance = testPage.getInstance(HsTaskPage.class); Map<String, String> moreParams = viewInstance.context().requestContext().moreParams(); String appTableColumnsMeta = moreParams.get("ui.dataTables.attempts.init"); Assert.assertTrue(appTableColumnsMeta.indexOf("natural") != -1); }