Fix mobile layout overflow caused by tooltips
This commit fixes an issue where tooltips create unwanted horizontal overflow on mobile devices. An overlay has been added to contain the tooltip within the viewport, ensuring it doesn't disrupt the page layout. The changes include adjustments to CSS visibility and pointer event handling for the tooltip container and its children. Changes: - Introduce an overlay that spans the entire viewport for the tooltip container. - Add CSS rules to ensure the tooltip and its children maintain correct pointer events and overflow behavior. - Add a Cypress end-to-end test that verifies the absence of the unintended horizontal overflow on small screens. - Uploads videos/screenshots as artifacts during CI/CD to provide easier troubleshooting. This change is supported by creating `cypress-dirs.json` to be able to share directory information with CI/CD runners and cypress configuration file.
This commit is contained in:
37
.github/workflows/tests.e2e.yaml
vendored
37
.github/workflows/tests.e2e.yaml
vendored
@@ -24,3 +24,40 @@ jobs:
|
||||
-
|
||||
name: Run e2e tests
|
||||
run: npm run test:cy:run
|
||||
-
|
||||
name: Output artifact directories
|
||||
id: artifacts
|
||||
shell: bash
|
||||
run: |-
|
||||
declare -r dirs_json_file='cypress-dirs.json'
|
||||
if [ ! -f "${dirs_json_file}" ]; then
|
||||
echo "${dirs_json_file} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCREENSHOTS_DIR=$(jq -r '.screenshots' "${dirs_json_file}")
|
||||
VIDEOS_DIR=$(jq -r '.videos' "${dirs_json_file}")
|
||||
|
||||
for dir in "${SCREENSHOTS_DIR}" "${VIDEOS_DIR}"; do
|
||||
if [ "${dir}" = 'null' ] || [ -z "${dir}" ]; then
|
||||
echo "One or more directories are null or not specified in cypress-dirs.json"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "SCREENSHOTS_DIR=${SCREENSHOTS_DIR}" >> "${GITHUB_OUTPUT}"
|
||||
echo "VIDEOS_DIR=${VIDEOS_DIR}" >> "${GITHUB_OUTPUT}"
|
||||
-
|
||||
name: Upload screenshots
|
||||
if: failure() # Run only if previous step fails because screenshots will be generated only if E2E test failed
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: e2e-screenshots
|
||||
path: ${{ steps.artifacts.outputs.SCREENSHOTS_DIR }}
|
||||
-
|
||||
name: Upload videos
|
||||
if: always() # Run even if previous step fails because test run video is always captured
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: e2e-videos
|
||||
path: ${{ steps.artifacts.outputs.VIDEOS_DIR }}
|
||||
|
||||
Reference in New Issue
Block a user