Skip to content

Commit 425b45d

Browse files
authored
Merge pull request #2077 from rtCamp/develop
Version Update v2.6.21 [ Master ]
2 parents 63f3d0e + a4eddd0 commit 425b45d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+21387
-162
lines changed

.github/ci/main.sh

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
######################################################
4+
######################## VARS ########################
5+
SITE_NAME='rtmedia.local'
6+
SITE_ROOT="/var/www/$SITE_NAME/htdocs"
7+
SITE_URL="http://$SITE_NAME/"
8+
function ee() { wo "$@"; }
9+
#####################################################
10+
# Start required services for site creation
11+
function start_services() {
12+
echo "Starting services"
13+
git config --global user.email "[email protected]"
14+
git config --global user.name "nobody"
15+
rm /etc/nginx/conf.d/stub_status.conf /etc/nginx/sites-available/22222 /etc/nginx/sites-enabled/22222
16+
rm -rf /var/www/22222
17+
ee stack start --nginx --mysql --php74
18+
ee stack status --nginx --mysql --php74
19+
}
20+
21+
# Create, setup and populate rtMedia Pro plugin with data
22+
function create_and_configure_site () {
23+
24+
ee site create $SITE_NAME --wp --php74
25+
cd $SITE_ROOT/wp-content/plugins/
26+
mkdir rtMedia
27+
rsync -azh $GITHUB_WORKSPACE/ $SITE_ROOT/wp-content/plugins/rtmedia
28+
echo "127.0.0.1 $SITE_NAME" >> /etc/hosts
29+
cd rtmedia
30+
ls
31+
wp plugin activate rtmedia --allow-root
32+
wp user create test [email protected] --role=administrator --user_pass=1234 --allow-root
33+
wp user create test1 [email protected] --role=administrator --user_pass=1234 --allow-root
34+
wp theme install twentytwentyone --allow-root
35+
wp theme activate twentytwentyone --allow-root
36+
wp plugin install buddypress --allow-root
37+
wp plugin activate buddypress --allow-root
38+
}
39+
40+
# Install WPe2e dependency
41+
function install_playwright_package () {
42+
43+
cd $GITHUB_WORKSPACE/tests/wp-e2e-playwright
44+
git clone --depth=1 https://github.com/rtCamp/rtmedia-test-data.git test-data
45+
npm install
46+
47+
}
48+
49+
function install_playwright(){
50+
cd $GITHUB_WORKSPACE/tests/wp-e2e-playwright
51+
npx playwright install
52+
}
53+
54+
# Run test for new deployed site
55+
function run_playwright_tests () {
56+
cd $GITHUB_WORKSPACE/tests/wp-e2e-playwright
57+
npm run test-e2e:playwright -- prerequisite.spec.js
58+
npm run test-e2e:playwright -- specs/buddypress
59+
npm run test-e2e:playwright -- specs/display
60+
npm run test-e2e:playwright -- specs/other_settings
61+
npm run test-e2e:playwright -- media_size.spec.js
62+
npm run test-e2e:playwright -- types.spec.js
63+
}
64+
65+
function maybe_install_node_dep() {
66+
if [[ -n "$NODE_VERSION" ]]; then
67+
echo "Setting up $NODE_VERSION"
68+
NVM_LATEST_VER=$(curl -s "https://api.github.com/repos/nvm-sh/nvm/releases/latest" |
69+
grep '"tag_name":' |
70+
sed -E 's/.*"([^"]+)".*/\1/') &&
71+
curl -fsSL "https://raw.githubusercontent.com/nvm-sh/nvm/$NVM_LATEST_VER/install.sh" | bash
72+
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
73+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
74+
nvm install "$NODE_VERSION"
75+
nvm use "$NODE_VERSION"
76+
77+
[[ -z "$NPM_VERSION" ]] && NPM_VERSION="latest" || echo ''
78+
export npm_install=$NPM_VERSION
79+
curl -fsSL https://www.npmjs.com/install.sh | bash
80+
fi
81+
}
82+
83+
function main() {
84+
start_services
85+
create_and_configure_site
86+
maybe_install_node_dep
87+
install_playwright_package
88+
install_playwright
89+
run_playwright_tests
90+
}
91+
92+
main

.github/workflows/playwright.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# e2e test for rtMedia pro plugin.
2+
3+
name: CI for rtMedia plugin
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on pull request events
8+
pull_request:
9+
branches:
10+
- wp-e2e-playwright
11+
- develop
12+
- master
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
jobs:
18+
Run-wpe2e-TestCase:
19+
# The type of runner that the job will run on
20+
name: Run rtMedia Features Test Cases
21+
runs-on: ubuntu-latest
22+
env:
23+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
working-directory: ./tests/wp-e2e-playwright
25+
26+
# Steps represent a sequence of tasks that will be executed as part of the job
27+
steps:
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- uses: actions/checkout@v3
30+
with:
31+
ref: ${{ github.event.pull_request.head.sha }}
32+
33+
# Check node version
34+
- name: Current directory and listings
35+
run: |
36+
pwd
37+
ls -al
38+
# Install config site
39+
- name: Install and config site
40+
uses: docker://rtcamp/base-wo:v1.0.0
41+
env:
42+
NODE_VERSION: 17
43+
RCLONE_CONFIG: ${{ secrets.RCLONE_CONFIG }}
44+
45+
- name: Archive HTML Report on failure
46+
if: failure()
47+
uses: actions/upload-artifact@v1
48+
with:
49+
name: report
50+
path: ./tests/wp-e2e-playwright/playwright-report
51+
52+
- name: Cleanup
53+
if: ${{ always() }}
54+
uses: rtCamp/action-cleanup@master

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ https://www.youtube.com/watch?v=dJrykKQGDcs
152152

153153
## Changelog ##
154154

155+
### 4.6.21 [Septemeber 23, 2024] ###
156+
157+
* Fixed
158+
159+
* Resolved the issue with the privacy message's close button not functioning.
160+
* Addressed the problem with JSON import not working.
161+
* Fixed errors encountered while editing document uploads.
162+
* Fixed issue related to videos automatically opened in full screen, hiding the activity feed in ios devices.
163+
155164
### 4.6.20 [August 02, 2024] ###
156165

157166
* Fixed

app/admin/RTMediaAdmin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ public function import_settings( $file_path ) {
14441444
wp_send_json( $response );
14451445
}
14461446

1447-
$settings_data = json_decode( $settings_data_json, true );
1447+
$settings_data = $settings_data_json;
14481448
if ( ! is_array( $settings_data ) || empty( $settings_data['rtm_key'] ) ) {
14491449
$response['rtm_response'] = 'error';
14501450
$response['rtm_response_msg'] = esc_html__( 'Invalid JSON Supplied!', 'buddypress-media' );

0 commit comments

Comments
 (0)