[MGNLTEST-413] FileUpload#fromResource should always return a valid File instance Created: 25/May/23  Updated: 06/Jun/23  Resolved: 06/Jun/23

Status: Closed
Project: Magnolia Test Framework
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.5

Type: Improvement Priority: Neutral
Reporter: Michael Duerig Assignee: Michael Duerig
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Team: Foundation
Work Started:
Approved:
Yes

 Description   

FileUpload#fromResource only returns a valid File for resources of the local project. For resources in dependencies it returns one that does not exist as in this case the URL of the resource points to a jar file. In such cases affected tests fail:

java.io.FileNotFoundException: file:/var/lib/jenkins/maven-local-repo/info/magnolia/bundle/test/tests/6.3-SNAPSHOT/tests-6.3-SNAPSHOT-tests.jar!/me.jpg
	at info.magnolia.test.selenium.pageobjects.FileUpload.upload(FileUpload.java:79)
	at info.magnolia.test.selenium.pageobjects.Form.uploadFile(Form.java:354)


 Comments   
Comment by Michael Duerig [ 05/Jun/23 ]

Reopening since creating temporary files fails the build on the SRE Jenkins

Generated at Mon Feb 12 07:48:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.