@Before public void setUpTest() { ITUtils.doWebSudoCrap(navigation, tester); administration.restoreBlankInstance(); ITUtils.doWebSudoCrap(navigation, tester); }
public void testAdminCanSeeProtectedPages() { try { administration.restoreData("TestWithSystemAdmin.xml"); ITUtils.doWebSudoCrap(navigation, tester); String[] urlsToCheck = new String[] { "/secure/admin/views/ExternalImport1.jspa", "/secure/admin/views/CsvSetupPage!default.jspa?externalSystem=CSV", "/secure/admin/views/ImporterSetupPage!default.jspa?externalSystem=Bugzilla", "/secure/admin/views/ImporterCustomFieldsPage!default.jspa?externalSystem=Bugzilla", "/secure/admin/views/ImporterFieldMappingsPage!default.jspa?externalSystem=Bugzilla", "/secure/admin/views/ImporterLinksPage!default.jspa?externalSystem=Bugzilla", "/secure/admin/views/ImporterLogsPage!default.jspa?externalSystem=Bugzilla", "/secure/admin/views/ImporterProjectMappingsPage!default.jspa?externalSystem=Bugzilla", "/secure/admin/views/ImporterValueMappingsPage!default.jspa?externalSystem=Bugzilla", }; checkUrlsForPerm(urlsToCheck); } finally { navigation.logout(); navigation.login("root", "root"); administration.restoreBlankInstance(); } }
/** Check all the links that an Admin should not be able to see. */ public void testAdminCanSeeExternalImportLink() { try { administration.restoreData("TestWithSystemAdmin.xml"); ITUtils.doWebSudoCrap(navigation, tester); navigation.gotoAdmin(); tester.assertLinkPresent("external_import"); } finally { navigation.logout(); navigation.login("root", "root"); administration.restoreBlankInstance(); } }