kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
63 stars 63 forks source link

[3.6] Backport of - Allow multiple values for same key in mass import csv #6031

Closed BartChris closed 4 months ago

BartChris commented 5 months ago

Backport of https://github.com/kitodo/kitodo-production/pull/5998

BartChris commented 5 months ago

I have no idea why the selenium tests for the Calendar are failing in the CI, locally they seem to work. I have not been able to fix them and as far as i can see nothing has changed in the calendar page..

Error:    CalendarST.createProcessFromCalendar Multiple Failures (2 failures)
    org.awaitility.core.ConditionTimeoutException: Condition with alias 'Wait for openCalendarLink to be clickable' didn't complete within 5 seconds because condition with lambda expression in org.kitodo.selenium.testframework.pages.ProcessesPage that uses org.openqa.selenium.WebElement was not fulfilled.
    org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#editForm\:cancel"}
  (Session info: chrome=123.0.6312.122)
BartChris commented 5 months ago

@solth @oliver-stoehr I still have problems getting the tests working. What is failing now is the NewspaperProcessesGeneratorIT.shouldGenerateNewspaperProcesses test. Maybe this is caused by bringing in changes to the implementation of the Calendar Selenium test from https://github.com/kitodo/kitodo-production/pull/5949 into this PR to increase stability of those tests since they were failing before. I have no idea why the newspaper integration tests are failing. SInce you reworked a lot of tests maybe you have an idea what is going on here.

javax.naming.ConfigurationException: null
        at java.util.Optional.orElseThrow(Optional.java:408) ~[?:?]
        at org.kitodo.production.process.NewspaperProcessesGenerator.initializeRulesetFields(NewspaperProcessesGenerator.java:356) ~[classes/:?]
        at org.kitodo.production.process.NewspaperProcessesGenerator.initialize(NewspaperProcessesGenerator.java:323) ~[classes/:?]
        at org.kitodo.production.process.NewspaperProcessesGenerator.nextStep(NewspaperProcessesGenerator.java:294) ~[classes/:?]
        at org.kitodo.production.helper.tasks.GeneratesNewspaperProcessesThread.run(GeneratesNewspaperProcessesThread.java:79) ~[classes/:?]
oliver-stoehr commented 5 months ago

@BartChris I will look into it and get back to you!

oliver-stoehr commented 5 months ago

I tried to reproduce the error on my local machine, but was not able to trigger the exception reliably. Since this error occurs in NewspaperProcessesGeneratorIT it should be independent of the calendar selenium tests. However could not find the exact source of this error. It might be the result of another test not cleaning up properly/modifying the file …/10/meta.xml used in this test.

BartChris commented 4 months ago

The issue with the failing Newspaper generation tests stems from the new test introduced in the Import Service integration tests. This test alters the meta/10.xml file, hence I reset this file after the completion of all tests within this class. Although the alterations to the Calendar tests are not strictly imperative for this pull request, considering the two instances of failure in the Selenium tests in the CI, I believe it might be good to incorporate them as well.