From 827a1f5e349ca0aed6001c6ccb7d551845ec3a9e Mon Sep 17 00:00:00 2001 From: Arved Solth Date: Thu, 24 Aug 2023 22:08:54 +0200 Subject: [PATCH] Fix ProcessesSelectingST --- .../kitodo/selenium/ProcessesSelectingST.java | 36 +++---------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/Kitodo/src/test/java/org/kitodo/selenium/ProcessesSelectingST.java b/Kitodo/src/test/java/org/kitodo/selenium/ProcessesSelectingST.java index 6890bce69d9..785adf34bab 100644 --- a/Kitodo/src/test/java/org/kitodo/selenium/ProcessesSelectingST.java +++ b/Kitodo/src/test/java/org/kitodo/selenium/ProcessesSelectingST.java @@ -42,39 +42,11 @@ public class ProcessesSelectingST extends BaseTestSelenium { public static void setup() throws Exception { User user = ServiceManager.getUserService().getById(1); - user.setTableSize(2); + user.setTableSize(1); ServiceManager.getUserService().saveToDatabase(user); - addProcesses(); processesPage = Pages.getProcessesPage(); } - private static void addProcesses() throws Exception { - Project projectOne = ServiceManager.getProjectService().getById(1); - Template template = ServiceManager.getTemplateService().getById(1); - - Process forthProcess = new Process(); - forthProcess.setTitle("Forth process"); - LocalDate localDate = LocalDate.of(2020, 3, 20); - forthProcess.setCreationDate(Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant())); - forthProcess.setWikiField("SelectionTest"); - forthProcess.setDocket(ServiceManager.getDocketService().getById(1)); - forthProcess.setProject(projectOne); - forthProcess.setRuleset(ServiceManager.getRulesetService().getById(1)); - forthProcess.setTemplate(template); - ServiceManager.getProcessService().save(forthProcess); - - Process fifthProcess = new Process(); - fifthProcess.setTitle("Fifth process"); - localDate = LocalDate.of(2020, 4, 20); - fifthProcess.setCreationDate(Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant())); - fifthProcess.setWikiField("SelectionTest"); - fifthProcess.setDocket(ServiceManager.getDocketService().getById(1)); - fifthProcess.setProject(projectOne); - fifthProcess.setRuleset(ServiceManager.getRulesetService().getById(1)); - fifthProcess.setTemplate(template); - ServiceManager.getProcessService().save(fifthProcess); - } - @Before public void login() throws Exception { Pages.getLoginPage().goTo().performLoginAsAdmin(); @@ -94,7 +66,7 @@ public void selectAllProcessesOnPageTest() throws Exception { processesPage.goTo(); processesPage.selectAllRowsOnPage(); - assertEquals(processesPage.countListedSelectedProcesses(), 2); + assertEquals(processesPage.countListedSelectedProcesses(), 1); processesPage.goToNextPage(); assertEquals(processesPage.countListedSelectedProcesses(), 0); @@ -109,9 +81,9 @@ public void selectAllProcessesTest() throws Exception { processesPage.goTo(); processesPage.selectAllRows(); - assertEquals(processesPage.countListedSelectedProcesses(), 2); + assertEquals(processesPage.countListedSelectedProcesses(), 1); processesPage.goToNextPage(); - assertEquals(processesPage.countListedSelectedProcesses(), 2); + assertEquals(processesPage.countListedSelectedProcesses(), 1); } }