Skip to content

Commit

Permalink
Merge branch 'develop' into version-update/v1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Utsav-Ladani authored Oct 19, 2023
2 parents bc1fc77 + e367e93 commit 964d5e5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# e2e test for transcoder

name: CI for Transcoder
name: End-to-End Tests

# Controls when the workflow will run
on:
Expand All @@ -20,7 +20,7 @@ on:
jobs:
Run-wpe2e-TestCase:
# The type of runner that the job will run on
name: Run Transcoder Jobs
name: Playwright Tests
runs-on: ubuntu-latest
env:
SHA: ${{ github.event.pull_request.head.sha }}
Expand Down
2 changes: 1 addition & 1 deletion admin/rt-transcoder-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function rtt_update_activity_after_thumb_set( $id ) {
$activity_text = bp_activity_get_meta( $activity_id, 'bp_activity_text' );
$obj_activity->activity_text = $activity_text;
global $wpdb;
$wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery
$wpdb->update( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery
$bp->activity->table_name,
array(
'type' => 'rtmedia_update',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
declare const WP_ADMIN_USER: {
readonly username: "automation";
readonly password: "automation";
readonly password: "@automation00520019";
};
declare const WP_USERNAME: string, WP_PASSWORD: string, WP_BASE_URL: string;
export { WP_ADMIN_USER, WP_USERNAME, WP_PASSWORD, WP_BASE_URL };
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const WP_ADMIN_USER = {
username: 'automation',
password: 'automation',
password: '@automation00520019',
} as const;

const {
Expand Down
18 changes: 11 additions & 7 deletions tests/e2e-playwright/specs/08_validate-transcoder-frontend.spec.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/**
* WordPress dependencies
*/
const { test, expect } = require('@wordpress/e2e-test-utils-playwright');
const SITE_URL = 'https://transcoder-test.rt.gw/activity'; //'http://transcoder.com/activity/';
const Media_URL = 'https://transcoder-test.rt.gw/members/automation/media/'
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' );
test.describe('Validate Transcoder In frontend', () => {
test.beforeEach(async ({ admin }) => {
await admin.visitAdminPage('/');

});
test('Check Transcoder settings In Activity', async ({ admin, page, editor }) => {
await page.goto(SITE_URL, { waitUntil: 'load' });
test('Check Transcoder settings In Activity', async ({ page }) => {
await page.hover("#wp-admin-bar-my-account");
const navigationPromise = page.waitForNavigation();
await page.locator("#wp-admin-bar-my-account-activity").click();
await navigationPromise;
await page.locator("#whats-new").click();
//Upload
const videoPath = "assets/3gp-sample.3gp";
Expand All @@ -36,8 +37,11 @@ test.describe('Validate Transcoder In frontend', () => {
});

test('Check Transcoder settings In Media Page', async ({ page }) => {
// Goto Media Page
await page.goto(Media_URL, { waitUntil: 'load' });
await page.hover("#wp-admin-bar-my-account");
await page.hover("#wp-admin-bar-my-account-media");
const navigationPromise = page.waitForNavigation();
await page.locator("#wp-admin-bar-my-account-media").click();
await navigationPromise;
// Wait for NavBar to stable the page.
await page.waitForSelector("#object-nav");
// Click Upload Button for opening up upload panel
Expand Down

0 comments on commit 964d5e5

Please sign in to comment.