diff --git a/.github/scripts/upload_file_to_sharepoint.py b/.github/scripts/upload_file_to_sharepoint.py new file mode 100644 index 000000000..e69de29bb diff --git a/.github/scripts/upload_to_sharepoint.py b/.github/scripts/upload_to_sharepoint.py new file mode 100644 index 000000000..4fa2f3ece --- /dev/null +++ b/.github/scripts/upload_to_sharepoint.py @@ -0,0 +1,79 @@ +import os +import glob +import requests +import msal + +# Receive environment variables from GitHub Actions Workflow +TENANT_ID = os.getenv('TENANT_ID') +CLIENT_ID = os.getenv('CLIENT_ID') +CLIENT_SECRET = os.getenv('CLIENT_SECRET') +SHAREPOINT_SITE_ID = os.getenv('SHAREPOINT_SITE_ID') +SHAREPOINT_DRIVE_ID = os.getenv('SHAREPOINT_DRIVE_ID') +FILES_PATH = os.getenv('FILES_PATH') + +# Define the scopes and endpoints +SCOPE = ["https://graph.microsoft.com/.default"] +GRAPH_API_ENDPOINT = 'https://graph.microsoft.com/v1.0' + + +def authenticate(): + # Forming the authority + authority = f"https://login.microsoftonline.com/{TENANT_ID}" + + # Creating the ConfidentialClientApplication + app = msal.ConfidentialClientApplication( + CLIENT_ID, + authority=authority, + client_credential=CLIENT_SECRET, + ) + + # Getting the access token + result = app.acquire_token_silent(SCOPE, account=None) + + if not result: + result = app.acquire_token_for_client(SCOPE) + + if "access_token" in result: + return result["access_token"] + else: + raise Exception(f"Authentication failed: {result.get('error')}, {result.get('error_description')}") + + +def upload_files_to_sharepoint(access_token): + # Get list of all files in the directory + files = glob.glob(FILES_PATH) + + for file_path in files: + try: + # Building the correct endpoint + FILE_NAME = os.path.basename(file_path) + upload_url = ( + f"{GRAPH_API_ENDPOINT}/sites/{SHAREPOINT_SITE_ID}/drives/{SHAREPOINT_DRIVE_ID}" + f"/items/root:/{FILE_NAME}:/content" + ) + + # Read file content + with open(file_path, "rb") as file_data: + file_content = file_data.read() + + # Define headers + headers = { + "Authorization": f"Bearer {access_token}", + "Content-Type": "application/octet-stream", + } + + # Make the request + response = requests.put(upload_url, headers=headers, data=file_content) + + # Check the response + if response.status_code == 201: + print(f"File uploaded successfully to {SHAREPOINT_DRIVE_ID}/{FILE_NAME}") + else: + print(f"Failed to upload file: {response.status_code}, {response.text}") + + except Exception as e: + print(f"Error: {e}") + + +if __name__ == "__main__": + upload_files_to_sharepoint(authenticate()) diff --git a/.github/workflows/ANALYSIS TOOLS - CCP Regression.yml b/.github/workflows/ANALYSIS TOOLS - CCP Regression.yml index 8e778b409..ffe862b0b 100644 --- a/.github/workflows/ANALYSIS TOOLS - CCP Regression.yml +++ b/.github/workflows/ANALYSIS TOOLS - CCP Regression.yml @@ -41,3 +41,16 @@ jobs: with: name: CCP-REGRESSION-${{ env.timestamp }} path: target/CCP-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/CCP-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/ANALYSIS TOOLS - ICDGenie Regression.yml b/.github/workflows/ANALYSIS TOOLS - ICDGenie Regression.yml index e2e94a1a9..83972a61f 100644 --- a/.github/workflows/ANALYSIS TOOLS - ICDGenie Regression.yml +++ b/.github/workflows/ANALYSIS TOOLS - ICDGenie Regression.yml @@ -33,11 +33,24 @@ jobs: Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" - name: Determine report path id: reportpath - run: echo "path=html-reports" >> $GITHUB_ENV + run: echo "path=ICDGenie-regression-reports" >> $GITHUB_ENV - name: Upload Cucumber Report uses: actions/upload-artifact@v4 if: always() with: name: ICDGENIE-REGRESSION-${{ env.timestamp }} - path: target/html-reports/* + path: target/ICDGenie-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/ICDGenie-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/ANALYSIS TOOLS - NIFE Regression.yml b/.github/workflows/ANALYSIS TOOLS - NIFE Regression.yml new file mode 100644 index 000000000..9a3935853 --- /dev/null +++ b/.github/workflows/ANALYSIS TOOLS - NIFE Regression.yml @@ -0,0 +1,56 @@ +name: ANALYSIS TOOLS - NIFE Regression + +on: + schedule: + # This corresponds to 10:30 AM EST (3:30 PM UTC) from Monday to Friday + - cron: '30 15 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="AnalysisTools.NIFESubmit.NIFESubmit_Runners.RunNIFESubmitRegressionTest" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=NIFE-Regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: NIFE-REGRESSION-${{ env.timestamp }} + path: target/NIFE-Regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/NIFE-Regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/ANALYSIS TOOLS - SOCCER Regression.yml b/.github/workflows/ANALYSIS TOOLS - SOCCER Regression.yml new file mode 100644 index 000000000..1dbdcf53f --- /dev/null +++ b/.github/workflows/ANALYSIS TOOLS - SOCCER Regression.yml @@ -0,0 +1,56 @@ +name: ANALYSIS TOOLS - SOCCER Regression + +on: + schedule: + # This corresponds to 7:30 AM EST (12:30 PM UTC) from Monday to Friday + - cron: '30 12 * * 1-5' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="AnalysisTools.Soccer.Soccer_Runners.RunSoccerRegressionTest" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=soccer-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: SOCCER-REGRESSION-${{ env.timestamp }} + path: target/soccer-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/soccer-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/CCT-CHAT-BOT-Smoke.yml b/.github/workflows/CCT-CHAT-BOT-Smoke.yml deleted file mode 100644 index bbb6a34d1..000000000 --- a/.github/workflows/CCT-CHAT-BOT-Smoke.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: PLATFORM BUSINESS - CCT CHAT BOT SMOKE TESTS - -on: - schedule: - # This corresponds to 7:15 AM EST (12:15 PM UTC) from Monday to Friday - - cron: '15 12 * * MON-FRI' - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: ubuntu-latest - env: - DISPLAY: ".99" - SCREEN_RESOLUTION: "1280x1024x24" - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Install Google Chrome - run: | - sudo apt-get install -y wget - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get install -y ./google-chrome-stable_current_amd64.deb - - name: Replace variables in cloudEnv.properties - run: | - sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/SIDE_DOOR_PASSWORD/${{ secrets.SIDEDOORPASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - if [ "${{ github.event_name }}" = "schedule" ]; then - sed -i "s/BROWSER_VAR/chrome/g" src/main/resources/conf/cloudEnv.properties - else - sed -i "s/BROWSER_VAR/${{ github.event.inputs.testBrowser }}/g" src/main/resources/conf/cloudEnv.properties - fi - sed -i "s/ENV_VAR/test/g" src/main/resources/conf/cloudEnv.properties - - name: Run specific runner class - run: mvn -B -q -Dtest=Run_CCT_CHAT_Smoke_Test -DisCloud=true test - continue-on-error: true - - name: Generate timestamp - id: timestamp - run: echo "::set-output name=timestamp::$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" - - name: Determine report path - id: reportpath - run: echo "::set-output name=path::cct-smoke-reports" - - name: Upload Cucumber Report - uses: actions/upload-artifact@v3 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/cct-smoke-reports/* - - name: Remove Google Chrome installation file - run: rm google-chrome-stable_current_amd64.deb - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git rm -f src/main/resources/conf/cloudEnv.properties - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/cct-smoke-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - sed -i '1s/.*/

CCT CHAT BOT Smoke Test Results<\/h1>/' cct-smoke-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> cct-smoke-test-results.html - git add cct-smoke-test-results.html - git commit -m "Update cct-smoke-test-results.html" - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/CHANGE-PASSWORD-Smoke.yml b/.github/workflows/CHANGE-PASSWORD-Smoke.yml deleted file mode 100644 index cbfe41df0..000000000 --- a/.github/workflows/CHANGE-PASSWORD-Smoke.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: GRANTS - CHANGE PASSWORD SMOKE TESTS - -on: - schedule: - # This corresponds to 8:00 AM EST (1:00 PM UTC) from Monday to Friday - - cron: '0 13 * * MON-FRI' - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: self-hosted - env: - DISPLAY: ":.99" - SCREEN_RESOLUTION: "1280x1024x24" - steps: - - name: Setup xvfb - run: | - sudo yum install -y xorg-x11-server-Xvfb - Xvfb :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Install Google Chrome - run: | - sudo yum install -y wget - wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm - sudo yum install -y ./google-chrome-stable_current_x86_64.rpm - - name: Replace variables in cloudEnv.properties - run: | - sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/SIDE_DOOR_PASSWORD/${{ secrets.SIDEDOORPASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/USER_VAR/${{ secrets.JUAREZDS_USERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/PASSWORD_VAR/${{ secrets.JUAREZDS_PASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - if [ "${{ github.event_name }}" = "schedule" ]; then - sed -i "s/BROWSER_VAR/chrome/g" src/main/resources/conf/cloudEnv.properties - else - sed -i "s/BROWSER_VAR/${{ github.event.inputs.testBrowser }}/g" src/main/resources/conf/cloudEnv.properties - fi - sed -i "s/ENV_VAR/test/g" src/main/resources/conf/cloudEnv.properties - - name: Run specific runner class - run: mvn -B -q -Dtest=RunChangePasswordSmokeTest -DisCloud=true test - continue-on-error: true - - name: Generate timestamp - id: timestamp - run: echo "::set-output name=timestamp::$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" - - name: Determine report path - id: reportpath - run: echo "::set-output name=path::changePassword-smoke-reports" - - name: Upload Cucumber Report - uses: actions/upload-artifact@v3 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/changePassword-smoke-reports/* - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git rm -f src/main/resources/conf/cloudEnv.properties - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/changePassword-smoke-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - if [[ -f "changePassword-smoke-test-results.html" ]]; then - sed -i '1s/.*/

CHANGE PASSWORD Smoke Test Results<\/h1>/' changePassword-smoke-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> changePassword-smoke-test-results.html - git add changePassword-smoke-test-results.html - git commit -m "Update changePassword-smoke-test-results.html" - else - echo "

CHANGE PASSWORD Smoke Test Results

" > changePassword-smoke-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> changePassword-smoke-test-results.html - git add changePassword-smoke-test-results.html - git commit -m "Create and update changePassword-smoke-test-results.html" - fi - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/CHARMS - Fanconi Regression.yml b/.github/workflows/CHARMS - Fanconi Regression.yml index e070373f5..ebc12a9dd 100644 --- a/.github/workflows/CHARMS - Fanconi Regression.yml +++ b/.github/workflows/CHARMS - Fanconi Regression.yml @@ -33,14 +33,14 @@ jobs: Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" - name: Determine report path id: reportpath - run: echo "path=html-charms-fanconi-regression-reports" >> $GITHUB_ENV + run: echo "path=fanconi-regression-reports" >> $GITHUB_ENV - name: Upload Cucumber Report uses: actions/upload-artifact@v4 if: always() with: name: CHARMS-FANCONI-REGRESSION-${{ env.timestamp }} - path: target/html-charms-fanconi-regression-reports/* + path: target/fanconi-regression-reports/* - name: Upload to SharePoint shell: powershell @@ -48,9 +48,9 @@ jobs: $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py env: - FILES_PATH: target/html-charms-fanconi-regression-reports/* + FILES_PATH: target/fanconi-regression-reports/* SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} - client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/CHARMS - RAS Regression.yml b/.github/workflows/CHARMS - RAS Regression.yml index 24dfe372d..4e1951951 100644 --- a/.github/workflows/CHARMS - RAS Regression.yml +++ b/.github/workflows/CHARMS - RAS Regression.yml @@ -2,8 +2,8 @@ name: CHARMS - RAS Regression on: schedule: - # This corresponds to 8:00 AM EDT (1:00 AM UTC) from Monday to Friday - - cron: '0 13 * * MON-FRI' + # This corresponds to 8:45 AM EST (1:45 PM UTC) from Monday to Friday + - cron: '45 13 * * MON-FRI' workflow_dispatch: inputs: testBrowser: @@ -33,25 +33,24 @@ jobs: Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" - name: Determine report path id: reportpath - run: echo "path=html-charms-rasopathy-regression-reports" >> $GITHUB_ENV + run: echo "path=CHARMS-rasopathy-regression-reports" >> $GITHUB_ENV - name: Upload Cucumber Report uses: actions/upload-artifact@v4 if: always() with: name: CHARMS-RAS-REGRESSION-${{ env.timestamp }} - path: target/html-charms-rasopathy-regression-reports/* + path: target/CHARMS-rasopathy-regression-reports/* - name: Upload to SharePoint - shell: bash + shell: powershell run: | - export PATH="/c/Users/juarezds/AppData/Local/Programs/Python/Python312:$PATH" - python .github/scripts/upload_to_sharepoint.py - env: - file_path: target/html-charms-rasopathy-regression-reports/* - host_name: 'nih.sharepoint.com' - site_name: NCI-CBIITQualityAssuranceandTestingTeam - upload_path: 'Shared%20Documents/Platform%20Scientific%20-%20CHARMS/TEST%20AUTOMATION%20REPORTS' + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/CHARMS-rasopathy-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} - client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/GRANTS - Change Password Regression.yml b/.github/workflows/GRANTS - Change Password Regression.yml index 2aaa8e91a..81d85e7b8 100644 --- a/.github/workflows/GRANTS - Change Password Regression.yml +++ b/.github/workflows/GRANTS - Change Password Regression.yml @@ -2,8 +2,8 @@ name: GRANTS - Change Password Regression on: schedule: - # This corresponds to 9:00 AM EST (2:00 PM UTC) from Monday to Friday - - cron: '0 14 * * MON-FRI' + # This corresponds to 1:00 PM EST (6:00 PM UTC) from Monday to Friday + - cron: '0 18 * * MON-FRI' workflow_dispatch: inputs: testBrowser: @@ -41,3 +41,16 @@ jobs: with: name: CHANGE-PASSWORD-REGRESSION-${{ env.timestamp }} path: target/change-password-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/change-password-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/GRANTS - EM Regression.yml b/.github/workflows/GRANTS - EM Regression.yml index a0212dc68..2778cf118 100644 --- a/.github/workflows/GRANTS - EM Regression.yml +++ b/.github/workflows/GRANTS - EM Regression.yml @@ -2,8 +2,9 @@ name: GRANTS - EM Regression on: schedule: - # This corresponds to 9:30 AM EST (2:30 PM UTC) from Monday to Friday - - cron: '30 14 * * MON-FRI' + # This corresponds to 1:15 PM EST (6:15 PM UTC) from Monday to Friday + - cron: '15 18 * * MON-FRI' + workflow_dispatch: inputs: testBrowser: @@ -41,3 +42,16 @@ jobs: with: name: EM-REGRESSION-${{ env.timestamp }} path: target/EM-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/EM-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/GRANTS - GPMATS Regression.yml b/.github/workflows/GRANTS - GPMATS Regression.yml index 458b37b4f..f0f6b640f 100644 --- a/.github/workflows/GRANTS - GPMATS Regression.yml +++ b/.github/workflows/GRANTS - GPMATS Regression.yml @@ -2,8 +2,8 @@ name: GRANTS - GPMATS Regression on: schedule: - # This corresponds to 9:15 AM EST (2:15 PM UTC) from Monday to Friday - - cron: '15 14 * * MON-FRI' + # This corresponds to 1:30 PM EST (6:30 PM UTC) from Monday to Friday + - cron: '30 18 * * MON-FRI' workflow_dispatch: inputs: testBrowser: @@ -41,3 +41,16 @@ jobs: with: name: GPMATS-REGRESSION-${{ env.timestamp }} path: target/GPMATS-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/GPMATS-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/ITSM-ESR-Regression.yml b/.github/workflows/ITSM - ESR Regression.yml similarity index 66% rename from .github/workflows/ITSM-ESR-Regression.yml rename to .github/workflows/ITSM - ESR Regression.yml index 186f07d0c..7506814d3 100644 --- a/.github/workflows/ITSM-ESR-Regression.yml +++ b/.github/workflows/ITSM - ESR Regression.yml @@ -1,4 +1,4 @@ -name: ITSM-ESR-Regression +name: ITSM - ESR Regression on: schedule: @@ -41,3 +41,16 @@ jobs: with: name: ESR-REGRESSION-${{ env.timestamp }} path: target/ESR-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/ESR-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/NERD-Progression.yml b/.github/workflows/NERD-Progression.yml deleted file mode 100644 index 3885ddcef..000000000 --- a/.github/workflows/NERD-Progression.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: PLATFORM BUSINESS - NERD PROGRESSION TESTS - -on: - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: ubuntu-latest - env: - DISPLAY: ".99" - SCREEN_RESOLUTION: "1280x1024x24" - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Install Google Chrome - run: | - sudo apt-get install -y wget - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get install -y ./google-chrome-stable_current_amd64.deb - - name: Replace variables in cloudEnv.properties - run: | - sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/SIDE_DOOR_PASSWORD/${{ secrets.SIDEDOORPASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/BROWSER_VAR/${{ github.event.inputs.testBrowser }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/ENV_VAR/test/g" src/main/resources/conf/cloudEnv.properties - - name: Run specific runner class - run: mvn -B -q -Dtest=Run_NERD_Progression_Test -DisCloud=true test - continue-on-error: true - - name: Generate timestamp - id: timestamp - run: echo "::set-output name=timestamp::$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" - - name: Determine report path - id: reportpath - run: echo "::set-output name=path::nerd-progression-reports" - - name: Upload Cucumber Report - uses: actions/upload-artifact@v3 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/nerd-progression-reports/* - - name: Remove Google Chrome installation file - run: rm google-chrome-stable_current_amd64.deb - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git rm -f src/main/resources/conf/cloudEnv.properties - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/nerd-progression-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - sed -i '1s/.*/

NERD Progression Test Results<\/h1>/' nerd-progression-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> nerd-progression-test-results.html - git add nerd-progression-test-results.html - git commit -m "Update nerd-progression-test-results.html" - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/NERD-Regression.yml b/.github/workflows/NERD-Regression.yml deleted file mode 100644 index 33817cf0a..000000000 --- a/.github/workflows/NERD-Regression.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: PLATFORM BUSINESS - NERD REGRESSION TESTS - -on: - schedule: - # This corresponds to 8:30 AM EST (1:30 PM UTC) from Monday to Friday - - cron: '30 13 * * MON-FRI' - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: NCI-WINDOWS - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - - name: Run specific runner class - run: mvn -B -q -Dtest=Run_NERD_Regression_Test test - continue-on-error: true - - - name: Generate timestamp - id: timestamp - run: echo "timestamp=$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" >> $GITHUB_ENV - - - name: Determine report path - id: reportpath - run: echo "path=nerd-regression-reports" >> $GITHUB_ENV - - - name: Upload Cucumber Report - uses: actions/upload-artifact@v4 - if: always() - with: - name: cucumber-report-${{ env.timestamp }} - path: target/nerd-regression-reports/* - - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "juarezds@nih.gov" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git checkout stash -- . - mkdir -p ${{ env.path }} - mv target/nerd-regression-reports/*.html ${{ env.path }}/report-${{ env.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ env.timestamp }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - if [[ -f "nerd-regression-test-results.html" ]]; then - sed -i '1s/.*/

NERD Regression Test Results<\/h1>/' nerd-regression-test-results.html - echo "

Test Report ${{ env.path }}/report-${{ env.timestamp }}.html

" >> nerd-regression-test-results.html - git add nerd-regression-test-results.html - git commit -m "Update nerd-regression-test-results.html" - else - echo "

NERD Regression Test Results

" > nerd-regression-test-results.html - echo "

Test Report ${{ env.path }}/report-${{ env.timestamp }}.html

" >> nerd-regression-test-results.html - git add nerd-regression-test-results.html - git commit -m "Create and update nerd-regression-test-results.html" - fi - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/NERD-Smoke.yml b/.github/workflows/NERD-Smoke.yml deleted file mode 100644 index e8e9c9d49..000000000 --- a/.github/workflows/NERD-Smoke.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: PLATFORM BUSINESS - NERD SMOKE TESTS - -on: - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' -jobs: - build: - runs-on: NCI-WINDOWS - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - - name: Run specific runner class - shell: cmd - run: mvn -B -q -Dtest=Run_NERD_Smoke_Test test - continue-on-error: true - - - name: Generate timestamp - id: timestamp - shell: cmd - run: echo "::set-output name=timestamp::%date:~-4,4%-%date:~-10,2%-%date:~-7,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%" - - - name: Determine report path - id: reportpath - shell: cmd - run: echo "::set-output name=path::nerd-smoke-reports" - - - name: Upload Cucumber Report - uses: actions/upload-artifact@v4 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/nerd-smoke-reports/* - - - name: Push HTML Report - shell: bash - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/nerd-smoke-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - - name: Update Test Results and Append to Index File - shell: bash - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - if [[ -f "nerd-smoke-test-results.html" ]]; then - sed -i 's/

.*<\/h1>/

NERD Smoke Test Results<\/h1>/' nerd-smoke-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> nerd-smoke-test-results.html - git add nerd-smoke-test-results.html - git commit -m "Update nerd-smoke-test-results.html" - else - echo "

NERD Smoke Test Results

" > nerd-smoke-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> nerd-smoke-test-results.html - git add nerd-smoke-test-results.html - git commit -m "Create and update nerd-smoke-test-results.html" - fi - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/OBF-Smoke.yml b/.github/workflows/OBF-Smoke.yml deleted file mode 100644 index e77c017e9..000000000 --- a/.github/workflows/OBF-Smoke.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: PLATFORM BUSINESS - OBF SMOKE TESTS - -on: - schedule: - # This corresponds to 9:00 AM EST (2:00 PM UTC) from Monday to Friday - - cron: '0 14 * * MON-FRI' - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: NCI-WINDOWS - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - - name: Run specific runner class - run: mvn -B -q -Dtest=Run_OBF_Smoke_Test -DisCloud=true test - continue-on-error: true - - - name: Generate timestamp - id: timestamp - run: echo "timestamp=$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" >> $GITHUB_ENV - - - name: Determine report path - id: reportpath - run: echo "path=obf-smoke-reports" >> $GITHUB_ENV - - - name: Upload Cucumber Report - uses: actions/upload-artifact@v4 - if: always() - with: - name: cucumber-report-${{ env.timestamp }} - path: target/obf-smoke-reports/* - - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git checkout stash -- . - mkdir -p ${{ env.path }} - mv target/obf-smoke-reports/*.html ${{ env.path }}/report-${{ env.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ env.timestamp }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - if [ ! -f obf-smoke-test-results.html ]; then - echo '

OBF Smoke Test Results

' > obf-smoke-test-results.html - fi - echo "

Test Report ${{ env.path }}/report-${{ env.timestamp }}.html

" >> obf-smoke-test-results.html - git add obf-smoke-test-results.html - git commit -m "Update obf-smoke-test-results.html" - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - CCR Electronic Approval Regression.yml b/.github/workflows/PLATFORM BUSINESS - CCR Electronic Approval Regression.yml new file mode 100644 index 000000000..723708757 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - CCR Electronic Approval Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - CCR Electronic Approval Regression + +on: + schedule: + # This corresponds to 2:00 PM EST (7:00 PM UTC) from Monday to Friday + - cron: '0 19 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.CCR_ELECTRONIC_APPROVAL.Runners.Run_CCREAPPROV_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=CCR-Electronic-Approval-Regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: CCR-REGRESSION-${{ env.timestamp }} + path: target/CCR-Electronic-Approval-Regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/CCR-Electronic-Approval-Regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - CCT CHAT BOT Regression.yml b/.github/workflows/PLATFORM BUSINESS - CCT CHAT BOT Regression.yml new file mode 100644 index 000000000..f84269564 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - CCT CHAT BOT Regression.yml @@ -0,0 +1,56 @@ +name: CCT CHAT BOT Regression + +on: + schedule: + # This corresponds to 9:45 AM EST (2:45 PM UTC) from Monday to Friday + - cron: '45 14 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.CCT_CHAT_BOT.Playwright.Runners.Run_CCT_CHAT_PW_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=cct-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: CCT-CHAT-REGRESSION-${{ env.timestamp }} + path: target/cct-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/cct-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - CTRP Regression.yml b/.github/workflows/PLATFORM BUSINESS - CTRP Regression.yml new file mode 100644 index 000000000..5c4d66052 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - CTRP Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - CTRP Regression + +on: + schedule: + # This corresponds to 2:45 PM EST (7:45 PM UTC) from Monday to Friday + - cron: '45 19 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.CTRP_CTRO.Selenium.Selenium_Runners.Run_CTRP_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=ctrp-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: CTRP-REGRESSION-${{ env.timestamp }} + path: target/ctrp-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/ctrp-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - ETracking Regression.yml b/.github/workflows/PLATFORM BUSINESS - ETracking Regression.yml new file mode 100644 index 000000000..d32ae14cb --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - ETracking Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - ETracking Regression + +on: + schedule: + # This corresponds to 3:30 PM EST (8:30 PM UTC) from Monday to Friday + - cron: '30 20 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.ETracking.ETracking_Runners.RunETrackingRegressionTest" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=etrack-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: ETRACK-REGRESSION-${{ env.timestamp }} + path: target/etrack-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/etrack-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - GCP Regression.yml b/.github/workflows/PLATFORM BUSINESS - GCP Regression.yml new file mode 100644 index 000000000..7b846b1d6 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - GCP Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - GCP Regression + +on: + schedule: + # This corresponds to 2:30 PM EST (7:30 PM UTC) from Monday to Friday + - cron: '30 19 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.GCP.GCP_Runners.RunGCPRegressionTest" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=gcp-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: GCP-REGRESSION-${{ env.timestamp }} + path: target/gcp-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/gcp-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - GDC Regression.yml b/.github/workflows/PLATFORM BUSINESS - GDC Regression.yml new file mode 100644 index 000000000..88013b904 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - GDC Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - GDC Regression + +on: + schedule: + # This corresponds to 1:45 PM EST (6:45 PM UTC) from Monday to Friday + - cron: '45 18 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.GDC.GDC_Runners.RunGDCRegressionTest" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=gdc-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: GDC-REGRESSION-${{ env.timestamp }} + path: target/gdc-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/gdc-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - NERD Regression.yml b/.github/workflows/PLATFORM BUSINESS - NERD Regression.yml new file mode 100644 index 000000000..be75c7bd0 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - NERD Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - NERD Regression + +on: + schedule: + # This corresponds to 4:00 PM EST (9:00 PM UTC) from Monday to Friday + - cron: '0 21 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.NERD.NERD_Runners.Run_NERD_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=nerd-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: NERD-REGRESSION-${{ env.timestamp }} + path: target/nerd-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/nerd-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - OBF Regression.yml b/.github/workflows/PLATFORM BUSINESS - OBF Regression.yml new file mode 100644 index 000000000..f60847562 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - OBF Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - OBF Regression + +on: + schedule: + # This corresponds to 7:45 AM EST (12:45 PM UTC) from Monday to Friday + - cron: '45 12 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.SNOWOBF.Runners.Run_OBF_PW_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=OBF-Regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: OBF-REGRESSION-${{ env.timestamp }} + path: target/OBF-Regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/OBF-Regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - OFFBOARD Regression.yml b/.github/workflows/PLATFORM BUSINESS - OFFBOARD Regression.yml new file mode 100644 index 000000000..8b845f9e1 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - OFFBOARD Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - OFFBOARD Regression + +on: + schedule: + # This corresponds to 3:45 PM EST (8:45 PM UTC) from Monday to Friday + - cron: '45 20 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.OFFBOARD.Runners.Run_OffBoard_PW_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=offboard-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: OFFBOARD-REGRESSION-${{ env.timestamp }} + path: target/offboard-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/offboard-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - SEER Regression.yml b/.github/workflows/PLATFORM BUSINESS - SEER Regression.yml new file mode 100644 index 000000000..dcf8c48ec --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - SEER Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - SEER Regression + +on: + schedule: + # This corresponds to 8:00 AM EST (1:00 PM UTC) from Monday to Friday + - cron: '0 13 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.SEER.SEER_Runners.Run_SEER_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=SEER-Regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: SEER-REGRESSION-${{ env.timestamp }} + path: target/SEER-Regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/SEER-Regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - SSJ - Regression.yml b/.github/workflows/PLATFORM BUSINESS - SSJ - Regression.yml new file mode 100644 index 000000000..c51e38fb9 --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - SSJ - Regression.yml @@ -0,0 +1,37 @@ +name: PLATFORM BUSINESS - SSJ REGRESSION TESTS + +on: + workflow_dispatch: + schedule: + - cron: '15 12 * * MON-FRI' # 7:15 AM EST (12:15 PM UTC) Monday to Friday + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + shell: cmd + run: mvn -B -q -Dtest=SSJ_Regression_Runners test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + shell: cmd + run: echo "::set-output name=timestamp::%date:~-4,4%-%date:~-10,2%-%date:~-7,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%" + + - name: Determine report path + id: reportpath + shell: cmd + run: echo "::set-output name=path::ssj-regression-reports" + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v3 + if: always() + with: + name: cucumber-report-${{ github.run_number }}-${{ steps.timestamp.outputs.timestamp }} + path: target/ssj-regression-reports/* \ No newline at end of file diff --git a/.github/workflows/PLATFORM BUSINESS - Travel Request Regression.yml b/.github/workflows/PLATFORM BUSINESS - Travel Request Regression.yml new file mode 100644 index 000000000..2ce74bd2f --- /dev/null +++ b/.github/workflows/PLATFORM BUSINESS - Travel Request Regression.yml @@ -0,0 +1,56 @@ +name: PLATFORM BUSINESS - TRAVEL Regression + +on: + schedule: + # This corresponds to 3:00 PM EST (8:00 PM UTC) from Monday to Friday + - cron: '0 20 * * MON-FRI' + workflow_dispatch: + inputs: + testBrowser: + description: 'Browser' + required: true + default: 'chrome' + +jobs: + build: + runs-on: NCI-WINDOWS + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Run specific runner class + run: mvn -B -q -Dtest="ServiceNow.PlatformBusinessApps.SNOW_TRAVEL.Travel_Runners.Run_TRAVEL_PW_Regression_Test" test + continue-on-error: true + + - name: Generate timestamp + id: timestamp + run: | + $timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time") + $dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone) + $timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt") + Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp" + - name: Determine report path + id: reportpath + run: echo "path=travel-regression-reports" >> $GITHUB_ENV + + - name: Upload Cucumber Report + uses: actions/upload-artifact@v4 + if: always() + with: + name: TRAVEL-REGRESSION-${{ env.timestamp }} + path: target/travel-regression-reports/* + + - name: Upload to SharePoint + shell: powershell + run: | + $Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" + python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py + env: + FILES_PATH: target/travel-regression-reports/* + SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} + SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} + tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} + client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} + client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} \ No newline at end of file diff --git a/.github/workflows/SEER-Smoke.yml b/.github/workflows/SEER-Smoke.yml deleted file mode 100644 index 0f9d30bb2..000000000 --- a/.github/workflows/SEER-Smoke.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: PLATFORM BUSINESS - SEER SMOKE TESTS - -on: - schedule: - # This corresponds to 9:30 AM EST (2:30 PM UTC) from Monday to Friday - - cron: '30 14 * * MON-FRI' - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: ubuntu-latest - env: - DISPLAY: ".99" - SCREEN_RESOLUTION: "1280x1024x24" - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Install Google Chrome - run: | - sudo apt-get install -y wget - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get install -y ./google-chrome-stable_current_amd64.deb - - name: Replace variables in cloudEnv.properties - run: | - sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/SIDE_DOOR_PASSWORD/${{ secrets.SIDEDOORPASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - if [ "${{ github.event_name }}" = "schedule" ]; then - sed -i "s/BROWSER_VAR/chrome/g" src/main/resources/conf/cloudEnv.properties - else - sed -i "s/BROWSER_VAR/${{ github.event.inputs.testBrowser }}/g" src/main/resources/conf/cloudEnv.properties - fi - sed -i "s/ENV_VAR/test/g" src/main/resources/conf/cloudEnv.properties - - name: Run specific runner class - run: mvn -B -q -Dtest=Run_SEER_Smoke_Test -DisCloud=true test - continue-on-error: true - - name: Generate timestamp - id: timestamp - run: echo "::set-output name=timestamp::$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" - - name: Determine report path - id: reportpath - run: echo "::set-output name=path::seer-smoke-reports" - - name: Upload Cucumber Report - uses: actions/upload-artifact@v3 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/seer-smoke-reports/* - - name: Remove Google Chrome installation file - run: rm google-chrome-stable_current_amd64.deb - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git rm -f src/main/resources/conf/cloudEnv.properties - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/seer-smoke-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - if [ ! -f seer-smoke-test-results.html ]; then - echo '

SEER Smoke Test Results

' > seer-smoke-test-results.html - fi - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> seer-smoke-test-results.html - git add seer-smoke-test-results.html - git commit -m "Update seer-smoke-test-results.html" - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/SSJ-Progression.yml b/.github/workflows/SSJ-Progression.yml deleted file mode 100644 index dc71e6145..000000000 --- a/.github/workflows/SSJ-Progression.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: PLATFORM BUSINESS - SSJ PROGRESSION TESTS - -on: - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: ubuntu-latest - env: - DISPLAY: ".99" - SCREEN_RESOLUTION: "1280x1024x24" - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Install Google Chrome - run: | - sudo apt-get install -y wget - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get install -y ./google-chrome-stable_current_amd64.deb - - name: Replace variables in cloudEnv.properties - run: | - sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/SIDE_DOOR_PASSWORD/${{ secrets.SIDEDOORPASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/BROWSER_VAR/${{ github.event.inputs.testBrowser }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/ENV_VAR/test/g" src/main/resources/conf/cloudEnv.properties - - name: Run specific runner class - run: mvn -B -q -Dtest=SSJ_Progression_Runners -DisCloud=true test - continue-on-error: true - - name: Generate timestamp - id: timestamp - run: echo "::set-output name=timestamp::$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" - - name: Determine report path - id: reportpath - run: echo "::set-output name=path::ssj-progression-reports" - - name: Upload Cucumber Report - uses: actions/upload-artifact@v3 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/ssj-progression-reports/* - - name: Remove Google Chrome installation file - run: rm google-chrome-stable_current_amd64.deb - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git rm -f src/main/resources/conf/cloudEnv.properties - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/ssj-progression-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - sed -i '1s/.*/

SSJ Progression Test Results<\/h1>/' ssj-progression-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> ssj-progression-test-results.html - git add ssj-progression-test-results.html - git commit -m "Update ssj-progression-test-results.html" - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/SSJ-Regression.yml b/.github/workflows/SSJ-Regression.yml deleted file mode 100644 index ed035e3a2..000000000 --- a/.github/workflows/SSJ-Regression.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: PLATFORM BUSINESS - SSJ REGRESSION TESTS - -on: - workflow_dispatch: - -jobs: - build: - runs-on: NCI-WINDOWS - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - - name: Run specific runner class - shell: cmd - run: mvn -B -q -Dtest=SSJ_Regression_Runners test - continue-on-error: true - - - name: Generate timestamp - id: timestamp - shell: cmd - run: echo "::set-output name=timestamp::%date:~-4,4%-%date:~-10,2%-%date:~-7,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%" - - - name: Determine report path - id: reportpath - shell: cmd - run: echo "::set-output name=path::ssj-regression-reports" - - - name: Upload Cucumber Report - uses: actions/upload-artifact@v3 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/ssj-regression-reports/* - - - name: Push HTML Report - shell: bash - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "dsjnih@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git stash pop - mkdir -p ssj-regression-reports - mv target/ssj-regression-reports/*.html ssj-regression-reports/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - - name: Update Test Results and Append to Index File - shell: bash - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - if [[ -f "ssj-regression-test-results.html" ]]; then - sed -i 's/

.*<\/h1>/

SSJ Regression Test Results<\/h1>/' ssj-regression-test-results.html - echo "

Test Report ssj-regression-reports/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> ssj-regression-test-results.html - git add ssj-regression-test-results.html - git commit -m "Update ssj-regression-test-results.html" - else - echo "

SSJ Regression Test Results

" > ssj-regression-test-results.html - echo "

Test Report ssj-regression-reports/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> ssj-regression-test-results.html - git add ssj-regression-test-results.html - git commit -m "Create and update ssj-regression-test-results.html" - fi - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/SSJ-Smoke.yml b/.github/workflows/SSJ-Smoke.yml deleted file mode 100644 index 985217084..000000000 --- a/.github/workflows/SSJ-Smoke.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: PLATFORM BUSINESS - SSJ SMOKE TESTS - -on: - schedule: - # This corresponds to 10:00 AM EST (3:00 PM UTC) from Monday to Friday - - cron: '0 15 * * MON-FRI' - workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' - -jobs: - build: - runs-on: ubuntu-latest - env: - DISPLAY: ".99" - SCREEN_RESOLUTION: "1280x1024x24" - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Install Google Chrome - run: | - sudo apt-get install -y wget - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get install -y ./google-chrome-stable_current_amd64.deb - - name: Replace variables in cloudEnv.properties - run: | - sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/SIDE_DOOR_PASSWORD/${{ secrets.SIDEDOORPASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - if [ "${{ github.event_name }}" = "schedule" ]; then - sed -i "s/BROWSER_VAR/chrome/g" src/main/resources/conf/cloudEnv.properties - else - sed -i "s/BROWSER_VAR/${{ github.event.inputs.testBrowser }}/g" src/main/resources/conf/cloudEnv.properties - fi - sed -i "s/ENV_VAR/test/g" src/main/resources/conf/cloudEnv.properties - - name: Run specific runner class - run: mvn -B -q -Dtest=SSJ_Smoke_Runners -DisCloud=true test - continue-on-error: true - - name: Generate timestamp - id: timestamp - run: echo "::set-output name=timestamp::$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" - - name: Determine report path - id: reportpath - run: echo "::set-output name=path::ssj-smoke-reports" - - name: Upload Cucumber Report - uses: actions/upload-artifact@v3 - if: always() - with: - name: cucumber-report-${{ github.run_number }} - path: target/ssj-smoke-reports/* - - name: Remove Google Chrome installation file - run: rm google-chrome-stable_current_amd64.deb - - name: Push HTML Report - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.email "diegojuarezbusiness@gmail.com" - git config --global user.name "iamdez99" - git stash - git fetch - git checkout gh-pages - git rm -f src/main/resources/conf/cloudEnv.properties - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/ssj-smoke-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html - git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" - git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - - name: Update Test Results and Append to Index File - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - touch ssj-smoke-test-results.html - if [ -f "ssj-smoke-test-results.html" ]; then - sed -i '1s/.*/

SSJ Smoke Test Results<\/h1>/' ssj-smoke-test-results.html - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> ssj-smoke-test-results.html - git add ssj-smoke-test-results.html - git commit -m "Update ssj-smoke-test-results.html" - git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages - else - echo "ssj-smoke-test-results.html does not exist" - fi \ No newline at end of file diff --git a/src/test/java/AnalysisTools/CervicalCP/CervicalCPRunners/RunCervicalCPRegressionTest.java b/src/test/java/AnalysisTools/CervicalCP/CervicalCPRunners/RunCervicalCPRegressionTest.java index cec9889a1..85570d6b0 100644 --- a/src/test/java/AnalysisTools/CervicalCP/CervicalCPRunners/RunCervicalCPRegressionTest.java +++ b/src/test/java/AnalysisTools/CervicalCP/CervicalCPRunners/RunCervicalCPRegressionTest.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", "json:target/cucumber.json", +@CucumberOptions(plugin = {"html:target/CCP-reports/CCP-Regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}, features = {"src/test/java/AnalysisTools/CervicalCP/playwright/Features", "src/test/java/AnalysisTools/CervicalCP/selenium/Features"}, diff --git a/src/test/java/AnalysisTools/ICDGenie/ICDGenieRunners/RunICDGenieRegressionTest.java b/src/test/java/AnalysisTools/ICDGenie/ICDGenieRunners/RunICDGenieRegressionTest.java index 9b6fba398..2c0f7afe6 100644 --- a/src/test/java/AnalysisTools/ICDGenie/ICDGenieRunners/RunICDGenieRegressionTest.java +++ b/src/test/java/AnalysisTools/ICDGenie/ICDGenieRunners/RunICDGenieRegressionTest.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", "json:target/cucumber.json", +@CucumberOptions(plugin = {"html:target/ICDGenie-regression-reports/ICDGenie-regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}, features = {"src/test/java/AnalysisTools/ICDGenie/playwright/Features", "src/test/java/AnalysisTools/ICDGenie/selenium/Features"}, diff --git a/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java b/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java index 31037a67d..333d523ad 100644 --- a/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java +++ b/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin ={"html:target/html-reports/cucumber-default-report.html" +@CucumberOptions(plugin ={"html:target/NIFE-Regression-reports/NIFE-regression-report.html" , "json:target/cucumber.json" , "rerun:target/failed.txt" , "pretty"} diff --git a/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java b/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java index 5d4885292..c1298331a 100644 --- a/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java +++ b/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin ={"html:target/html-reports/cucumber-default-report.html" +@CucumberOptions(plugin ={"html:target/soccer-regression-reports/soccer-regression-report.html" , "json:target/cucumber.json" , "rerun:target/failed.txt" , "pretty"} diff --git a/src/test/java/GrantsApps/EM/playwright/Features/EMFlow.feature b/src/test/java/GrantsApps/EM/playwright/Features/EMFlow.feature index f9e4eafbb..3af181a00 100644 --- a/src/test/java/GrantsApps/EM/playwright/Features/EMFlow.feature +++ b/src/test/java/GrantsApps/EM/playwright/Features/EMFlow.feature @@ -63,4 +63,31 @@ Feature: EM Flow Then user can navigate to "National Cancer Institute" hyperlink and verifies hyperlink URL "https://www.cancer.gov/" Then user can navigate to "USA.gov" hyperlink and verify hyperlink URL "https://www.usa.gov/" Then user can confirm the application version number "v2.4.0" - Then user can verify NIH motto "NIH … Turning Discovery Into Health®" \ No newline at end of file + Then user can verify NIH motto "NIH … Turning Discovery Into Health®" + + @Regression @Jira943 @playwright + Scenario: UI Page Header + Given User is logged in as Primary ITwoE Coordinator - PW + Then first and last name "Diego Juarez" of logged in user are displayed + And user is on Manage I2E Users page + And verifies NIH IMPAC II hyperlink + And verifies Workbench hyperlink + And verifies IMPAC II hyperlink + And verifies that the Other Modules dropdown contains PD Assignment option + And verifies that the Help dropDown has the following options User Guide, Video Tutorials and Release Notes + And verifies that Contact contains Email Technical support and Email business policy questions + + @In-Progress @Jira966 @playwright + Scenario: Verify UI Elements- Deactivated Account scenario + Given User is logged in as Primary ITwoE Coordinator - PW + Then first and last name "Diego Juarez" of logged in user are displayed + And clicks on the Show Advanced Filters link + And selects Deactivated in ITwoE Account Status dropdown list + And clicks on the Search + And views the first record + And verifies that the page title is View Account + And verifies the account full name + And User can verify the respective wording of Full Name tooltip + #And verifies that the following fields are filled in for deactivated account user + And verifies that Account Status is displayed as Deactivated + diff --git a/src/test/java/GrantsApps/EM/playwright/Steps/EMFlowSteps.java b/src/test/java/GrantsApps/EM/playwright/Steps/EMFlowSteps.java index 95268a58b..678ad34b9 100644 --- a/src/test/java/GrantsApps/EM/playwright/Steps/EMFlowSteps.java +++ b/src/test/java/GrantsApps/EM/playwright/Steps/EMFlowSteps.java @@ -1,11 +1,17 @@ package GrantsApps.EM.playwright.Steps; import GrantsApps.EM.playwright.StepsImplementation.EM_Steps_Implementation; +import com.microsoft.playwright.Locator; import com.microsoft.playwright.Page; import com.microsoft.playwright.options.AriaRole; +import com.nci.automation.utils.CucumberLogUtils; +import com.nci.automation.web.CommonUtils; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; +import org.testng.Assert; + +import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; import static com.nci.automation.web.PlaywrightUtils.page; public class EMFlowSteps { @@ -130,11 +136,63 @@ public void user_clicks_on_business_area_drop_down() { page.getByRole(AriaRole.TEXTBOX, new Page.GetByRoleOptions().setName("All")).click(); } + @Then("user is on Manage I2E Users page") + public void user_is_on_manage_i2e_users_page() { + CucumberLogUtils.playwrightScreenshot(page); + Assert.assertEquals(page.url(), "https://i2e-test.nci.nih.gov/em/#/search"); + } + @Then("{string} option contains the description expected {string}") public void option_contains_the_description_expected(String optionHeader, String expectedOptionText) { EM_Steps_Implementation.option_contains_the_description_expected(optionHeader, expectedOptionText); } + @Then("verifies NIH IMPAC II hyperlink") + public void verifies_nih_impac_ii_hyperlink() { + String actualLink = page.locator("//a[@title='National Cancer Institute IMPAC II Extension Suite (I2E)']").getAttribute("href"); + CucumberLogUtils.playwrightScreenshot(page); + Assert.assertEquals(actualLink, "https://i2e.nci.nih.gov/"); + } + + @Then("verifies Workbench hyperlink") + public void verifies_workbench_hyperlink() { + String actualLink = page.locator("//a[normalize-space()='Workbench']").getAttribute("href"); + CucumberLogUtils.playwrightScreenshot(page); + Assert.assertEquals(actualLink, "https://i2e-test.nci.nih.gov/workbench/WorkbenchView"); + } + + @Then("verifies IMPAC II hyperlink") + public void verifies_impac_ii_hyperlink() { + String actualLink = page.locator("//a[@class='nav-link'][normalize-space()='IMPAC II']").getAttribute("href"); + CucumberLogUtils.playwrightScreenshot(page); + Assert.assertEquals(actualLink, "https://inside.era.nih.gov/index.htm"); + } + + @Then("verifies that the Other Modules dropdown contains PD Assignment option") + public void verifies_that_the_other_modules_dropdown_contains_pd_assignment_option() { + page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Other Modules")).click(); + CucumberLogUtils.playwrightScreenshot(page); + assertThat(page.getByLabel("Other Modules").getByRole(AriaRole.LINK)).containsText("PD Assignment"); + } + + @Then("verifies that the Help dropDown has the following options User Guide, Video Tutorials and Release Notes") + public void verifies_that_the_help_drop_down_has_the_following_options_user_guide_video_tutorials_and_release_notes() { + page.getByText("Help").click(); + CucumberLogUtils.playwrightScreenshot(page); + assertThat(page.getByLabel("Help")).containsText("User Guide"); + assertThat(page.getByLabel("Help")).containsText("Video Tutorials"); + assertThat(page.getByLabel("Help")).containsText("Release Notes"); + } + + @Then("verifies that Contact contains Email Technical support and Email business policy questions") + public void verifies_that_contact_contains_email_technical_support_and_email_business_policy_questions() { + page.getByText("Contact").click(); + CucumberLogUtils.playwrightScreenshot(page); + assertThat(page.getByLabel("Contact")).containsText("Email Technical Support"); + assertThat(page.getByLabel("Contact")).containsText("Email Business Policy Questions"); + } + + @When("user selects Administrative option") public void user_selects_administrative_option() { page.getByRole(AriaRole.OPTION, new Page.GetByRoleOptions().setName("Administrative Facilitates")).click(); @@ -184,4 +242,57 @@ public void user_can_confirm_the_application_version_number(String applicationVe public void user_can_verify_nih_motto(String nihMottoText) { EM_Steps_Implementation.user_can_verify_nih_motto(nihMottoText); } + + @Then("clicks on the Show Advanced Filters link") + public void clicks_on_the_show_advanced_filters_link() { + page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName(" Show Advanced Filters")).click(); + } + + @Then("selects Deactivated in ITwoE Account Status dropdown list") + public void selects_deactivated_in_i_two_e_account_status_dropdown_list() { + page.locator("app-i2e-account-status").getByRole(AriaRole.LIST).click(); + assertThat(page.getByRole(AriaRole.OPTION, new Page.GetByRoleOptions().setName("Deactivated"))).isVisible(); + page.getByRole(AriaRole.OPTION, new Page.GetByRoleOptions().setName("Deactivated")).click(); + } + + @Then("clicks on the Search") + public void clicks_on_the_search() { + page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Search")).click(); + } + + String name; + + @Then("views the first record") + public void views_the_first_record() { + page.waitForSelector("(//div[contains(@class,'ng-star-inserted')])[1]"); + name = page.locator("(//div[contains(@class,'ng-star-inserted')])[1]").innerText(); + CucumberLogUtils.playwrightScreenshot(page); + page.getByRole(AriaRole.ROW, new Page.GetByRoleOptions().setName(name)).getByRole(AriaRole.BUTTON).click(); + } + + @Then("verifies that the page title is View Account") + public void verifies_that_the_page_title_is_view_account() { + CucumberLogUtils.playwrightScreenshot(page); + assertThat(page.locator("h3")).containsText("View Account"); + } + + @Then("verifies the account full name") + public void verifies_the_account_full_name() { + CucumberLogUtils.playwrightScreenshot(page); + assertThat(page.locator("app-user-information")).containsText(name); + } + + @Then("User can verify the respective wording of Full Name tooltip") + public void user_can_verify_the_respective_wording_of_full_name_tooltip() { + page.locator("app-user-information").getByRole(AriaRole.LINK, new Locator.GetByRoleOptions().setName("")).click(); + CucumberLogUtils.playwrightScreenshot(page); + String actualText = page.getByText("Legal Name is always").innerText(); + Assert.assertEquals(actualText, "Legal Name is always displayed first, followed by Preferred Name."); + } + + @Then("verifies that Account Status is displayed as Deactivated") + public void verifies_that_account_status_is_displayed_as_deactivated() { + CucumberLogUtils.playwrightScreenshot(page); + assertThat(page.locator("app-i2e-account-information")).containsText("Account Status: Deactivated"); + } } \ No newline at end of file diff --git a/src/test/java/GrantsApps/EM/playwright/StepsImplementation/EM_Steps_Implementation.java b/src/test/java/GrantsApps/EM/playwright/StepsImplementation/EM_Steps_Implementation.java index 9037ba023..4e7673549 100644 --- a/src/test/java/GrantsApps/EM/playwright/StepsImplementation/EM_Steps_Implementation.java +++ b/src/test/java/GrantsApps/EM/playwright/StepsImplementation/EM_Steps_Implementation.java @@ -3,6 +3,7 @@ import GrantsApps.EM.playwright.Pages.EM_Page; import GrantsApps.EM.playwright.Pages.ITrust_Page; import appsCommon.Pages.Playwright_Common_Locators; +import appsCommon.Pages.Selenium_Common_Locators; import appsCommon.PlaywrightUtils.Playwright_Common_Utils; import com.microsoft.playwright.ElementHandle; import com.microsoft.playwright.Locator; @@ -398,7 +399,7 @@ public static void the_following_roles_should_display(String valueOne, String va public static void user_can_verify_business_area_dropdown_tool_tip_text(String toolTipText) { page.locator("label").filter(new Locator.FilterOptions().setHasText("Business Area")).locator("a").click(); CucumberLogUtils.playwrightScreenshot(page); - assertThat(page.locator("#ngb-tooltip-386")).containsText(toolTipText); + assertThat(page.locator("//div[@class='tooltip-inner']")).containsText(toolTipText); } /** diff --git a/src/test/java/GrantsApps/EM/selenium/Features/Managing User Accounts.feature b/src/test/java/GrantsApps/EM/selenium/Features/Managing User Accounts.feature index d65fff33b..b73a4c9b7 100644 --- a/src/test/java/GrantsApps/EM/selenium/Features/Managing User Accounts.feature +++ b/src/test/java/GrantsApps/EM/selenium/Features/Managing User Accounts.feature @@ -32,7 +32,8 @@ Feature: Managing User Accounts And can verify the success message is displayed "Success! I2E account has been created." And can verify that Return to Manage I2E Users hyperlink directs to url "https://i2e-test.nci.nih.gov/em/#/search" - @ACTIVE_ACCOUNT_SCENARIO @JIRA-965 @JUAREZDS @Regression @selenium + @ACTIVE_ACCOUNT_SCENARIO @JIRA-965 @JUAREZDS @Regression @selenium @needs_review + #REVIEW CREATE BUTTON, INACTIVE CANCER ACTIVITIES? Scenario: Verify Create Account - Active Account scenario Given User is logged in as Primary IC Coordinator And clicks Show Advanced Filters diff --git a/src/test/java/GrantsApps/EM/selenium/Utils/EM_Common_Methods.java b/src/test/java/GrantsApps/EM/selenium/Utils/EM_Common_Methods.java index 703b36536..3aa4a6f01 100644 --- a/src/test/java/GrantsApps/EM/selenium/Utils/EM_Common_Methods.java +++ b/src/test/java/GrantsApps/EM/selenium/Utils/EM_Common_Methods.java @@ -1,8 +1,11 @@ package GrantsApps.EM.selenium.Utils; import com.nci.automation.utils.CucumberLogUtils; -import com.nci.automation.web.WebDriverUtils; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; +import java.time.Duration; +import static com.nci.automation.web.WebDriverUtils.webDriver; public class EM_Common_Methods { @@ -12,14 +15,16 @@ public class EM_Common_Methods { * @param expectedURL the expected URL of the new window */ public static void switchWindowAndVerifyPageTitle(String expectedURL){ - String winHandleBefore = WebDriverUtils.webDriver.getWindowHandle(); - for (String winHandle : WebDriverUtils.webDriver.getWindowHandles()) { - WebDriverUtils.webDriver.switchTo().window(winHandle); + String winHandleBefore = webDriver.getWindowHandle(); + for (String winHandle : webDriver.getWindowHandles()) { + webDriver.switchTo().window(winHandle); } - String actualUrl = WebDriverUtils.webDriver.getCurrentUrl(); + WebDriverWait wait = new WebDriverWait(webDriver, Duration.ofSeconds(10)); + wait.until(ExpectedConditions.urlToBe(expectedURL)); + String actualUrl = webDriver.getCurrentUrl(); Assert.assertEquals(actualUrl, expectedURL); - WebDriverUtils.webDriver.close(); - WebDriverUtils.webDriver.switchTo().window(winHandleBefore); + webDriver.close(); + webDriver.switchTo().window(winHandleBefore); CucumberLogUtils.logScreenshot(); } } \ No newline at end of file diff --git a/src/test/java/GrantsApps/GrantsRunners/ChangePassword/RunChangePasswordRegressionTest.java b/src/test/java/GrantsApps/GrantsRunners/ChangePassword/RunChangePasswordRegressionTest.java index 0630ef072..68fe8264e 100644 --- a/src/test/java/GrantsApps/GrantsRunners/ChangePassword/RunChangePasswordRegressionTest.java +++ b/src/test/java/GrantsApps/GrantsRunners/ChangePassword/RunChangePasswordRegressionTest.java @@ -3,11 +3,11 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report", "json:target/cucumber.json", - "junit:target/cucumber.xml", "rerun:target/failed.txt", +@CucumberOptions(plugin = {"html:target/change-password-reports/change-password-regression-report.html", "json:target/cucumber.json", + "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}, features = "src/test/java/GrantsApps/ChangePassword/Features", - glue = "GrantsApps.ChangePassword.Steps", + glue = {"GrantsApps.ChangePassword.Steps", "Hooks"}, tags = "@Regression", dryRun = false ) diff --git a/src/test/java/GrantsApps/GrantsRunners/EnterpriseMaintenance/RunEMProgressionTest.java b/src/test/java/GrantsApps/GrantsRunners/EnterpriseMaintenance/RunEMProgressionTest.java index 18ac98fc2..30843a86f 100644 --- a/src/test/java/GrantsApps/GrantsRunners/EnterpriseMaintenance/RunEMProgressionTest.java +++ b/src/test/java/GrantsApps/GrantsRunners/EnterpriseMaintenance/RunEMProgressionTest.java @@ -9,7 +9,8 @@ , features = {"src/test/java/GrantsApps/EM/selenium/Features", "src/test/java/GrantsApps/EM/playwright/Features"} , glue = {"GrantsApps.EM.selenium.Steps", "GrantsApps.EM.playwright.Steps", "Hooks"} , tags = "@Progression" - , dryRun = false + , dryRun =false + ) public class RunEMProgressionTest extends AbstractTestNGCucumberTests { } \ No newline at end of file diff --git a/src/test/java/GrantsApps/GrantsRunners/EnterpriseMaintenance/RunEMRegressionTest.java b/src/test/java/GrantsApps/GrantsRunners/EnterpriseMaintenance/RunEMRegressionTest.java new file mode 100644 index 000000000..4748bbc61 --- /dev/null +++ b/src/test/java/GrantsApps/GrantsRunners/EnterpriseMaintenance/RunEMRegressionTest.java @@ -0,0 +1,15 @@ +package GrantsApps.GrantsRunners.EnterpriseMaintenance; + +import io.cucumber.testng.AbstractTestNGCucumberTests; +import io.cucumber.testng.CucumberOptions; + +@CucumberOptions(plugin = {"html:target/EM-reports/EM-Regression-report.html", "json:target/cucumber.json", + "rerun:target/failed.txt", + "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} + , features = {"src/test/java/GrantsApps/EM/selenium/Features", "src/test/java/GrantsApps/EM/playwright/Features"} + , glue = {"GrantsApps.EM.selenium.Steps", "GrantsApps.EM.playwright.Steps", "Hooks"} + , tags = "@Regression" + , dryRun = false +) +public class RunEMRegressionTest extends AbstractTestNGCucumberTests { +} \ No newline at end of file diff --git a/src/test/java/ServiceNow/CHARMS/Features/RasopathyStudy/RAS Entire Flow.feature b/src/test/java/ServiceNow/CHARMS/Features/RasopathyStudy/RAS Entire Flow.feature index a9c31b410..63fcd8358 100644 --- a/src/test/java/ServiceNow/CHARMS/Features/RasopathyStudy/RAS Entire Flow.feature +++ b/src/test/java/ServiceNow/CHARMS/Features/RasopathyStudy/RAS Entire Flow.feature @@ -1,29 +1,29 @@ Feature: RAS Screener Scenarios Description: This feature file contains scenarios which submit myRAS Screeners, Consent Flows, IIQ Forms and the RAS Surveys. No data verification in Native View - @JUAREZDS @RAS_STUDY @2CP2-2332 @Smoke @RAS_Regression @selenium + @JUAREZDS @RAS_STUDY @2CP2-2332 @Smoke @RAS_Regression @selenium @TestingActions Scenario Outline: This scenario outline is completing the myRAS Screeners, Consent Flows, IIQ Forms and the RAS Surveys Given test automation account has been reset Given a participant is on the RASopathies Longitudinal Cohort Study login page "myRASLoginPage" - And logs in via Okta with username "" and password "" - And clicks on "Eligibility Questionnaire" to begin survey - When the participant submits a screener from excel sheet "" +# And logs in via Okta with username "" and password "" +# And clicks on "Eligibility Questionnaire" to begin survey +# When the participant submits a screener from excel sheet "" # Then screener data from "" is verified - And the consent is submitted for "" - Then data submitted for scenario is verified in native from the excel sheet "" - Given a participant is on the RASopathies Longitudinal Cohort Study login page "myRASLoginPage" - And logs in via Okta with username "" and password "" - And clicks on the IIQ Form - And a participant enters username "" and pin - And the participant submits a Individual Information Questionnaire for excel sheet "" - Given a participant is on the RASopathies Longitudinal Cohort Study login page "myRASLoginPage" - And logs in via Okta with username "" and password "" - And clicks on the Ras Survey Form - And a participant enters username "" and pin - When the participant submits a RAS Survey from excel sheet "" +# And the consent is submitted for "" +# Then data submitted for scenario is verified in native from the excel sheet "" +# Given a participant is on the RASopathies Longitudinal Cohort Study login page "myRASLoginPage" +# And logs in via Okta with username "" and password "" +# And clicks on the IIQ Form +# And a participant enters username "" and pin +# And the participant submits a Individual Information Questionnaire for excel sheet "" +# Given a participant is on the RASopathies Longitudinal Cohort Study login page "myRASLoginPage" +# And logs in via Okta with username "" and password "" +# And clicks on the Ras Survey Form +# And a participant enters username "" and pin +# When the participant submits a RAS Survey from excel sheet "" Examples: | Email | Password | ScreenerScenario | IIQScenario | SurveyScenario | | charmsras1@yahoo.com | RASTest2022$$ | screenerScenario1 | IIQScenario1 | RASSurveyScenario1 | - | charmsras1@yahoo.com | RASTest2022$$ | screenerScenario2 | IIQScenario2 | RASSurveyScenario2 | +# | charmsras1@yahoo.com | RASTest2022$$ | screenerScenario2 | IIQScenario2 | RASSurveyScenario2 | # | charmsras3@yahoo.com | RASTest2023$$ | screenerScenario3 | IIQScenario3 | RASSurveyScenario3 | # | charmsras5@yahoo.com | RASTest2023$$ | screenerScenario4 | IIQScenario4 | RASSurveyScenario4 | \ No newline at end of file diff --git a/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_Fanconi_Regression_Test.java b/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_Fanconi_Regression_Test.java index 5d96401f0..0d8a30bbd 100644 --- a/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_Fanconi_Regression_Test.java +++ b/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_Fanconi_Regression_Test.java @@ -3,8 +3,8 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-charms-fanconi-regression-reports/fanconi-regression-report.html", "json:target/cucumber.json", - "rerun:target/failed.txt", +@CucumberOptions(plugin = {"html:target/fanconi-regression-reports/fanconi-regression-report.html", "json:target/cucumber.json", + "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}, features = "src/test/java/ServiceNow/CHARMS/Features/FanconiStudy", glue = {"ServiceNow.CHARMS.Steps", "Hooks"}, diff --git a/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_RAS_Regression_Test.java b/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_RAS_Regression_Test.java index ea4e4c2eb..3917701c1 100644 --- a/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_RAS_Regression_Test.java +++ b/src/test/java/ServiceNow/CHARMS/Runners/Run_CHARMS_RAS_Regression_Test.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-charms-rasopathy-regression-reports/rasopathy-regression-report.html", "json:target/cucumber.json", +@CucumberOptions(plugin = {"html:target/CHARMS-rasopathy-regression-reports/rasopathy-regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}, features = {"src/test/java/ServiceNow/CHARMS/Features/RASAccountReset", "src/test/java/ServiceNow/CHARMS/Features/RasopathyStudy"}, @@ -11,9 +11,5 @@ tags = "@RAS_Regression", dryRun = false ) -/** - * - * @author sohilz2 - */ public class Run_CHARMS_RAS_Regression_Test extends AbstractTestNGCucumberTests{ } \ No newline at end of file diff --git a/src/test/java/ServiceNow/ESR/Playwright/Runners/RunESRRegressionTest.java b/src/test/java/ServiceNow/ESR/Playwright/Runners/RunESRRegressionTest.java index 188dbad26..f264f8ca9 100644 --- a/src/test/java/ServiceNow/ESR/Playwright/Runners/RunESRRegressionTest.java +++ b/src/test/java/ServiceNow/ESR/Playwright/Runners/RunESRRegressionTest.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", +@CucumberOptions(plugin = {"html:target/ESR-reports/ESR-Regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} , features = "src/test/java/ServiceNow/ESR/Playwright/Features" diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/CCR_ELECTRONIC_APPROVAL/Runners/Run_CCREAPPROV_Regression_Test.java b/src/test/java/ServiceNow/PlatformBusinessApps/CCR_ELECTRONIC_APPROVAL/Runners/Run_CCREAPPROV_Regression_Test.java index 9a04ad99c..f2043d213 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/CCR_ELECTRONIC_APPROVAL/Runners/Run_CCREAPPROV_Regression_Test.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/CCR_ELECTRONIC_APPROVAL/Runners/Run_CCREAPPROV_Regression_Test.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", +@CucumberOptions(plugin = {"html:target/CCR-Electronic-Approval-Regression-reports/CCR-Electronic-Approval-Regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} , features = "src/test/java/ServiceNow/PlatformBusinessApps/CCR_ELECTRONIC_APPROVAL/Features" diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/GCP/GCP_Runners/RunGCPRegressionTest.java b/src/test/java/ServiceNow/PlatformBusinessApps/GCP/GCP_Runners/RunGCPRegressionTest.java index 66560b1ba..70d4cded5 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/GCP/GCP_Runners/RunGCPRegressionTest.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/GCP/GCP_Runners/RunGCPRegressionTest.java @@ -11,8 +11,5 @@ , tags="@Regression" , dryRun = false ) -/** -* @author sohilz2 -*/ public class RunGCPRegressionTest extends AbstractTestNGCucumberTests{ -} +} \ No newline at end of file diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SEER/SEER_Runners/Run_SEER_Regression_Test.java b/src/test/java/ServiceNow/PlatformBusinessApps/SEER/SEER_Runners/Run_SEER_Regression_Test.java index c95e949dc..783759490 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SEER/SEER_Runners/Run_SEER_Regression_Test.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SEER/SEER_Runners/Run_SEER_Regression_Test.java @@ -3,7 +3,7 @@ import io.cucumber.testng.CucumberOptions; import io.cucumber.testng.AbstractTestNGCucumberTests; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", +@CucumberOptions(plugin = {"html:target/SEER-Regression-reports/SEER-regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}, features = "src/test/java/ServiceNow/PlatformBusinessApps/SEER/Features", diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SNOWOBF/Runners/Run_OBF_PW_Regression_Test.java b/src/test/java/ServiceNow/PlatformBusinessApps/SNOWOBF/Runners/Run_OBF_PW_Regression_Test.java index 539da2b16..4b8bed917 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SNOWOBF/Runners/Run_OBF_PW_Regression_Test.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SNOWOBF/Runners/Run_OBF_PW_Regression_Test.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", +@CucumberOptions(plugin = {"html:target/OBF-Regression-reports/OBF-Regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} , features = "src/test/java/ServiceNow/PlatformBusinessApps/SNOWOBF/Features" diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SNOWPROJ/Runners/Run_OCPL_PW_Regression_Test.java b/src/test/java/ServiceNow/PlatformBusinessApps/SNOWPROJ/Runners/Run_OCPL_PW_Regression_Test.java index d71fd17c9..dfc324c28 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SNOWPROJ/Runners/Run_OCPL_PW_Regression_Test.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SNOWPROJ/Runners/Run_OCPL_PW_Regression_Test.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", +@CucumberOptions(plugin = {"html:target/OCPL-Regression-reports/cucumber-default-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} , features = "src/test/java/ServiceNow/PlatformBusinessApps/SNOWPROJ/Features" diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/Travel_Runners/Run_TRAVEL_PW_Regression_Test.java b/src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/Travel_Runners/Run_TRAVEL_PW_Regression_Test.java index b17907361..8a658b505 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/Travel_Runners/Run_TRAVEL_PW_Regression_Test.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/Travel_Runners/Run_TRAVEL_PW_Regression_Test.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin = {"html:target/html-reports/cucumber-default-report.html", +@CucumberOptions(plugin = {"html:target/Travel-Request-Regression-reports/Travel-Request-Regression-report.html", "json:target/cucumber.json", "rerun:target/failed.txt", "pretty", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"} , features = "src/test/java/ServiceNow/PlatformBusinessApps/SNOW_TRAVEL/playwright/Features" diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java index a983edb4c..62d259959 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java @@ -725,6 +725,5 @@ public static void verifies_vacancy_title_is_on_the_your_vacancies_page(String v itemPage.click(); } } - } } \ No newline at end of file diff --git a/src/test/java/appsCommon/Pages/Selenium_Common_Locators.java b/src/test/java/appsCommon/Pages/Selenium_Common_Locators.java index b27dc2678..4c3519757 100644 --- a/src/test/java/appsCommon/Pages/Selenium_Common_Locators.java +++ b/src/test/java/appsCommon/Pages/Selenium_Common_Locators.java @@ -14,4 +14,67 @@ public class Selenium_Common_Locators { public static WebElement locateByXpath(String xpath){ return webDriver.findElement(By.xpath(xpath)); } + + /** + * Locates an element in the web page using the provided CSS selector. + * + * @param cssSelector the CSS selector used to locate the element + */ + public static WebElement locateByCssSelector(String cssSelector) { + return webDriver.findElement(By.cssSelector(cssSelector)); + } + + /** + * Locates an element in the web page using the provided ID. + * + * @param id the ID used to locate the element + */ + public static WebElement locateById(String id) { + return webDriver.findElement(By.id(id)); + } + + /** + * Locates an element in the web page using the provided name. + * + * @param name the name used to locate the element + */ + public static WebElement locateByName(String name) { + return webDriver.findElement(By.name(name)); + } + + /** + * Locates an element in the web page using the provided link text. + * + * @param linkText the link text used to locate the element + */ + public static WebElement locateByLinkText(String linkText) { + return webDriver.findElement(By.linkText(linkText)); + } + + /** + * Locates an element in the web page using the provided partial link text. + * + * @param partialLinkText the partial link text used to locate the element + */ + public static WebElement locateByPartialLinkText(String partialLinkText) { + return webDriver.findElement(By.partialLinkText(partialLinkText)); + } + + /** + * Locates an element in the web page using the provided tag name. + * + * @param tagName the tag name used to locate the element + */ + public static WebElement locateByTagName(String tagName) { + return webDriver.findElement(By.tagName(tagName)); + } + + /** + * Locates an element in the web page using the provided class name. + * + * @param className the class name used to locate the element + */ + public static WebElement locateByClassName(String className) { + return webDriver.findElement(By.className(className)); + } } \ No newline at end of file