Skip to content

Commit

Permalink
revert change to newspaper generation test
Browse files Browse the repository at this point in the history
  • Loading branch information
BartChris committed Apr 30, 2024
1 parent 55b5df7 commit 4745541
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 124 deletions.
3 changes: 1 addition & 2 deletions Kitodo/src/test/java/org/kitodo/MockDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ public static void removeProcessesForHierarchyTests() throws DataException {
}


public static int insertProcessForCalendarHierarchyTests() throws DAOException, DataException {
public static void insertProcessForCalendarHierarchyTests() throws DAOException, DataException {
Ruleset fivthRuleset = new Ruleset();
fivthRuleset.setTitle("Newspaper");
fivthRuleset.setFile("newspaper.xml");
Expand All @@ -741,7 +741,6 @@ public static int insertProcessForCalendarHierarchyTests() throws DAOException,
tenthProcess.setRuleset(ServiceManager.getRulesetService().getById(5));
tenthProcess.setTitle("NewspaperOverallProcess");
ServiceManager.getProcessService().save(tenthProcess);
return tenthProcess.getId();
}

private static void insertTemplates() throws DAOException, DataException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void shouldNotGenerateDuplicateProcessTitle() throws DAOException, DataEx
Course course = NewspaperCourse.getDuplicatedCourse();
course.splitInto(Granularity.DAYS);
GeneratesNewspaperProcessesThread generatesNewspaperProcessesThread = new GeneratesNewspaperProcessesThread(completeEdition, course);
generatesNewspaperProcessesThread.start();
generatesNewspaperProcessesThread.run();

ProcessDTO byId = ServiceManager.getProcessService().findById(11);
Assert.assertNull("Process should not have been created", byId.getTitle());
Expand Down
4 changes: 2 additions & 2 deletions Kitodo/src/test/java/org/kitodo/selenium/CalendarST.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public void logout() throws Exception {
@Test
public void createProcessFromCalendar() throws Exception {
// add process to access calendar
newspaperTestProcessId = MockDatabase.insertProcessForCalendarHierarchyTests();
MockDatabase.insertProcessForCalendarHierarchyTests();

login();
processesPage.goTo();
processesPage.goToCalendar(newspaperTestProcessId);
processesPage.goToCalendar();
calendarPage.addBlock();
calendarPage.addIssue("Morning issue");
calendarPage.addIssue("Evening issue");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ProcessesPage extends Page<ProcessesPage> {
private static final String WAIT_FOR_COLUMN_SORT = "Wait for column sorting";
private static final String MULTI_VOLUME_WORK_PROCESS_TITLE = "Multi volume work test process";
private static final String WAIT_FOR_SELECTION_MENU = "Wait for process selection menu to open";
private static final String CALENDER_ACTION_XPATH = "//a[@href='/kitodo/pages/calendarEdit.jsf?id=%s']";
private static final String CALENDER_ACTION_XPATH = "//a[@href='/kitodo/pages/calendarEdit.jsf?id=10']";

@SuppressWarnings("unused")
@FindBy(id = PROCESSES_TAB_VIEW)
Expand Down Expand Up @@ -494,14 +494,8 @@ public void clickProcessesTableHeaderForSorting(int column) {
.until(() -> !columnHeader.getAttribute("aria-sort").equals(previousAriaSort));
}

/**
* Navigate to calendar page to create child processes for process with provided ID 'processId'.
* @param processId ID of process for which child processes are created using the calendar
* @throws Exception when navigating to the calendar page fails
*/
public void goToCalendar(int processId) throws Exception {
String xpath = String.format(CALENDER_ACTION_XPATH, processId);
WebElement openCalendarLink = Browser.getDriver().findElementByXPath(xpath);
public void goToCalendar() throws Exception {
WebElement openCalendarLink = Browser.getDriver().findElementByXPath(CALENDER_ACTION_XPATH);
if (isNotAt()) {
goTo();
}
Expand Down
35 changes: 0 additions & 35 deletions Kitodo/src/test/resources/metadata/10/meta.xml

This file was deleted.

40 changes: 0 additions & 40 deletions Kitodo/src/test/resources/metadata/9/meta.xml

This file was deleted.

14 changes: 0 additions & 14 deletions Kitodo/src/test/resources/scripts/not_working_script.sh

This file was deleted.

21 changes: 0 additions & 21 deletions Kitodo/src/test/resources/scripts/script_createDirUserHome.sh

This file was deleted.

0 comments on commit 4745541

Please sign in to comment.