Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f80abca
Addressed Feedback
alvitazwar Dec 11, 2022
9874d9b
Fix: Addressed Feedback and added missing scenarios
alvitazwar Dec 19, 2022
a7fd4fc
Check GH action
alvitazwar Dec 19, 2022
855e456
Update main.sh
pooja-muchandikar Dec 20, 2022
b0b244a
Update main.sh
pooja-muchandikar Dec 20, 2022
bdadf7d
Update main.sh
pooja-muchandikar Dec 20, 2022
8c0788f
Update main.sh
pooja-muchandikar Dec 20, 2022
abad204
Addressed Feedback with new test case
alvitazwar Dec 20, 2022
fc4f454
Update main.sh
pavanpatil1 Dec 20, 2022
68cf1ca
Update main.sh
pavanpatil1 Dec 20, 2022
4e36ee8
Update main.sh
pavanpatil1 Dec 20, 2022
9d4f71b
Update main.sh
pavanpatil1 Dec 20, 2022
6e28104
Update main.sh
pavanpatil1 Dec 20, 2022
fb1c713
Test GH Action
alvitazwar Dec 20, 2022
0997cbd
update site name
Dec 20, 2022
752583e
Update main.sh
pavanpatil1 Dec 20, 2022
64779b4
Complete Feedback without GH
alvitazwar Dec 20, 2022
9ea9f3c
Test GH Action
alvitazwar Dec 21, 2022
99961bd
Test GH Action
alvitazwar Dec 21, 2022
4d1dab4
Test GH Action
alvitazwar Dec 21, 2022
5a97950
Test GH Action
alvitazwar Dec 21, 2022
95f6165
Test GH Action
alvitazwar Dec 21, 2022
1f38bdb
Test GH Action
alvitazwar Dec 21, 2022
6d29f88
Test GH Action
alvitazwar Dec 21, 2022
94e205e
Test GH Action
alvitazwar Dec 21, 2022
5d77403
Test GH Action
alvitazwar Dec 21, 2022
931f75f
Test GH Action
alvitazwar Dec 21, 2022
a65e831
Test GH Action
alvitazwar Dec 21, 2022
444329f
Test GH Action
alvitazwar Dec 21, 2022
acccf76
Test GH Action
alvitazwar Dec 21, 2022
eb71c5e
Check Direct URL action
alvitazwar Dec 21, 2022
21e03a1
Check Direct URL action
alvitazwar Dec 21, 2022
6fa45c4
Check Direct URL action
alvitazwar Dec 21, 2022
19f6dd5
Check Direct URL action
alvitazwar Dec 22, 2022
894a8b8
Check E2E Test cases
alvitazwar Dec 22, 2022
ef9ffad
Check Tesult Integration
alvitazwar Dec 22, 2022
76f68e2
Check Tesult Integration
alvitazwar Dec 22, 2022
bce0ffb
Check Tesult Test Cases
alvitazwar Dec 22, 2022
4dca143
Implement cleaning after test execution
alvitazwar Dec 22, 2022
0b7f43d
Implement cleaning after test execution
alvitazwar Dec 22, 2022
67b518a
Implement cleaning after test execution
alvitazwar Dec 22, 2022
eae0f17
Implement cleaning after test execution
alvitazwar Dec 22, 2022
4a21033
Implement cleaning after test execution
alvitazwar Dec 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# e2e test for transcoder

name: CI for Transcoder

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
# push:
# branches:
# - automation/playwright
# - action/directUrl
pull_request:
branches:
- automation/playwright
- action/directUrl
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
Run-wpe2e-TestCase:
# The type of runner that the job will run on
name: Run Transcoder Jobs
runs-on: ubuntu-latest
env:
SHA: ${{ github.event.pull_request.head.sha }}
COMMIT_SHA: ${{ github.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
working-directory: ./tests/e2e-playwright
TESRESULT_TOKEN: ${{ secrets.TESRESULT_TOKEN }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}


# Steps represent a sequence of tasks that will be executed as part of the job
steps:

- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 17
cache: "npm"
cache-dependency-path: tests/e2e-playwright/package-lock.json

- name: Install npm dependencies
run: npm install
working-directory: ${{env.working-directory}}

- name: Build Playwright utils dependencies
run: npm run build
working-directory: ${{env.working-directory}}

- name: Install browser
run: npx playwright install chromium
working-directory: ${{env.working-directory}}

- name: Run End to End tests
run: npm run test-e2e:playwright -- test
working-directory: ${{env.working-directory}}

- name: run PR status
if: ${{ always() }}
run: node ./tests/e2e-playwright/bin/pr-status.js
working-directory: ${{env.working_directory}}

- name: Make reports available
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: playwright-report
retention-days: 2
path: |
${{ github.workspace }}/playwright-report
2 changes: 1 addition & 1 deletion tests/e2e-playwright/artifacts/storage-states/admin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"cookies":[{"name":"wordpress_test_cookie","value":"WP%20Cookie%20check","domain":"alvi-tazwar.rt.gw","path":"/","expires":-1,"httpOnly":false,"secure":true,"sameSite":"Lax"},{"name":"wordpress_sec_191e09a7a9040b4b9e012813e9020ebe","value":"automation%7C1670599253%7CxsDvHbIRbZvNp0dchukSXY4BQqM5SV7R5HssyOKoVDn%7Cf176d4f6e0004583ceac1882e7c53a0c3d2797f205b6eaaa295010c73f3ec0ca","domain":"alvi-tazwar.rt.gw","path":"/wp-content/plugins","expires":-1,"httpOnly":true,"secure":true,"sameSite":"Lax"},{"name":"wordpress_sec_191e09a7a9040b4b9e012813e9020ebe","value":"automation%7C1670599253%7CxsDvHbIRbZvNp0dchukSXY4BQqM5SV7R5HssyOKoVDn%7Cf176d4f6e0004583ceac1882e7c53a0c3d2797f205b6eaaa295010c73f3ec0ca","domain":"alvi-tazwar.rt.gw","path":"/wp-admin","expires":-1,"httpOnly":true,"secure":true,"sameSite":"Lax"},{"name":"wordpress_logged_in_191e09a7a9040b4b9e012813e9020ebe","value":"automation%7C1670599253%7CxsDvHbIRbZvNp0dchukSXY4BQqM5SV7R5HssyOKoVDn%7C397e7a773ae12136b44bc578558097c04c26d85c04e8fd5fc73a5d7170e2776a","domain":"alvi-tazwar.rt.gw","path":"/","expires":-1,"httpOnly":true,"secure":true,"sameSite":"Lax"},{"name":"wp-settings-time-2","value":"1670426457","domain":"alvi-tazwar.rt.gw","path":"/","expires":1701962458.467,"httpOnly":false,"secure":true,"sameSite":"Lax"}],"nonce":"ac6291720e","rootURL":"https://alvi-tazwar.rt.gw/wp-json/"}
{"cookies":[{"name":"wordpress_test_cookie","value":"WP%20Cookie%20check","domain":"transcoder-test.rt.gw","path":"/","expires":-1,"httpOnly":false,"secure":true,"sameSite":"Lax"},{"name":"wordpress_sec_96f90609ac816b029eb88122fe5d3b9e","value":"automation%7C1671884843%7Cbc7ZN49lhuDs3uIlaLgFzJIPzjW8vYqmQVYyh2BtzTF%7Ce3c97628fff04353330e9f1728e6d0c7b8ef0f8f42bb87da895d100cc3e38531","domain":"transcoder-test.rt.gw","path":"/wp-content/plugins","expires":-1,"httpOnly":true,"secure":true,"sameSite":"Lax"},{"name":"wordpress_sec_96f90609ac816b029eb88122fe5d3b9e","value":"automation%7C1671884843%7Cbc7ZN49lhuDs3uIlaLgFzJIPzjW8vYqmQVYyh2BtzTF%7Ce3c97628fff04353330e9f1728e6d0c7b8ef0f8f42bb87da895d100cc3e38531","domain":"transcoder-test.rt.gw","path":"/wp-admin","expires":-1,"httpOnly":true,"secure":true,"sameSite":"Lax"},{"name":"wordpress_logged_in_96f90609ac816b029eb88122fe5d3b9e","value":"automation%7C1671884843%7Cbc7ZN49lhuDs3uIlaLgFzJIPzjW8vYqmQVYyh2BtzTF%7C05cc51cb43aeab2c266b9a25821cb1b6060d05937a22ee9265c6e9b3e4c8730f","domain":"transcoder-test.rt.gw","path":"/","expires":-1,"httpOnly":true,"secure":true,"sameSite":"Lax"},{"name":"wp-settings-time-2","value":"1671712044","domain":"transcoder-test.rt.gw","path":"/","expires":1703248044.494,"httpOnly":false,"secure":true,"sameSite":"Lax"}],"nonce":"9762542f44","rootURL":"https://transcoder-test.rt.gw/wp-json/"}
Binary file added tests/e2e-playwright/assets/3g2-sample.3g2
Binary file not shown.
21 changes: 21 additions & 0 deletions tests/e2e-playwright/bin/pr-status.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env node
// Octokit.js
// https://github.com/octokit/core.js#readme

const { Octokit } = require("@octokit/core");

const octokit = new Octokit({
auth: process.env.TOKEN,
});

octokit.request("POST /repos/{org}/{repo}/statuses/{sha}", {
org: "rtCamp",
repo: "transcoder",
sha: process.env.SHA ? process.env.SHA : process.env.COMMIT_SHA,
state: "success",
conclusion: "success",
target_url:
"https://www.tesults.com/results/rsp/view/status/project/0c8b70a6-8f6c-4b0d-9bfc-e410f6e83568",
description: "Successfully synced to Tesults",
context: "E2E Test Result",
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion tests/e2e-playwright/e2e-test-utils-playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"@wordpress/keycodes": "3.13.0",
"@wordpress/url": "3.14.0",
"form-data": "^4.0.0",
"lodash": "^4.17.21"
"lodash": "^4.17.21",
"@octokit/core": "^2.5.4",
"@octokit/plugin-paginate-rest": "^1.1.1",
"playwright-tesults-reporter": "^1.0.0"
},
"peerDependencies": {
"@playwright/test": ">=1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const WP_ADMIN_USER = {
const {
WP_USERNAME = WP_ADMIN_USER.username,
WP_PASSWORD = WP_ADMIN_USER.password,
WP_BASE_URL = 'https://alvi-tazwar.rt.gw/',
WP_BASE_URL = 'https://transcoder-test.rt.gw/', // http://transcoder.com
} = process.env;

export { WP_ADMIN_USER, WP_USERNAME, WP_PASSWORD, WP_BASE_URL };
Loading