zalando / zalenium

A flexible and scalable container based Selenium Grid with video recording, live preview, basic auth & dashboard.
https://opensource.zalando.com/zalenium/
Other
2.39k stars 574 forks source link

issue #1047 - Dashboard UI is broken when clicking the reset button -… #1201

Closed mookkiah closed 4 years ago

mookkiah commented 4 years ago

When user clicks reset button on dashboard (in docker installation), the static resources like image, js and css gets deleted under videos folder. This result into broken UI. Fix provided by ensuring static resources are available after reset or cleanup

Description

refactored the code which copies static resources into videos folder so that it can be used. Named the method as ensureStaticResourcesExists. Called ensureStaticResourcesExists inside cleanUpFiles.

Motivation and Context

This keeps the dashboard not broken.

How Has This Been Tested?

To ensure code is not having compilation error - used maven clean compile Not able to test with mvn test due to not having account in testing platforms. Built docker image using mvn clean install -DskipTests -Pbuild-docker-image Pushed into internal docker registry Used the image run helm chart. Application came up successfully. Tried reset and cleanup - UI did not break. SSH into the container and deleted ~/videos/js folder and clicked reset on dashboard which created the js directory again.

Types of changes

Checklist: