Skip to content
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

Fix#572 #573

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ jobs:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-tox-${{ hashFiles('**/tox.ini') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/constraints.txt') }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Changelog
6.3.5 (unreleased)
------------------

- Nothing changed yet.
New feature:

- use playwright based robot tests in example.robot, drop selenium based robot tests
[1letter]


6.3.4 (2024-11-05)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,68 @@
# EXAMPLE ROBOT TESTS
# ============================================================================
#
# Run this robot test stand-alone:
# Start a single robot test
#
# make sure the rfbrowser is initialized via
#
# $ bin/test -s {{{ package.dottedname }}} -t test_example.robot --all
# $ rfbrowser init`
#
# Run this robot test with robot server (which is faster):
# Start the robot server
#
# 1) Start robot server:
# $ WSGI_SERVER_HOST=localhost WSGI_SERVER_PORT=50003 robot-server {{{ package.dottedname }}}.testing.{{{package.uppercasename}}}_ACCEPTANCE_TESTING
#
# $ bin/robot-server --reload-path src {{{ package.dottedname }}}.testing.{{{package.uppercasename}}}_ACCEPTANCE_TESTING
# Start the robot test
#
# 2) Run robot tests:
#
# $ bin/robot src/{{{ jenkins.directories }}}/tests/robot/test_example.robot
#
# See the http://docs.plone.org for further details (search for robot
# framework).
# $ WSGI_SERVER_HOST=localhost WSGI_SERVER_PORT=50003 robot src/{{{ jenkins.directories }}}/tests/robot/test_example.robot
#
# Keyword Documentation: https://marketsquare.github.io/robotframework-browser/Browser.html
#
# ============================================================================

*** Settings *****************************************************************
*** Settings ***

Resource plone/app/robotframework/selenium.robot
Resource plone/app/robotframework/keywords.robot
Resource plone/app/robotframework/browser.robot
Resource keywords.robot

Library Remote ${PLONE_URL}/RobotRemote
Library Remote ${PLONE_URL}/RobotRemote

Test Setup Open test browser
Test Teardown Close all browsers
Test Setup Run Keywords Plone test setup
Test Teardown Run keywords Plone test teardown

# disable headless mode for browser
# set the variable BROWSER to chrome or firefox
# *** Variables ***
# ${BROWSER} chrome

*** Test Cases ***************************************************************
*** Test Cases ***

Scenario: As a member I want to be able to log into the website
[Documentation] Example of a BDD-style (Behavior-driven development) test.
Given a login form
When I enter valid credentials
Then I am logged in
[Documentation] Example of a BDD-style (Behavior-driven development) test.
Given a login form
When I enter valid credentials
Then I am logged in


*** Keywords *****************************************************************
*** Keywords ***

# --- Given ------------------------------------------------------------------

a login form
Go To ${PLONE_URL}/login_form
Wait until page contains Login Name
Wait until page contains Password
Go To ${PLONE_URL}/login_form
Wait for Condition Text //body contains Login Name
Wait for Condition Text //body contains Password


# --- WHEN -------------------------------------------------------------------

I enter valid credentials
Input Text __ac_name admin
Input Text __ac_password secret
Click Button Log in
Type Text //input[@name="__ac_name"] admin
Type Text //input[@name="__ac_password"] secret
Click //button[@name="buttons.login"]



# --- THEN -------------------------------------------------------------------

I am logged in
Wait until page contains You are now logged in
Page should contain You are now logged in
Wait For Condition Text //body contains You are now logged in
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ envlist =
py39-lint
py310-lint
py311-lint
black-check
py310-black-check
docs
py{311,310,39,38}-packagetests
py{38}-skeletontests-Plone{52}-template-addon
Expand Down Expand Up @@ -180,7 +180,7 @@ deps = {[lint]deps}
commands = {[lint]commands}
allowlist_externals = {[lint]allowlist_externals}

[testenv:black-check]
[testenv:py310-black-check]
basepython = python3.10
skip_install = True
deps =
Expand Down
Loading