Skip to content

Commit

Permalink
QE-15098 add before action screenshots (#438)
Browse files Browse the repository at this point in the history
Add screenshot highlights to standard steps

- Add - screenshot highlight on find functions
- Change - highlight to be separate overlay element
- Change - enable element border highlight be default
- Change - enable CUCU_MONITOR_PNG by default
- Chore - CI downgrade to python 3.11 for stability
- Chore - CI unpin remote docker executor
- Chore - bump packages
  |  | Package                                                            | From      | To       |
  |--|--------------------------------------------------------------------|-----------|----------|
  |  | [coverage](https://github.com/nedbat/coveragepy)                   | `7.4.2`   | `7.4.3`  |
  |  | [importlib-metadata](https://github.com/python/importlib_metadata) | `6.11.0`  | `7.0.1`  |
  |  | [black](https://github.com/psf/black)                              | `23.12.1` | `24.2.0` |
  |  | [pytest](https://github.com/pytest-dev/pytest)                     | `7.4.4`   | `8.0.2`  |
  |  | [ruff](https://github.com/astral-sh/ruff)                          | `0.1.15`  | `0.2.2`  |
  |  | [safety](https://github.com/pyupio/safety)                         | `2.4.0b2` | `3.0.1`  |
  |  | bandit                                                             | `1.7.5`   | `1.7.7`  |
  |  | jinja2                                                             | `3.1.2`   | `3.1.3`  |
- Chore - black format files
  • Loading branch information
ddl-cedricyoung authored Mar 1, 2024
1 parent 3800256 commit 619d925
Show file tree
Hide file tree
Showing 24 changed files with 492 additions and 215 deletions.
24 changes: 13 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ commands:

setup_remote_docker_env: &setup_remote_docker_env
steps:
- setup_remote_docker:
version: 20.10.14
- setup_remote_docker

wait_for_selenium: &wait_for_selenium
steps:
Expand Down Expand Up @@ -75,13 +74,14 @@ commands:
executors:
unit-test-executor:
docker:
- image: python:3.12.0
- image: python:3.11.7

chrome-test-executor:
docker:
- image: python:3.12.0
- image: selenium/standalone-chrome:117.0
- image: python:3.11.7
- image: selenium/standalone-chrome:122.0
environment:
CUCU_MONITOR_PNG: ""
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
SCREEN_WIDTH: 1366
Expand All @@ -90,9 +90,10 @@ executors:

firefox-test-executor:
docker:
- image: python:3.12.0
- image: selenium/standalone-firefox:117.0
- image: python:3.11.7
- image: selenium/standalone-firefox:122.0
environment:
CUCU_MONITOR_PNG: ""
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
SCREEN_WIDTH: 1366
Expand All @@ -101,9 +102,10 @@ executors:

edge-test-executor:
docker:
- image: python:3.12.0
- image: selenium/standalone-edge:117.0
- image: python:3.11.7
- image: selenium/standalone-edge:122.0
environment:
CUCU_MONITOR_PNG: ""
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
SCREEN_WIDTH: 1366
Expand All @@ -113,7 +115,7 @@ executors:
jobs:
pre-commit:
docker:
- image: cimg/python:3.12.0
- image: cimg/python:3.11.7
resource_class: medium

steps:
Expand Down Expand Up @@ -177,7 +179,7 @@ jobs:

publish:
docker:
- image: cimg/python:3.12.0
- image: cimg/python:3.11.7
steps:
- checkout
- install_cucu_dependencies
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project closely adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.190.0
- Add - screenshot highlight on find functions
- Change - highlight to be separate overlay element
- Change - enable element border highlight be default
- Change - enable CUCU_MONITOR_PNG by default
- Chore - CI downgrade to python 3.11 for stability
- Chore - CI unpin remote docker executor
- Chore - bump packages
| | Package | From | To |
|--|--------------------------------------------------------------------|-----------|----------|
| | [coverage](https://github.com/nedbat/coveragepy) | `7.4.2` | `7.4.3` |
| | [importlib-metadata](https://github.com/python/importlib_metadata) | `6.11.0` | `7.0.1` |
| | [black](https://github.com/psf/black) | `23.12.1` | `24.2.0` |
| | [pytest](https://github.com/pytest-dev/pytest) | `7.4.4` | `8.0.2` |
| | [ruff](https://github.com/astral-sh/ruff) | `0.1.15` | `0.2.2` |
| | [safety](https://github.com/pyupio/safety) | `2.4.0b2` | `3.0.1` |
| | bandit | `1.7.5` | `1.7.7` |
| | jinja2 | `3.1.2` | `3.1.3` |
- Chore - black format files

## 0.189.0
- Change - after-hook failures will report as 'passed' instead of 'failed/errored' to testrail and html reports

Expand Down
2 changes: 1 addition & 1 deletion features/cli/internals.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Internals
Then I should see "{STDOUT}" matches the following:
"""
[\s\S]*
.*File ".*\/src\/cucu\/steps\/text_steps.py", line 30, in \<module\>
.*File ".*\/src\/cucu\/steps\/text_steps.py", line 34, in \<module\>
[\s\S]*
"""

Expand Down
2 changes: 1 addition & 1 deletion features/cli/report_basics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Feature: Report basics
When I open a browser at the url "http://{HOST_ADDRESS}:{PORT}/text.html"
Then I should see the text "just some text in a label"
"""
And I run the command "cucu run {CUCU_RESULTS_DIR}/highlights --results {CUCU_RESULTS_DIR}/empty_features_results --env CUCU_INJECT_ELEMENT_BORDER='True' --generate-report --report {CUCU_RESULTS_DIR}/highlights_report" and save stdout to "STDOUT", stderr to "STDERR" and expect exit code "0"
And I run the command "cucu run {CUCU_RESULTS_DIR}/highlights --results {CUCU_RESULTS_DIR}/empty_features_results --env CUCU_SKIP_HIGHLIGHT_BORDER='True' --generate-report --report {CUCU_RESULTS_DIR}/highlights_report" and save stdout to "STDOUT", stderr to "STDERR" and expect exit code "0"

@report-only-failures
Scenario: User can generate a report with only failures
Expand Down
Loading

0 comments on commit 619d925

Please sign in to comment.