rtMedia for WordPress, BuddyPress and bbPress - Version 4.1.3

Version Description

Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix audio/video time duration on media thumbnail.

=

Download this release

Release Info

Developer mangeshp
Plugin Icon 128x128 rtMedia for WordPress, BuddyPress and bbPress
Version 4.1.3
Comparing to
See all releases

Code changes from version 4.1.2 to 4.1.3

Files changed (63) hide show
  1. CONTRIBUTING.md +0 -19
  2. Gruntfile.js +0 -151
  3. app/main/controllers/template/rt-template-functions.php +2 -1
  4. bootstrap_tests.php +0 -28
  5. config.rb +0 -37
  6. index.php +1 -1
  7. log/index.php +0 -9
  8. package.json +0 -16
  9. phpunit.xml +0 -14
  10. phpunit.xml.dist +0 -8
  11. readme.txt +8 -5
  12. tests/MyPluginTest.php +0 -16
  13. tests/bootstrap.php +0 -20
  14. tests/functional/.travis.yml +0 -45
  15. tests/functional/README.md +0 -36
  16. tests/functional/custom-commands/goToActivity.js +0 -17
  17. tests/functional/custom-commands/goToGroups.js +0 -17
  18. tests/functional/custom-commands/goToMedia.js +0 -18
  19. tests/functional/custom-commands/goToProfile.js +0 -17
  20. tests/functional/custom-commands/openrtMediaSettings.js +0 -22
  21. tests/functional/custom-commands/wplogin.js +0 -17
  22. tests/functional/custom-commands/wplogout.js +0 -17
  23. tests/functional/nightwatch.json +0 -30
  24. tests/functional/package.json +0 -26
  25. tests/functional/res/constants.js +0 -99
  26. tests/functional/res/setup.js +0 -144
  27. tests/functional/src/buddypress/allow-upload-from-activity-stream-ngtest.js +0 -31
  28. tests/functional/src/buddypress/allow-upload-from-activity-stream-other-roles-test.js +0 -78
  29. tests/functional/src/buddypress/allow-upload-from-activity-stream-test.js +0 -37
  30. tests/functional/src/buddypress/enable-media-in-group-ngtest.js +0 -33
  31. tests/functional/src/buddypress/enable-media-in-group-other-roles-test.js +0 -108
  32. tests/functional/src/buddypress/enable-media-in-group-test.js +0 -46
  33. tests/functional/src/buddypress/enable-media-in-profile-ngtest.js +0 -35
  34. tests/functional/src/buddypress/enable-media-in-profile-other-roles-test.js +0 -98
  35. tests/functional/src/buddypress/enable-media-in-profile-test.js +0 -45
  36. tests/functional/src/buddypress/number-of-media-items-in-activity-stream-test.js +0 -45
  37. tests/functional/src/buddypress/organize-media-into-albums-ngtest.js +0 -34
  38. tests/functional/src/buddypress/organize-media-into-albums-other-roles-test.js +0 -91
  39. tests/functional/src/buddypress/organize-media-into-albums-test.js +0 -44
  40. tests/functional/src/customcss/custom-css-test.js +0 -56
  41. tests/functional/src/display/comment-on-uploaded-media-test.js +0 -40
  42. tests/functional/src/display/enable-loadmore-for-media-test.js +0 -55
  43. tests/functional/src/display/enable-pagination-for-media-test.js +0 -55
  44. tests/functional/src/display/light-box-test.js +0 -35
  45. tests/functional/src/mediasizes/music-activity-player-test.js +0 -37
  46. tests/functional/src/mediasizes/music-single-player-test.js +0 -52
  47. tests/functional/src/mediasizes/photo-height-width-large-test.js +0 -58
  48. tests/functional/src/mediasizes/photo-height-width-medium-test.js +0 -40
  49. tests/functional/src/mediasizes/photo-height-width-thumbnail-test.js +0 -44
  50. tests/functional/src/mediasizes/video-activity-player-test.js +0 -49
  51. tests/functional/src/mediasizes/video-single-player-test.js +0 -47
  52. tests/functional/src/mediatypes/music-test.js +0 -55
  53. tests/functional/src/mediatypes/photo-test.js +0 -53
  54. tests/functional/src/mediatypes/video-test.js +0 -56
  55. tests/functional/src/others/adminbar-menu-integration-ngtest.js +0 -32
  56. tests/functional/src/others/adminbar-menu-integration-test.js +0 -33
  57. tests/functional/src/others/footerlink-ngtest.js +0 -37
  58. tests/functional/src/others/footerlink-test.js +0 -37
  59. tests/functional/src/privacy/privacy-settings-for-public-test.js +0 -77
  60. tests/functional/src/privacy/privacy-settings-private-test.js +0 -56
  61. tests/functional/src/privacy/privacy-settings-registered-users-test.js +0 -60
  62. tests/rt-wp-test-case.php +0 -17
  63. tests/test_wordpress_plugin_tests.php +0 -52
CONTRIBUTING.md DELETED
@@ -1,19 +0,0 @@
1
- # Contribute to rtMedia
2
-
3
- This guide details how to use issues and pull requests to improve rtMedia.
4
-
5
- ## Closing policy for issues
6
-
7
- Github issue-tracker is used **only** for developer & contributor discussion.
8
-
9
- For support-request/feature-request, please use - http://community.rtcamp.com/c/rtmedia
10
-
11
- ## Translation
12
-
13
- Please do NOT send pull-request for translations.
14
-
15
- You can contribute translations using web-interface here - https://rtmedia.io/translate/projects/rtmedia
16
-
17
- ## Pull Requests
18
-
19
- Please include your wordpress.org username while sending pull-request so that we can add you to contributors list.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Gruntfile.js DELETED
@@ -1,151 +0,0 @@
1
- 'use strict';
2
- module.exports = function ( grunt ) {
3
-
4
- // load all grunt tasks matching the `grunt-*` pattern
5
- // Ref. https://npmjs.org/package/load-grunt-tasks
6
- require( 'load-grunt-tasks' )( grunt );
7
-
8
- grunt.initConfig( {
9
- // watch for changes and trigger sass, jshint, uglify and livereload
10
- watch: {
11
- sass: {
12
- files: [ 'app/assets/admin/css/sass/**/*.{scss,sass}', 'app/assets/css/sass/**/*.{scss,sass}' ],
13
- tasks: [ 'sass' ]
14
- },
15
- autoprefixer: {
16
- files: [ 'app/assets/admin/css/*.css', 'app/assets/css/*css' ],
17
- tasks: [ 'autoprefixer' ]
18
- },
19
- js: {
20
- files: [ '<%= uglify.frontend.src %>', '<%= uglify.backend.src %>' ],
21
- tasks: [ 'uglify' ]
22
- },
23
- livereload: {
24
- // Here we watch the files the sass task will compile to
25
- // These files are sent to the live reload server after sass compiles to them
26
- options: { livereload: true },
27
- files: [ '*.php', '*.css' ]
28
- }
29
- },
30
- // sass
31
- sass: {
32
- dist: {
33
- options: {
34
- style: 'expanded',
35
- sourcemap: 'none'
36
- },
37
- files: {
38
- 'app/assets/admin/css/admin.css': 'app/assets/admin/css/sass/admin.scss',
39
- 'app/assets/admin/css/widget.css': 'app/assets/admin/css/sass/widget.scss',
40
- 'app/assets/css/rtmedia.css': 'app/assets/css/sass/rtmedia.scss',
41
- }
42
- },
43
- minify: {
44
- options: {
45
- style: 'compressed',
46
- sourcemap: 'none'
47
- },
48
- files: {
49
- 'app/assets/admin/css/admin.min.css': 'app/assets/admin/css/sass/admin.scss',
50
- 'app/assets/admin/css/widget.min.css': 'app/assets/admin/css/sass/widget.scss',
51
- 'app/assets/css/rtmedia.min.css': 'app/assets/css/sass/rtmedia.scss'
52
- }
53
- }
54
- },
55
- // autoprefixer
56
- autoprefixer: {
57
- dist: {
58
- options: {
59
- browsers: [ 'last 2 versions', 'ie 9', 'ios 6', 'android 4' ],
60
- expand: true,
61
- flatten: true
62
- },
63
- files: {
64
- 'app/assets/admin/css/admin.css': 'app/assets/admin/css/admin.css',
65
- 'app/assets/admin/css/admin.min.css': 'app/assets/admin/css/admin.min.css',
66
- 'app/assets/admin/css/widget.css': 'app/assets/admin/css/widget.css',
67
- 'app/assets/admin/css/widget.min.css': 'app/assets/admin/css/widget.min.css',
68
- 'app/assets/css/rtmedia.css': 'app/assets/css/rtmedia.css',
69
- 'app/assets/css/rtmedia.min.css': 'app/assets/css/rtmedia.min.css'
70
- }
71
- }
72
- },
73
- // Uglify Ref. https://npmjs.org/package/grunt-contrib-uglify
74
- uglify: {
75
- options: {
76
- banner: '/*! \n * rtMedia JavaScript Library \n * @package rtMedia \n */\n',
77
- },
78
- frontend: {
79
- src: [
80
- 'app/assets/js/vendors/magnific-popup.js',
81
- 'app/assets/admin/js/vendors/tabs.js',
82
- 'app/assets/js/rtMedia.js'
83
- ],
84
- dest: 'app/assets/js/rtmedia.min.js'
85
- },
86
- backend: {
87
- src: [
88
- 'app/assets/admin/js/vendors/tabs.js',
89
- 'app/assets/admin/js/scripts.js',
90
- 'app/assets/admin/js/settings.js'
91
- ],
92
- dest: 'app/assets/admin/js/admin.min.js'
93
- }
94
- },
95
- checktextdomain: {
96
- options: {
97
- text_domain: 'buddypress-media', //Specify allowed domain(s)
98
- keywords: [ //List keyword specifications
99
- '__:1,2d',
100
- '_e:1,2d',
101
- '_x:1,2c,3d',
102
- 'esc_html__:1,2d',
103
- 'esc_html_e:1,2d',
104
- 'esc_html_x:1,2c,3d',
105
- 'esc_attr__:1,2d',
106
- 'esc_attr_e:1,2d',
107
- 'esc_attr_x:1,2c,3d',
108
- '_ex:1,2c,3d',
109
- '_n:1,2,4d',
110
- '_nx:1,2,4c,5d',
111
- '_n_noop:1,2,3d',
112
- '_nx_noop:1,2,3c,4d'
113
- ]
114
- },
115
- target: {
116
- files: [ {
117
- src: [
118
- '*.php',
119
- '**/*.php',
120
- '!node_modules/**',
121
- '!tests/**'
122
- ], //all php
123
- expand: true
124
- } ]
125
- }
126
- },
127
- makepot: {
128
- target: {
129
- options: {
130
- cwd: '.', // Directory of files to internationalize.
131
- domainPath: 'languages/', // Where to save the POT file.
132
- exclude: [ 'node_modules/*' ], // List of files or directories to ignore.
133
- mainFile: 'index.php', // Main project file.
134
- potFilename: 'buddypress-media.po', // Name of the POT file.
135
- potHeaders: { // Headers to add to the generated POT file.
136
- poedit: true, // Includes common Poedit headers.
137
- 'Last-Translator': 'rtMedia <rtmedia@rtcamp.com>',
138
- 'Language-Team': 'rtMedia <rtmedia@rtcamp.com>',
139
- 'report-msgid-bugs-to': 'http://community.rtcamp.com/c/rtmedia/',
140
- 'x-poedit-keywordslist': true // Include a list of all possible gettext functions.
141
- },
142
- type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
143
- updateTimestamp: true // Whether the POT-Creation-Date should be updated without other changes.
144
- }
145
- }
146
- }
147
-
148
- } );
149
- // register task
150
- grunt.registerTask( 'default', [ 'sass', 'autoprefixer', 'uglify', 'checktextdomain', 'makepot', 'watch' ] );
151
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/main/controllers/template/rt-template-functions.php CHANGED
@@ -536,7 +536,7 @@ function rtmedia_duration( $id = false ) {
536
  $duration = '';
537
  if ( ( 'video' === $media_object->media_type ) || ( 'music' === $media_object->media_type ) ) {
538
  $media_time = get_rtmedia_meta( $media_object->id, 'duration_time' );
539
- if ( false === $media_time ) {
540
  $filepath = get_attached_file( $media_object->media_id );
541
  $media_tags = new RTMediaTags( $filepath );
542
  $duration = $media_tags->duration;
@@ -544,6 +544,7 @@ function rtmedia_duration( $id = false ) {
544
  } else {
545
  $duration = $media_time;
546
  }
 
547
  $duration = '<span class="rtmedia_time" >' . esc_attr( $duration ) . '</span>';
548
  }
549
 
536
  $duration = '';
537
  if ( ( 'video' === $media_object->media_type ) || ( 'music' === $media_object->media_type ) ) {
538
  $media_time = get_rtmedia_meta( $media_object->id, 'duration_time' );
539
+ if ( false === $media_time || empty( $media_time ) ) {
540
  $filepath = get_attached_file( $media_object->media_id );
541
  $media_tags = new RTMediaTags( $filepath );
542
  $duration = $media_tags->duration;
544
  } else {
545
  $duration = $media_time;
546
  }
547
+ $duration = str_replace( '-:--', '', $duration );
548
  $duration = '<span class="rtmedia_time" >' . esc_attr( $duration ) . '</span>';
549
  }
550
 
bootstrap_tests.php DELETED
@@ -1,28 +0,0 @@
1
- <?php
2
- /**
3
- * Bootstrap the plugin unit testing environment. Customize 'active_plugins'
4
- * setting below to point to your main plugin file.
5
- *
6
- * Requires WordPress Unit Tests (http://unit-test.svn.wordpress.org/trunk/).
7
- *
8
- * @package wordpress-plugin-tests
9
- */
10
-
11
- // Add this plugin to WordPress for activation so it can be tested.
12
-
13
- $GLOBALS['wp_tests_options'] = array(
14
- 'active_plugins' => array( "buddypress-media/index.php" ),
15
- );
16
-
17
- // If the wordpress-tests repo location has been customized (and specified
18
- // with WP_TESTS_DIR), use that location. This will most commonly be the case
19
- // when configured for use with Travis CI.
20
-
21
- // Otherwise, we'll just assume that this plugin is installed in the WordPress
22
- // SVN external checkout configured in the wordpress-tests repo.
23
-
24
- if( false !== getenv( 'WP_TESTS_DIR' ) ) {
25
- require getenv( 'WP_TESTS_DIR' ) . '/includes/bootstrap.php';
26
- } else {
27
- require dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ) . '/includes/bootstrap.php';
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.rb DELETED
@@ -1,37 +0,0 @@
1
- # Require any additional compass plugins here.
2
-
3
- # Set this to the root of your project when deployed:
4
- http_path = "/"
5
- css_dir = "app/assets/css"
6
- sass_dir = "app/assets/css/sass"
7
- images_dir = "app/assets/img"
8
- javascripts_dir = "app/assets/js"
9
-
10
- output_style = :compressed
11
-
12
- relative_assets = true
13
-
14
- line_comments = false
15
- color_output = false
16
-
17
- #environment = :production
18
-
19
- #Symbol The environment mode. Defaults to :production, can also be :development
20
-
21
- # You can select your preferred output style here (can be overridden via the command line):
22
- # output_style = :expanded or :nested or :compact or :compressed
23
-
24
- # To enable relative paths to assets via compass helper functions. Uncomment:
25
- # relative_assets = true
26
-
27
- # To disable debugging comments that display the original location of your selectors. Uncomment:
28
- # line_comments = false
29
-
30
-
31
- # If you prefer the indented syntax, you might want to regenerate this
32
- # project again passing --syntax sass, or you can uncomment this:
33
- # preferred_syntax = :sass
34
- # and then run:
35
- # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
36
-
37
- # More Information about Configuration: http://compass-style.org/help/tutorials/configuration-reference/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
index.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
  Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
- Version: 4.1.2
8
  Author: rtCamp
9
  Text Domain: buddypress-media
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
  Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
+ Version: 4.1.3
8
  Author: rtCamp
9
  Text Domain: buddypress-media
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
log/index.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
- /*
3
- * I think about that "empty" space a lot. That emptiness is what allows for
4
- * something to actually evolve in a natural way. I've had to learn that over
5
- * the years - because one of the traps of being an artist is to always want to
6
- * be creating, always wanting to produce.
7
- * Meredith Monk
8
- */
9
- ?>
 
 
 
 
 
 
 
 
 
package.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "name" : "rtMedia",
3
- "dependencies" : {
4
- "load-grunt-tasks" : "~0.2.1"
5
- },
6
- "devDependencies" : {
7
- "grunt" : "^0.4.5",
8
- "grunt-autoprefixer" : "^3.0.0",
9
- "grunt-checktextdomain" : "^1.0.0",
10
- "grunt-contrib-sass" : "^0.9.2",
11
- "grunt-contrib-uglify" : "^0.9.1",
12
- "grunt-contrib-watch" : "^0.6.1",
13
- "grunt-wp-i18n" : "^0.5.2",
14
- "load-grunt-tasks" : "^3.2.0"
15
- }
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
phpunit.xml DELETED
@@ -1,14 +0,0 @@
1
- <phpunit
2
- bootstrap="tests/bootstrap.php"
3
- backupGlobals="false"
4
- colors="true"
5
- convertErrorsToExceptions="true"
6
- convertNoticesToExceptions="true"
7
- convertWarningsToExceptions="true"
8
- >
9
- <testsuites>
10
- <testsuite>
11
- <directory prefix="test-" suffix=".php">./tests/</directory>
12
- </testsuite>
13
- </testsuites>
14
- </phpunit>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
phpunit.xml.dist DELETED
@@ -1,8 +0,0 @@
1
- <phpunit bootstrap="tests/bootstrap.php" backupGlobals="false" colors="true">
2
- <testsuites>
3
- <!-- Default test suite to run all tests -->
4
- <testsuite>
5
- <directory prefix="test_" suffix=".php">tests</directory>
6
- </testsuite>
7
- </testsuites>
8
- </phpunit>
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,18 +1,18 @@
1
  === rtMedia for WordPress, BuddyPress and bbPress ===
2
- Contributors: rtcamp, rittesh.patel, sanket.parmar, pranalipatel, jignesh.nakrani, mangeshp, kiranpotphode, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores
3
  Donate link: http://rtcamp.com/donate/
4
  Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node, rtMedia, WordPress, bbPress, masonry
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: 4.6
9
- Stable tag: 4.1.2
10
 
11
  Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
12
 
13
  == Description ==
14
 
15
- rtMedia is the **only** complete media solution for WordPress, BuddyPress and bbPress, and is **WordPress VIP** compatible.
16
 
17
  Built with a mobile-first approach, it works on mobile/tablet devices (like iPhone/iPad, Android).
18
 
@@ -135,6 +135,9 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
135
 
136
  == Changelog ==
137
 
 
 
 
138
  = 4.1.2 [Aug 25, 2016] =
139
  * Update the original audio URL with transcoded audio URL in activity
140
 
@@ -1210,8 +1213,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
1210
 
1211
  == Upgrade Notice ==
1212
 
1213
- = 4.1.2 =
1214
- Requires BuddyPress 1.7 or higher, if using BuddyPress. Update the original audio URL with transcoded audio URL in activity.
1215
 
1216
  == Sponsors ==
1217
 
1
  === rtMedia for WordPress, BuddyPress and bbPress ===
2
+ Contributors: rtcamp, sanket.parmar, pranalipatel, jignesh.nakrani, mangeshp, kiranpotphode, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores
3
  Donate link: http://rtcamp.com/donate/
4
  Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node, rtMedia, WordPress, bbPress, masonry
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: 4.6
9
+ Stable tag: 4.1.3
10
 
11
  Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
12
 
13
  == Description ==
14
 
15
+ rtMedia is the **only** complete media solution for WordPress, BuddyPress and bbPress, and is **WordPress.com VIP** compatible.
16
 
17
  Built with a mobile-first approach, it works on mobile/tablet devices (like iPhone/iPad, Android).
18
 
135
 
136
  == Changelog ==
137
 
138
+ = 4.1.3 [Aug 30, 2016] =
139
+ * Fix audio/video time duration on media thumbnail
140
+
141
  = 4.1.2 [Aug 25, 2016] =
142
  * Update the original audio URL with transcoded audio URL in activity
143
 
1213
 
1214
  == Upgrade Notice ==
1215
 
1216
+ = 4.1.3 =
1217
+ Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix audio/video time duration on media thumbnail.
1218
 
1219
  == Sponsors ==
1220
 
tests/MyPluginTest.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
- /**
3
- * MyPlugin Tests
4
- */
5
- class BuddyPressMediaTest extends WP_UnitTestCase {
6
- public $plugin_slug = 'buddypress-media';
7
-
8
- public function setUp() {
9
- parent::setUp();
10
- $this->my_plugin = 'buddypress-media';
11
- }
12
-
13
- public function testTrueStillEqualsTrue() {
14
- $this->assertTrue(true);
15
- }
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/bootstrap.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
- // Activates this plugin in WordPress so it can be tested.
3
- $GLOBALS['wp_tests_options'] = array(
4
- 'active_plugins' => array( 'rtMedia/index.php' ),
5
- );
6
-
7
- $_tests_dir = getenv( 'WP_TESTS_DIR' );
8
- if ( ! $_tests_dir ) {
9
- $_tests_dir = '/tmp/wordpress-tests-lib';
10
- }
11
-
12
- require_once $_tests_dir . '/includes/functions.php';
13
-
14
- function _manually_load_plugin() {
15
- require dirname( __FILE__ ) . '/../index.php';
16
- }
17
- tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
18
-
19
- require $_tests_dir . '/includes/bootstrap.php';
20
- require_once 'rt-wp-test-case.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/.travis.yml DELETED
@@ -1,45 +0,0 @@
1
- sudo: required
2
-
3
- language: node_js
4
- node_js:
5
- - "0.10"
6
-
7
-
8
- env:
9
- - WP_VERSION=4.0 WP_MULTISITE=0
10
-
11
- before_install:
12
- - rm -rf ~/.gnupg
13
- - sudo apt-get install xvfb
14
-
15
- before_script:
16
- - export PLUGIN_DIR=$(pwd)
17
- - sudo rm -rf /etc/mysql/
18
- - sudo apt-get -qq purge mysql* graphviz*
19
- - sudo apt-get -qq autoremove
20
- - sudo apt-get update
21
- - sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = root@localhost.com" > /home/travis/.gitconfig'
22
- - sudo wget -qO ee rt.cx/ee && sudo bash ee
23
- - source /etc/bash_completion.d/ee_auto.rc
24
- - sudo ee -v
25
- - sudo lsb_release -a
26
- - sudo ee site create wp.localtest.me --wp --user=ADMINUSER --email=prabuddha.chakraborty@rtcamp.com --pass=ADMINPASS
27
- - sudo chmod 777 -R /var/www
28
- #- sudo bash -c 'echo "127.0.0.1 rtmediatest.com www.rtmediatest.com" >> /etc/hosts'
29
- - cat ~/.my.cnf
30
- - sudo nginx -t
31
- - sudo service nginx reload
32
- - cd /var/www/wp.localtest.me/htdocs/ && ls
33
- - wp --allow-root plugin install https://github.com/rtCamp/rtMedia/archive/master.zip
34
- - wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.2.2.3.1.zip
35
- - wp --allow-root plugin install https://downloads.wordpress.org/plugin/bbpress.2.5.7.zip
36
- - wp --allow-root plugin install https://downloads.wordpress.org/plugin/rtsocial.2.1.18.zip
37
- - wp plugin activate --all
38
- - cd $PLUGIN_DIR
39
- - cd tests/functional/
40
- - npm install -g nightwatch
41
- - npm install
42
- - git clone --depth=1 https://github.com/rtCamp/rtmedia-test-data.git test-data
43
- script:
44
- - xvfb-run --server-args="-screen 0, 1624x1068x24" nightwatch --test res/setup.js
45
- - xvfb-run --server-args="-screen 0, 1624x1068x24" nightwatch --group src/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/README.md DELETED
@@ -1,36 +0,0 @@
1
-
2
- **Automated testscript for rtMedia product**
3
-
4
- Running tests:
5
-
6
- * Install node.js
7
-
8
- * Install nightwatch
9
-
10
- `npm install -g nightwatch`
11
-
12
- * `cd {project_root_folder}/tests/functional/`
13
-
14
- * $```npm install```
15
-
16
- * configure `res/constants.js`
17
-
18
- `change site admin username/password`
19
-
20
- TESTADMINUSERNAME: 'ADMINUSER'
21
-
22
- TESTADMINPASSWORD: 'ADMINPASS'
23
-
24
-
25
- change url of site
26
-
27
- URLS: {
28
-
29
- LOGIN: 'http://wp.localtest.me'
30
- },
31
-
32
-
33
-
34
- Run to test
35
-
36
- $```nightwatch```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/custom-commands/goToActivity.js DELETED
@@ -1,17 +0,0 @@
1
- /* @author: Prabuddha Chakraborty */
2
-
3
- exports.command = function() {
4
- var client = this;
5
-
6
- client
7
- .moveToElement('#wp-admin-bar-my-account a.ab-item',1,1)
8
- .pause(1000)
9
- .click('#wp-admin-bar-my-account-activity a.ab-item')
10
- .waitForElementVisible('body', 2500)
11
- .pause(2000)
12
- .getTitle(function(title) {
13
- console.log("We are in Activity Page :"+title);
14
- })
15
-
16
- return this;
17
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/custom-commands/goToGroups.js DELETED
@@ -1,17 +0,0 @@
1
- /* @author: Prabuddha Chakraborty */
2
-
3
- exports.command = function() {
4
- var client = this;
5
-
6
- client
7
- .moveToElement('#wp-admin-bar-my-account a.ab-item',1,1)
8
- .pause(1000)
9
- .click('#wp-admin-bar-my-account-groups a.ab-item')
10
- .waitForElementVisible('body', 2500)
11
- .pause(2000)
12
- .getTitle(function(title) {
13
- console.log("We are in Groups Page :"+title);
14
- })
15
-
16
- return this;
17
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/custom-commands/goToMedia.js DELETED
@@ -1,18 +0,0 @@
1
- /* @author: Prabuddha Chakraborty */
2
-
3
- exports.command = function() {
4
- var client = this;
5
-
6
- client
7
- .moveToElement('#wp-admin-bar-my-account a.ab-item',1,1)
8
- .pause(100)
9
- .assert.elementPresent('#wp-admin-bar-my-account-media.menupop a.ab-item')
10
- .click('#wp-admin-bar-my-account-media.menupop a.ab-item')
11
- .waitForElementVisible('body', 2500)
12
- .pause(2000)
13
- .getTitle(function(title) {
14
- console.log("We are in Media Page :"+title);
15
- })
16
-
17
- return this;
18
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/custom-commands/goToProfile.js DELETED
@@ -1,17 +0,0 @@
1
- /* @author: Prabuddha Chakraborty */
2
-
3
- exports.command = function() {
4
- var client = this;
5
-
6
- client
7
- .moveToElement('#wp-admin-bar-my-account a.ab-item',1,1)
8
- .pause(500)
9
- .click('#wp-admin-bar-my-account-xprofile.menupop a.ab-item')
10
- .waitForElementVisible('body', 2500)
11
- .pause(2000)
12
- .getTitle(function(title) {
13
- console.log("We are in Profile Page :"+title);
14
- })
15
-
16
- return this;
17
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/custom-commands/openrtMediaSettings.js DELETED
@@ -1,22 +0,0 @@
1
- /* @author: Prabuddha Chakraborty */
2
-
3
- exports.command = function(url,username,password) {
4
- var client = this;
5
- var data = client.globals;
6
- var dash = data.URLS.LOGIN + '/wp-admin'
7
- client
8
- .pause(3000)
9
- .url(dash)
10
- .waitForElementVisible('body', 3000)
11
- .pause(5000)
12
- .moveToElement('#toplevel_page_rtmedia-settings',2,2)
13
- .moveToElement('#toplevel_page_rtmedia-settings .wp-submenu a.wp-first-item',1,1)
14
- .click('#toplevel_page_rtmedia-settings .wp-submenu a.wp-first-item')
15
- .waitForElementVisible('body', 2000)
16
- .pause(5000)
17
- .getTitle(function(title) {
18
- console.log("We are in rtMedia settings Page :"+title);
19
- })
20
-
21
- return this;
22
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/custom-commands/wplogin.js DELETED
@@ -1,17 +0,0 @@
1
-
2
-
3
-
4
- exports.command = function(url,username,password) {
5
- var client = this;
6
- var loginurl = url + "/wp-admin" ;
7
-
8
- client
9
- .url(loginurl)
10
- .pause(500)
11
- .waitForElementVisible('body', 2000)
12
- .setValue('input[id="user_login"]', username)
13
- .setValue('input[id="user_pass"]', password)
14
- .click('input[type=submit]')
15
-
16
- return this;
17
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/custom-commands/wplogout.js DELETED
@@ -1,17 +0,0 @@
1
-
2
-
3
- exports.command = function() {
4
- var client = this;
5
-
6
- client
7
- .pause(1000)
8
- .moveToElement('#wp-admin-bar-my-account a.ab-item',1,1) //move to top RHS
9
- .click('#wp-admin-bar-logout a.ab-item')
10
- .pause(2000)
11
- .waitForElementVisible('body', 2000)
12
- .getTitle(function(title) {
13
- console.log("Logged out..");
14
- })
15
-
16
- return this;
17
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/nightwatch.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "src_folders" : ["src"],
3
- "output_folder" : "reports",
4
- "custom_commands_path" : "./custom-commands",
5
- "globals_path" : "./res/constants.js",
6
-
7
- "selenium" : {
8
- "start_process" : true,
9
- "server_path" : "./node_modules/selenium-server/lib/runner/selenium-server-standalone-2.45.0.jar"
10
- },
11
-
12
- "test_settings" : {
13
- "default" : {
14
- "launch_url" : "http://localhost",
15
- "selenium_port" : 4444,
16
- "selenium_host" : "localhost",
17
- "silent": true,
18
- "screenshots" : {
19
- "enabled" : false,
20
- "path" : ""
21
- },
22
- "desiredCapabilities": {
23
- "browserName": "firefox",
24
- "javascriptEnabled": true,
25
- "acceptSslCerts": true
26
-
27
- }
28
- }
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/package.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "name": "rtmedia-test-suite",
3
- "main": "",
4
- "author": "Prabuddha Chakraborty",
5
- "version": "1.0.0",
6
- "keywords": [],
7
- "homepage": "",
8
- "repository": {
9
- "type": "git",
10
- "url": ""
11
- },
12
- "description": "",
13
- "contributors": [],
14
- "dependencies": {
15
- "nightwatch": "~0.4.17"
16
- },
17
-
18
- "devDependencies": {
19
- "selenium-server": "2.45.0",
20
- "jquery": "^2.1.1",
21
- "jsdom": "^1.0.0-pre.3",
22
- "nightwatch": "0.4.17"
23
-
24
-
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/res/constants.js DELETED
@@ -1,99 +0,0 @@
1
- /*
2
- @author : Prabuddha Chakraborty
3
- This is a standalone scripts for centralized management of all selectors and all other constant.
4
- */
5
-
6
- module.exports ={
7
- //username and password for each wordpress roles
8
- TESTADMINUSERNAME: 'ADMINUSER',
9
- TESTADMINPASSWORD: 'ADMINPASS',
10
-
11
- TESTEDITORUSERNAME: 'EDITORUSER',
12
- TESTEDITORPASSWORD: 'EDITORPASS',
13
-
14
- TESTAUTHORUSERNAME: 'AUTHORUSER',
15
- TESTAUTHORPASSWORD: 'AUTHORPASS',
16
-
17
- TESTCONTRIBUTORUSERNAME: 'CONTRIBUTORUSER',
18
- TESTCONTRIBUTORPASSWORD: 'CONTRIBUTORPASS',
19
-
20
- TESTSUBSCRIBERUSERNAME: 'SUBSCRIBERUSER',
21
- TESTSUBSCRIBERPASSWORD: 'SUBSCRIBERPASS',
22
- //Home site url enter here
23
- URLS: {
24
- LOGIN: 'http://wp.localtest.me'
25
- },
26
- //local path of all test_data resources
27
- PATH: {
28
- TEST_IMAGE: './test-data/images/test.jpg',
29
- TEST_IMAGE2: './test-data/images/test0.jpg',
30
- TEST_MUSIC: './test-data/music/mpthreetest.mp3',
31
- TEST_VIDEO: './test-data/videos/testmpfour.mp4',
32
- TEST_DOC: './test-data/document.doc',
33
- TEST_ZIP: './test-data/testzip.zip',
34
- },
35
- /*SELECTORS of rtMedia settings here .. */
36
- SELECTORS: {
37
- SUBMIT: '#bp_media_settings_form .bottom .rtmedia-settings-submit', //data.SELECTORS.SUBMIT
38
- BUDDYPRESS: {
39
- BUDDYPRESS: '#tab-rtmedia-bp',
40
- ENABLE_MEDIA_PROFILE: 'input[name="rtmedia-options[buddypress_enableOnProfile]"]',
41
- ENABLE_MEDIA_GROUP: 'input[name="rtmedia-options[buddypress_enableOnGroup]"]',
42
- ENABLE_UPLOAD_ACTIVITY: 'input[name="rtmedia-options[buddypress_enableOnActivity]"]',
43
- ENABLE_MEDIA_ALBUM: 'input[name="rtmedia-options[general_enableAlbums]"]'
44
- },
45
-
46
- CUSTOMCSS: {
47
- CUSTOM_CSS: "#tab-rtmedia-custom-css-settings", //'input[name="rtmedia-options[styles_custom]"]'
48
- DEFAULT_ENABLE: 'input[name="rtmedia-options[styles_enabled]"]',
49
- CUSTOM_CSS_TEXTAREA: "#rtmedia-custom-css" //rtmedia-options[styles_custom]
50
- },
51
-
52
- DISPLAY: {
53
- DISPLAY: '#tab-rtmedia-display',
54
- ENABLE_COMMENT: 'input[name="rtmedia-options[general_enableComments]"]',
55
- ENABLE_LIGHTBOX: 'input[name="rtmedia-options[general_enableLightbox]"]',
56
- MEDIA_PER_PAGE: 'input[name="rtmedia-options[general_perPageMedia]"]',
57
- SELECT_LOADMORE: 'input[value="load_more"]',
58
- SELECT_PAGINATION: 'input[value="pagination"]'
59
- },
60
-
61
- MEDIASIZES: {
62
- MEDIASIZES: '#tab-rtmedia-sizes',
63
- MUSIC_ACTIVITY_PLAYER_WIDTH: 'input[name="rtmedia-options[defaultSizes_music_activityPlayer_width]"]',
64
- MUSIC_SINGLEPLAYER_WIDTH: 'input[name="rtmedia-options[defaultSizes_music_singlePlayer_width]"]',
65
- PHOTO_LARGE_WIDTH: 'input[name="rtmedia-options[defaultSizes_photo_large_width]"]',
66
- PHOTO_LARGE_HEIGHT: 'input[name="rtmedia-options[defaultSizes_photo_large_height]"]',
67
- PHOTO_MEDIUM_WIDTH: 'input[name="rtmedia-options[defaultSizes_photo_medium_width]"]',
68
- PHOTO_MEDIUM_HEIGHT: 'input[name="rtmedia-options[defaultSizes_photo_medium_height]"]',
69
- PHOTO_THUMBNAIL_HEIGHT: 'input[name="rtmedia-options[defaultSizes_photo_thumbnail_height]"]' ,
70
- PHOTO_THUMBNAIL_WIDTH: 'input[name="rtmedia-options[defaultSizes_photo_thumbnail_width]"]',
71
- VIDEO_ACTIVITY_PLAYER_WIDTH: 'input[name="rtmedia-options[defaultSizes_video_activityPlayer_width]"]',
72
- VIDEO_ACTIVITY_PLAYER_HEIGHT: 'input[name="rtmedia-options[defaultSizes_video_activityPlayer_height]"]',
73
- VIDEO_SINGLE_PLAYER_WIDTH: 'input[name="rtmedia-options[defaultSizes_video_singlePlayer_width]"]',
74
- VIDEO_SINGLE_PLAYER_HEIGHT: 'input[name="rtmedia-options[defaultSizes_video_singlePlayer_height]"]'
75
- },
76
-
77
- MEDIATYPES: {
78
- MEDIATYPES: '#tab-rtmedia-types',
79
- ENABLE_PHOTO: 'input[name="rtmedia-options[allowedTypes_photo_enabled]"]',
80
- ENABLE_MUSIC: 'input[name="rtmedia-options[allowedTypes_music_enabled]"]',
81
- ENABLE_VIDEO: 'input[name="rtmedia-options[allowedTypes_video_enabled]"]'
82
- },
83
-
84
- OTHERSETTINGS: {
85
- OTHERSETTINGS: '#tab-rtmedia-general',
86
- SHOW_ADMIN_MENU: 'input[name="rtmedia-options[general_showAdminMenu]"]',
87
- ADD_FOOTER_LINK: 'input[name="rtmedia-options[rtmedia_add_linkback]"]'
88
- },
89
-
90
- PRIVACY: {
91
- PRIVACY: "#tab-rtmedia-privacy",
92
- ENABLE_PRIVACY: 'input[name="rtmedia-options[privacy_enabled]"]',
93
- PRIVATE: 'input[value="60"]',
94
- LOGGEDIN: 'input[value="20"]',
95
- PUBLIC: 'input[value="0"]',
96
- PRIVACY_OVERRIDE: 'input[name="rtmedia-options[privacy_userOverride]"]'
97
- }
98
- }
99
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/res/setup.js DELETED
@@ -1,144 +0,0 @@
1
- /*
2
- This is setup scripts.. creating wordpress users for newly created site
3
- to uploading initial images this scripts does it all
4
- This scripts runs only for first time
5
- */
6
- module.exports = {
7
- 'Step One : initializing setup file ... ' : function (browser){
8
- var data = browser.globals;
9
- var urll = data.URLS.LOGIN;
10
- var settings = urll + '/wp-admin/options-general.php?page=bp-components';
11
- var adduser = urll + "/wp-admin/user-new.php";
12
- browser
13
- .maximizeWindow()
14
- .wplogin(urll,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
15
- .getTitle(function(title) {
16
- console.log(title);
17
- })
18
- .url(adduser)
19
- .waitForElementVisible('body', 2500)
20
- .getTitle(function(title) {
21
- console.log(title);
22
- console.log("creating users for various roles...");
23
- })
24
-
25
- //test editor
26
- .url(adduser)
27
- .waitForElementVisible('input[id="user_login"]', 2500)
28
- .setValue('input[id="user_login"]',data.TESTEDITORUSERNAME)
29
- .setValue('input[id="email"]',"abc1@cc.in")
30
- .setValue('input[id="first_name"]',data.TESTEDITORUSERNAME)
31
- .setValue('input[id="pass1"]',data.TESTEDITORPASSWORD)
32
- .setValue('input[id="pass2"]',data.TESTEDITORPASSWORD)
33
- .click("#role option[value='editor']")
34
- .click('#createusersub')
35
- .waitForElementVisible('body', 2500)
36
- //test author
37
- .url(adduser)
38
- .waitForElementVisible('input[id="user_login"]', 2500)
39
- .setValue('input[id="user_login"]',data.TESTAUTHORUSERNAME)
40
- .setValue('input[id="email"]',"abc2@cc.in")
41
- .setValue('input[id="first_name"]',data.TESTAUTHORUSERNAME)
42
- .setValue('input[id="pass1"]',data.TESTAUTHORPASSWORD)
43
- .setValue('input[id="pass2"]',data.TESTAUTHORPASSWORD)
44
- .click("#role option[value='author']")
45
- .click('#createusersub')
46
- .pause(200)
47
- //test subscriber
48
- .url(adduser)
49
- .waitForElementVisible('input[id="user_login"]', 2500)
50
- .setValue('input[id="user_login"]',data.TESTSUBSCRIBERUSERNAME)
51
- .setValue('input[id="email"]',"abc3@cc.in")
52
- .setValue('input[id="first_name"]',data.TESTSUBSCRIBERUSERNAME)
53
- .setValue('input[id="pass1"]',data.TESTSUBSCRIBERPASSWORD)
54
- .setValue('input[id="pass2"]',data.TESTSUBSCRIBERPASSWORD)
55
- .click("#role option[value='subscriber']")
56
- .click('#createusersub')
57
- .pause(200)
58
- //test contributor
59
- .url(adduser)
60
- .waitForElementVisible('input[id="user_login"]', 2500)
61
- .setValue('input[id="user_login"]',data.TESTCONTRIBUTORUSERNAME)
62
- .setValue('input[id="email"]',"abc4@cc.in")
63
- .setValue('input[id="first_name"]',data.TESTCONTRIBUTORUSERNAME)
64
- .setValue('input[id="pass1"]',data.TESTCONTRIBUTORPASSWORD)
65
- .setValue('input[id="pass2"]',data.TESTCONTRIBUTORPASSWORD)
66
- .click("#role option[value='contributor']")
67
- .click('#createusersub')
68
- .pause(200)
69
- //upload media to medias
70
- .goToMedia()
71
- .getTitle(function(title) {
72
- console.log(title);
73
- console.log("uploading media photos for initial setup..")
74
- console.log("total of 13 test photos will be uploaded in media galery")
75
- for( var i = 0; i < 12 ; i++ ) {
76
- console.log("uploaded !");
77
- browser.click('#rtmedia-nav-item-music')
78
- .waitForElementVisible('body', 1500)
79
- .click('#rtm_show_upload_ui')
80
- .click('.rtm-select-files')
81
- .setValue('input[type=file]', require('path').resolve(data.PATH.TEST_IMAGE))
82
- .click('.start-media-upload')
83
- .pause(4000);
84
- };
85
- })
86
-
87
- //Activate groups for varios roles
88
- .url(settings)
89
- .click('input[name="bp_components[groups]"]')
90
- .click('#bp-admin-component-submit')
91
-
92
- //creating demo groups
93
- .url(urll + '/groups/create/step/group-details/')
94
- .pause(200)
95
- .setValue('#group-name','test')
96
- .setValue('#group-desc','creating test')
97
- .click('#group-creation-create')
98
- .pause(200)
99
- .click('#group-creation-next')
100
- .click('#bbp-create-group-forum')
101
- .click('#group-creation-next')
102
- .pause(200)
103
- .click('#group-creation-finish')
104
- .pause(200)
105
- .wplogout()
106
-
107
- //login for others
108
- .wplogin(urll,data.TESTAUTHORUSERNAME,data.TESTAUTHORPASSWORD)
109
- .url(urll + '/groups/test/')
110
- .getTitle(function(title) {
111
- console.log("TestAuthor is joining group..")
112
- })
113
- .click('a[title="Join Group"]')
114
- .wplogout()
115
-
116
- //login for others
117
- .wplogin(urll,data.TESTEDITORUSERNAME,data.TESTEDITORPASSWORD)
118
- .getTitle(function(title) {
119
- console.log("TestEditor is joining group..")
120
- })
121
- .url(urll + '/groups/test/')
122
- .click('a[title="Join Group"]')
123
- .wplogout()
124
-
125
- //login for others
126
- .wplogin(urll,data.TESTCONTRIBUTORUSERNAME,data.TESTCONTRIBUTORPASSWORD)
127
- .getTitle(function(title) {
128
- console.log("TestContributor is joining group..")
129
- })
130
- .url(urll + '/groups/test/')
131
- .click('a[title="Join Group"]')
132
- .wplogout()
133
-
134
- //login for others
135
- .wplogin(urll,data.TESTSUBSCRIBERUSERNAME,data.TESTSUBSCRIBERPASSWORD)
136
- .getTitle(function(title) {
137
- console.log("TestEditor is joining group..")
138
- })
139
- .url(urll + '/groups/test/')
140
- .click('a[title="Join Group"]')
141
- .wplogout()
142
- .end();
143
- }
144
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/src/buddypress/allow-upload-from-activity-stream-ngtest.js DELETED
@@ -1,31 +0,0 @@
1
- /*
2
- @author: Prabuddha Chakraborty
3
- TestCase: Allow upload from activity stream Negative Case
4
- */
5
- module.exports = {
6
- tags: ['buddypress', 'activity','upload'],
7
- 'Step One : Disable Allow upload from activity stream ' : function (browser){
8
- var data = browser.globals;
9
- browser
10
- .maximizeWindow()
11
- .wplogin(data.URLS.LOGIN,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
12
- .openrtMediaSettings()
13
- .click(data.SELECTORS.BUDDYPRESS.BUDDYPRESS)
14
- .pause(500)
15
- .getAttribute(data.SELECTORS.BUDDYPRESS.ENABLE_UPLOAD_ACTIVITY, "checked", function(result) {
16
- if(result.value){
17
- browser.click(data.SELECTORS.BUDDYPRESS.ENABLE_UPLOAD_ACTIVITY);
18
- browser.click(data.SELECTORS.SUBMIT);
19
- }else{
20
- console.log('check box is already disabled');
21
- } })
22
- .pause(1000)
23
- },
24
- 'Step two: Check on ACTIVITY For Post upload button ' : function (browser) {
25
- browser
26
- .goToActivity()
27
- .assert.elementNotPresent("#rtmedia-add-media-button-post-update")
28
- .wplogout()
29
- .end();
30
- }
31
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/src/buddypress/allow-upload-from-activity-stream-other-roles-test.js DELETED
@@ -1,78 +0,0 @@
1
- /*
2
- @author: Prabuddha Chakraborty
3
- TestCase: Check Allow upload from activity stream for other users
4
- */
5
- module.exports = {
6
- tags: ['buddypress', 'activity','upload'],
7
- 'Step One : Enable Allow upload from activity stream from Admin' : function (browser){
8
- var data = browser.globals;
9
- browser
10
- .maximizeWindow()
11
- .wplogin(data.URLS.LOGIN,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
12
- .openrtMediaSettings()
13
- .click(data.SELECTORS.BUDDYPRESS.BUDDYPRESS)
14
- .pause(2000)
15
- //select checkbox switch
16
- .getAttribute(data.SELECTORS.BUDDYPRESS.ENABLE_UPLOAD_ACTIVITY, "checked", function(result) {
17
- if(result.value){
18
- browser.verify.ok(result.value, 'Checkbox is selected');
19
- console.log('check box is already enabled');
20
- }else{
21
- browser.click(data.SELECTORS.BUDDYPRESS.ENABLE_UPLOAD_ACTIVITY);
22
- browser.click(data.SELECTORS.SUBMIT);
23
- } })
24
- .pause(1000)
25
- .wplogout()
26
-
27
-
28
- },
29
- 'Step two: Login from TestEditor' : function (browser) {
30
- var data = browser.globals;
31
- browser
32
- .wplogin(data.URLS.LOGIN,data.TESTEDITORUSERNAME,data.TESTEDITORPASSWORD)
33
- .goToActivity()
34
- .assert.elementPresent("#rtmedia-add-media-button-post-update")
35
- .setValue('#rtmedia-whts-new-upload-container input[type="file"]', require('path').resolve(data.PATH.TEST_IMAGE))
36
- .setValue('#whats-new','Check Media Type : Photos (jpg, jpeg, png, gif) ')
37
- .click('#aw-whats-new-submit')
38
- .assert.containsText("#buddypress", "test")
39
- .wplogout()
40
- },
41
- 'Step three: Login from Author' : function (browser) {
42
- var data = browser.globals;
43
- browser
44
- .wplogin(data.URLS.LOGIN,data.TESTAUTHORUSERNAME,data.TESTAUTHORPASSWORD)
45
- .goToActivity()
46
- .assert.elementPresent("#rtmedia-add-media-button-post-update")
47
- .setValue('#rtmedia-whts-new-upload-container input[type="file"]', require('path').resolve(data.PATH.TEST_IMAGE))
48
- .setValue('#whats-new','Check Media Type : Photos (jpg, jpeg, png, gif) ')
49
- .click('#aw-whats-new-submit')
50
- .assert.containsText("#buddypress", "test")
51
- .wplogout()
52
- },
53
- 'Step four: Login from Subscriber' : function (browser) {
54
- var data = browser.globals;
55
- browser
56
- .wplogin(data.URLS.LOGIN,data.TESTSUBSCRIBERUSERNAME,data.TESTSUBSCRIBERPASSWORD)
57
- .goToActivity()
58
- .assert.elementPresent("#rtmedia-add-media-button-post-update")
59
- .setValue('#rtmedia-whts-new-upload-container input[type="file"]', require('path').resolve(data.PATH.TEST_IMAGE))
60
- .setValue('#whats-new','Check Media Type : Photos (jpg, jpeg, png, gif) ')
61
- .click('#aw-whats-new-submit')
62
- .assert.containsText("#buddypress", "test")
63
- .wplogout()
64
- },
65
- 'Step five: Login from Contributor' : function (browser) {
66
- var data = browser.globals;
67
- browser
68
- .wplogin(data.URLS.LOGIN,data.TESTCONTRIBUTORUSERNAME,data.TESTCONTRIBUTORPASSWORD)
69
- .goToActivity()
70
- .assert.elementPresent("#rtmedia-add-media-button-post-update")
71
- .setValue('#rtmedia-whts-new-upload-container input[type="file"]', require('path').resolve(data.PATH.TEST_IMAGE))
72
- .setValue('#whats-new','Check Media Type : Photos (jpg, jpeg, png, gif) ')
73
- .click('#aw-whats-new-submit')
74
- .assert.containsText("#buddypress", "test")
75
- .wplogout()
76
- .end();
77
- }
78
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/src/buddypress/allow-upload-from-activity-stream-test.js DELETED
@@ -1,37 +0,0 @@
1
- /*
2
- @author: Prabuddha Chakraborty
3
- TestCase: Check Allow upload from activity stream
4
- */
5
- module.exports = {
6
- tags: ['buddypress', 'activity','upload'],
7
- 'Step One : Enable Allow upload from activity stream ' : function (browser){
8
- var data = browser.globals;
9
- browser
10
- .maximizeWindow()
11
- .wplogin(data.URLS.LOGIN,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
12
- .openrtMediaSettings()
13
- .click(data.SELECTORS.BUDDYPRESS.BUDDYPRESS)
14
- .pause(500)
15
- //select checkbox switch
16
- .getAttribute(data.SELECTORS.BUDDYPRESS.ENABLE_UPLOAD_ACTIVITY, "checked", function(result) {
17
- if(result.value){
18
- browser.verify.ok(result.value, 'Checkbox is selected');
19
- console.log('check box is already enabled');
20
- }else{
21
- browser.click(data.SELECTORS.BUDDYPRESS.ENABLE_UPLOAD_ACTIVITY);
22
- browser.click(data.SELECTORS.SUBMIT);
23
- } })
24
- //.pause(1000)
25
- },
26
- 'Step two: Check on Activity Page ' : function (browser) {
27
- var data = browser.globals;
28
- browser
29
- .goToActivity()
30
- .assert.elementPresent("#rtmedia-add-media-button-post-update")
31
- .setValue('#rtmedia-whts-new-upload-container input[type="file"]', require('path').resolve(data.PATH.TEST_IMAGE))
32
- .setValue('#whats-new','Check Media Type : Photos (jpg, jpeg, png, gif) ')
33
- .click('#aw-whats-new-submit')
34
- .assert.containsText("#buddypress", "test")
35
- .end();
36
- }
37
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/src/buddypress/enable-media-in-group-ngtest.js DELETED
@@ -1,33 +0,0 @@
1
- /*
2
- @author: Prabuddha Chakraborty
3
- TestCase: Enable Media in Group Negative Case
4
- */
5
- module.exports = {
6
- tags: ['buddypress', 'groups','upload'],
7
- 'Step one :Disable media in group from settings' :function(browser){
8
- var data = browser.globals;
9
- browser
10
- .maximizeWindow()
11
- .wplogin(data.URLS.LOGIN,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
12
- .openrtMediaSettings()
13
- .click(data.SELECTORS.BUDDYPRESS.BUDDYPRESS)
14
- .pause(500)
15
- .getAttribute(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_GROUP, "checked", function(result) {
16
- if(result.value){
17
- browser.click(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_GROUP);
18
- browser.click(data.SELECTORS.SUBMIT);
19
- }else{
20
- console.log('check box is already disabled');
21
- } })
22
- .pause(1000)
23
- },
24
- 'step two: Check frontend ' : function (browser) {
25
- var data = browser.globals;
26
- browser
27
- .goToGroups()
28
- .click('#groups-list .is-member .item .item-title a') //select a group
29
- .assert.elementNotPresent('#rtmedia-media-nav')
30
- .wplogout()
31
- .end();
32
- }
33
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/src/buddypress/enable-media-in-group-other-roles-test.js DELETED
@@ -1,108 +0,0 @@
1
- /*
2
- @author: Prabuddha Chakraborty
3
- TestCase: To check Enable Media in Group For Other Users
4
- */
5
- module.exports = {
6
- tags: ['buddypress', 'groups','upload'],
7
- 'Step One : Enable Allow upload from activity stream from Admin' : function (browser){
8
- var data = browser.globals;
9
- browser
10
- .maximizeWindow()
11
- .wplogin(data.URLS.LOGIN,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
12
- .openrtMediaSettings()
13
- .click(data.SELECTORS.BUDDYPRESS.BUDDYPRESS)
14
- .pause(500)
15
- .getAttribute(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_GROUP, "checked", function(result) {
16
- if(result.value){
17
- browser.verify.ok(result.value, 'Checkbox is selected');
18
- console.log('check box is already enabled');
19
- }else{
20
- browser.click(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_GROUP);
21
- browser.click(data.SELECTORS.SUBMIT);
22
- } })
23
- .pause(1000)
24
- .wplogout()
25
- },
26
- 'step two: Login from TestEditor' : function (browser) {
27
- var data = browser.globals;
28
- browser
29
- .wplogin(data.URLS.LOGIN,data.TESTEDITORUSERNAME,data.TESTEDITORPASSWORD)
30
- .goToGroups()
31
- .click('#groups-list .is-member .item .item-title a')
32
- .assert.elementPresent('#rtmedia-media-nav')
33
- .click('#rtmedia-media-nav')
34
- .pause(2000)
35
- .click('#rtm_show_upload_ui')
36
- .click('.rtm-select-files')
37
- .setValue('input[type=file]', require('path').resolve(data.PATH.TEST_IMAGE))
38
- .click('.start-media-upload')
39
- .pause(6000)
40
- .refresh()
41
- .getText('.rtmedia-list-item a.rtmedia-list-item-a .rtmedia-item-title h4',function(result){
42
- browser.assert.equal(result.value, 'test', 'image uploaded successfully');
43
- })
44
- .wplogout()
45
-
46
- },
47
- 'step three: Login from Author' : function (browser) {
48
- var data = browser.globals;
49
- browser
50
- .wplogin(data.URLS.LOGIN,data.TESTAUTHORUSERNAME,data.TESTAUTHORPASSWORD)
51
- .goToGroups()
52
- .click('#groups-list .is-member .item .item-title a')
53
- .assert.elementPresent('#rtmedia-media-nav')
54
- .click('#rtmedia-media-nav')
55
- .pause(2000)
56
- .click('#rtm_show_upload_ui')
57
- .click('.rtm-select-files')
58
- .setValue('input[type=file]', require('path').resolve(data.PATH.TEST_IMAGE))
59
- .click('.start-media-upload')
60
- .pause(6000)
61
- .refresh()
62
- .getText('.rtmedia-list-item a.rtmedia-list-item-a .rtmedia-item-title h4',function(result){
63
- browser.assert.equal(result.value, 'test', 'image uploaded successfully');
64
- })
65
- .wplogout()
66
- },
67
- 'step three: Login from Subscriber' : function (browser) {
68
- var data = browser.globals;
69
- browser
70
- .wplogin(data.URLS.LOGIN,data.TESTSUBSCRIBERUSERNAME,data.TESTSUBSCRIBERPASSWORD)
71
- .goToGroups()
72
- .click('#groups-list .is-member .item .item-title a')
73
- .assert.elementPresent('#rtmedia-media-nav')
74
- .click('#rtmedia-media-nav')
75
- .pause(2000)
76
- .click('#rtm_show_upload_ui')
77
- .click('.rtm-select-files')
78
- .setValue('input[type=file]', require('path').resolve(data.PATH.TEST_IMAGE))
79
- .click('.start-media-upload')
80
- .pause(5000)
81
- .refresh()
82
- .getText('.rtmedia-list-item a.rtmedia-list-item-a .rtmedia-item-title h4',function(result){
83
- browser.assert.equal(result.value, 'test', 'image uploaded successfully');
84
- })
85
- .wplogout()
86
- },
87
- 'step three: Login from TestContributor' : function (browser) {
88
- var data = browser.globals;
89
- browser
90
- .wplogin(data.URLS.LOGIN,data.TESTCONTRIBUTORUSERNAME,data.TESTCONTRIBUTORPASSWORD)
91
- .goToGroups()
92
- .click('#groups-list .is-member .item .item-title a')
93
- .assert.elementPresent('#rtmedia-media-nav')
94
- .click('#rtmedia-media-nav')
95
- .pause(2000)
96
- .click('#rtm_show_upload_ui')
97
- .click('.rtm-select-files')
98
- .setValue('input[type=file]', require('path').resolve(data.PATH.TEST_IMAGE))
99
- .click('.start-media-upload')
100
- .pause(5000)
101
- .refresh()
102
- .getText('.rtmedia-list-item a.rtmedia-list-item-a .rtmedia-item-title h4',function(result){
103
- browser.assert.equal(result.value, 'test', 'image uploaded successfully');
104
- })
105
- .wplogout()
106
- .end();
107
- }
108
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/src/buddypress/enable-media-in-group-test.js DELETED
@@ -1,46 +0,0 @@
1
- /*
2
- @author: Prabuddha Chakraborty
3
- TestCase: To Check Enable Media in Group
4
- */
5
-
6
- module.exports = {
7
- tags: ['buddypress', 'profile','upload'],
8
- 'Step one :Enable media in group from settings' :function(browser){
9
- var data = browser.globals;
10
- browser
11
- .maximizeWindow()
12
- .wplogin(data.URLS.LOGIN,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
13
- .openrtMediaSettings()
14
- .click(data.SELECTORS.BUDDYPRESS.BUDDYPRESS)
15
- .pause(500)
16
- .getAttribute(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_GROUP, "checked", function(result) {
17
- // console.log(result); //used for debug
18
- if(result.value){
19
- browser.verify.ok(result.value, 'Checkbox is selected');
20
- console.log('check box is already enabled');
21
- }else{
22
- browser.click(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_GROUP);
23
- browser.click(data.SELECTORS.SUBMIT);
24
- } })
25
- .pause(1000)
26
- },
27
- 'step two: Check frontend ' : function (browser) {
28
- var data = browser.globals;
29
- browser
30
- .goToGroups()
31
- .click('#groups-list .is-member .item .item-title a')
32
- .assert.elementPresent('#rtmedia-media-nav')
33
- .click('#rtmedia-media-nav')
34
- .click('#rtm_show_upload_ui')
35
- .click('.rtm-select-files')
36
- .setValue('input[type=file]', require('path').resolve(data.PATH.TEST_IMAGE))
37
- .click('.start-media-upload')
38
- .pause(6000)
39
- .refresh()
40
- .getText('.rtmedia-list-item a.rtmedia-list-item-a .rtmedia-item-title h4',function(result){
41
- browser.assert.equal(result.value, 'test', 'image uploaded successfully');
42
- })
43
- .wplogout()
44
- .end();
45
- }
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tests/functional/src/buddypress/enable-media-in-profile-ngtest.js DELETED
@@ -1,35 +0,0 @@
1
- /*
2
- @author: Prabuddha Chakraborty
3
- TestCase: Enable Media in Profile Negative Case
4
- */
5
-
6
- module.exports = {
7
- tags: ['buddypress', 'profile','upload'],
8
- 'Step One : Enable media in profile ' : function (browser){
9
- var data = browser.globals;
10
- browser
11
- .maximizeWindow()
12
- .wplogin(data.URLS.LOGIN,data.TESTADMINUSERNAME,data.TESTADMINPASSWORD)
13
- .openrtMediaSettings()
14
- .click(data.SELECTORS.BUDDYPRESS.BUDDYPRESS)
15
- .pause(500)
16
- //select checkbox switch
17
- .getAttribute(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_PROFILE, "checked", function(result) {
18
- // console.log(result); //used for debug
19
- if(result.value){
20
- browser.click(data.SELECTORS.BUDDYPRESS.ENABLE_MEDIA_PROFILE);
21
- browser.click(data.SELECTORS.SUBMIT);
22
- }else{
23
- console.log('check box is already OFF');
24
- } })
25
- .pause(1000)
26
- },
27
- 'step two: Upload and Check Media ' : function (browser) {
28
- browser
29
- .assert.elementNotPresent('#wp-admin-bar-my-account-media.menupop a.ab-item')
30
- .goToProfile()
31
- .assert.elementNotPresent("#user-media")
32
- .wplogout()
33
- .end();
34
- }
35
- };