Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
statuses: write
uses: NethServer/ns8-github-actions/.github/workflows/test-module-qemu.yml@v1
with:
ui_tests_strategy: never
ui_tests_strategy: on_renovate_ui_change
debug_shell: ${{ github.event.inputs.debug_shell == 'true' }}
# Other inputs: https://github.com/NethServer/ns8-github-actions/blob/v1/docs/test-module-qemu.md#inputs
32 changes: 32 additions & 0 deletions tests/wordpress.robot
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Library SSHLibrary
Resource api.resource

*** Variables ***
${ADMIN_USER} admin
${ADMIN_PASSWORD} Nethesis,1234

*** Test Cases ***
Check if wordpress is installed correctly
${output} ${rc} = Execute Command add-module ${IMAGE_URL} 1
Expand All @@ -27,12 +31,40 @@ Check postgresql path is configured
Check if wordpress works as expected
Wait Until Keyword Succeeds 20 times 3 seconds Ping wordpress

Take screenshots
[Tags] ui
Import Library Browser
New Browser chromium headless=True
New Context ignoreHTTPSErrors=True
Login to cluster-admin
Go To https://${NODE_ADDR}/cluster-admin/#/apps/${module_id}
Wait For Elements State iframe >>> h2 >> text="Status" visible timeout=10s
Sleep 5s
Take Screenshot filename=${OUTPUT DIR}/browser/screenshot/1._Status.png
Go To https://${NODE_ADDR}/cluster-admin/#/apps/${module_id}?page=settings
Wait For Elements State iframe >>> h2 >> text="Settings" visible timeout=10s
Sleep 5s
Take Screenshot filename=${OUTPUT DIR}/browser/screenshot/2._Settings.png
Go To https://${NODE_ADDR}/cluster-admin/#/apps/${module_id}?page=about
Wait For Elements State iframe >>> h2 >> text="About" visible timeout=10s
Sleep 5s
Take Screenshot filename=${OUTPUT DIR}/browser/screenshot/3._About.png
Close Browser

Check if wordpress is removed correctly
${rc} = Execute Command remove-module --no-preserve ${module_id}
... return_rc=True return_stdout=False
Should Be Equal As Integers ${rc} 0

*** Keywords ***
Login to cluster-admin
New Page https://${NODE_ADDR}/cluster-admin/
Fill Text text="Username" ${ADMIN_USER}
Click button >> text="Continue"
Fill Text text="Password" ${ADMIN_PASSWORD}
Click button >> text="Log in"
Wait For Elements State css=#main-content visible timeout=10s

Ping wordpress
${out} ${err} ${rc} = Execute Command curl -k -f -H 'Host: wordpress.domain.org' https://127.0.0.1/wp-admin/install.php
... return_rc=True return_stdout=True return_stderr=True
Expand Down
Loading