-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE-244] Fixed error with existing files in pulled screenshot folder #271
[ISSUE-244] Fixed error with existing files in pulled screenshot folder #271
Conversation
…ar and compose tests
@@ -41,9 +37,7 @@ class Shot( | |||
|
|||
def recordScreenshots( | |||
appId: AppId, | |||
shotFolder: ShotFolder, | |||
projectName: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed due tu unnecessary
FileUtils.deleteDirectory(projectTemporalScreenshots) | ||
} | ||
FileUtils.deleteDirectory(new File(shotFolder.pulledScreenshotsFolder())) | ||
FileUtils.deleteDirectory(new File(shotFolder.pulledComposeScreenshotsFolder())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleteDirectory
method is checking if dir exists under the hood
@@ -7,25 +7,26 @@ case class ShotFolder( | |||
private val buildFolderPath: FilePath, | |||
private val buildType: String, | |||
private val flavor: Option[String], | |||
private val directorySuffix: Option[String] | |||
private val directorySuffix: Option[String], | |||
private val separator: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding separator in ShotFolder is necessary due to in moveComposeScreenshotsToRegularScreenshotsFolder 145 line there is replace fragment of file's path. It didn't work on Windows according to different slash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @mariuszmarzec thank you so much for your help 😃
📌 References
org.apache.commons.io.FileExistsException
#244🎩 What is the goal?
Fixing error with existing files in pulled screenshot folder for regular and compose tests.
How is it being implemented?
pulledScreenshotFolder
before downloading screenshotspulledScreenshotFolder
ShotFolder
classHow can it be tested?
gradlew test
gradlew publishToMavenLocal
gradlew executeScreenshot -Precord
gradlew executeScreenshot