Skip to content

Commit

Permalink
Develop (#107)
Browse files Browse the repository at this point in the history
### To be filled by the PR creator:

* A brief description of the changes made - 

* Do we have clean latest run report (Docker or Browserstack) attached
with this PR?
  * [ ] Yes
  * [ ] No (Please explain why)

* Does the PR contain changes to any core file?
  * [ ] Yes (Needs approval from at least 1 people)
  * [ ] No

* Is it
  * [ ] New Testcase
  * [ ] Fix


### To be filled by the PR reviewer:

* [ ] Verify the attached run report passed in GitHub Actions (Docker or
Browserstack run)

* General
    * [ ] Use the best strategy to locate the elements
    * [ ] Comments wherever the code is not readable by itself
    * [ ] Use of the right data structure for the use case
    * [ ] Reuse logic/functionality as much as possible
    * [ ] Cleanup of any test data that is generated by the tests
    * [ ] No static waits
  • Loading branch information
tauqirsarwar1 authored Apr 18, 2024
2 parents 4dcd38e + e9eb152 commit 9a9e135
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 15 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/ui_suites_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: BS - Web UI Suites Tests

env:
TAGS: 'web_tests'
BASE_URL: https://opensource-demo.orangehrmlive.com
BROWSERSTACK_USER: ${{secrets.BROWSERSTACK_API_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
HRM_USER_NAME: ${{ secrets.HRM_USER_NAME }}
HRM_PASSWORD: ${{ secrets.HRM_PASSWORD }}

on:
schedule:
- cron: '0 20 * * *'
workflow_dispatch:
inputs:
tags:
description: Gherkin Tags
required: true
default: 'web_tests'

jobs:
web-suites-regression:
strategy:
max-parallel: 1
fail-fast: true
matrix:
include:
- name: Win Chrome
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and healthcheck'
config_file: ./env_configs/win_chrome.json
html_report: win-chrome

- name: Win Firefox
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and firefox and smoke'
config_file: ./env_configs/win_firefox.json
html_report: win-firefox

- name: Win Edge
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and sanity'
config_file: ./env_configs/win_edge.json
html_report: win-edge

- name: Mac Safari
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and regression'
config_file: ./env_configs/mac_safari.json
html_report: mac-safari

name: ${{ matrix.name }} - Regression
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: BrowserStack Env Setup
uses: browserstack/github-actions/setup-env@master
with:
username: ${{secrets.BROWSERSTACK_API_USERNAME}}
access-key: ${{secrets.BROWSERSTACK_ACCESS_KEY}}

- name: BrowserStack Local Tunnel Setup
uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random

- name: Check out code
uses: actions/checkout@v4

- name: Setup dependencies
run: |
sh setup_install.sh
- name: Run All Tests
run: |
env
source $HOME/.bp-venv/bin/activate
sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "${{ matrix.config_file }}" "${{ matrix.tags }}" "${{ matrix.baseurl }}" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}"
- name: BrowserStackLocal Stop
uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop
if: ${{ always() }}

- name: Upload HTML run report in the Artifacts Folder
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.html_report }}
path: |
./*.html
./output/
./assets/
./test_data/visualtesting/test/*.png
if: ${{ always() }}
7 changes: 0 additions & 7 deletions .github/workflows/ui_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,6 @@ jobs:
with:
local-testing: stop
if: ${{ always() }}
- name: Get Allure history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages

- name: Upload HTML run report in the Artifacts Folder
uses: actions/upload-artifact@v4
Expand Down
16 changes: 8 additions & 8 deletions frontend/test_project/features/web/web_tests.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@nondestructive @web_tests
Feature: OrangeHRM Login and Modus QA blog

@hrm_login @hrm_logout @automated @firefox
@hrm_login @hrm_logout @automated @firefox @healthcheck
Scenario: Login into OrangeHRM system and logout
Given I set web base url '{%BASE_URL%}'
And Browser is maximized
Expand All @@ -17,7 +17,7 @@ Feature: OrangeHRM Login and Modus QA blog
And I click item 'Logout' for element 'OrangeHRM > logout_button'
Then The element 'OrangeHRM > username' is displayed

@hrm_add_user @automated @firefox
@hrm_add_user @automated @firefox @smoke
Scenario: Login and add admin user in OrangeHRM system
Given I set web base url '{%BASE_URL%}'
And Browser is maximized
Expand Down Expand Up @@ -58,7 +58,7 @@ Feature: OrangeHRM Login and Modus QA blog
And I click on button 'OrangeHRM > User > delete_confirm'
Then The element 'OrangeHRM > User > success_message' is displayed

@blog_search @automated @firefox
@blog_search @automated @firefox @sanity
Scenario: Check QA modus blog Search
Given I set web base url 'https://moduscreate.com'
And The browser resolution is '1024' per '768'
Expand All @@ -80,7 +80,7 @@ Feature: OrangeHRM Login and Modus QA blog
And The element 'Modus_Site > sub_popup_close' is displayed


@sd_login @sd_login_error @sd_checkout @automated @firefox
@sd_login @sd_login_error @sd_checkout @automated @firefox @sanity
Scenario: Login into saucedemo site with valid credentials
Given I set web base url 'https://www.saucedemo.com'
And Browser is maximized
Expand Down Expand Up @@ -115,7 +115,7 @@ Feature: OrangeHRM Login and Modus QA blog
And The element 'SourceDemo_Site > Checkout_page > thank_you_message' is displayed


@sd_failure_message @automated @firefox
@sd_failure_message @automated @firefox @regression
Scenario: Try to login into saucedemo site with in-valid credentials
Given I set web base url 'https://www.saucedemo.com'
And Browser is maximized
Expand All @@ -126,7 +126,7 @@ Feature: OrangeHRM Login and Modus QA blog
And I click on element 'SourceDemo_Site > login_button'
Then The element 'SourceDemo_Site > login_error_message' is displayed

@job_search @automated
@job_search @automated @healthcheck
Scenario: Check QA modus job Search
Given I set web base url 'https://moduscreate.com'
And Browser is maximized
Expand All @@ -152,7 +152,7 @@ Feature: OrangeHRM Login and Modus QA blog
When The element 'Modus_Site > Careers > resume_link' is displayed
And I click on button 'Modus_Site > Careers > resume_link'
And I set text 'testing resume' to field 'Modus_Site > Careers > resume_text'
And I move to an element 'Modus_Site > Careers > move_form_dropdown' with offset '50' '50'
And I move to an element 'Modus_Site > Careers > move_form_dropdown' with offset '50' '100'
And I click item 'Please select the country where you are living' for element 'Modus_Site > Careers > form_dropdown'
And I click item 'Afghanistan' for element 'Modus_Site > Careers > country_dropdown'
And I set text 'Modus Create' to field 'Modus_Site > Careers > current_company'
Expand All @@ -176,7 +176,7 @@ Feature: OrangeHRM Login and Modus QA blog
And I click item 'data protection apps upon hire' for element 'Modus_Site > Careers > form_dropdown'
And I click item 'Yes' for element 'Modus_Site > Careers > protection_dropdown'

@gmail @automated @firefox
@gmail @automated @firefox @regression
Scenario: Email Verification with email link
Given I set web base url '{%BASE_URL%}'
And Browser is maximized
Expand Down

0 comments on commit 9a9e135

Please sign in to comment.