Skip to content

Commit

Permalink
Merge branch 'issue/intro-video' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
garex committed Nov 14, 2015
2 parents edf0d52 + c725dc9 commit 2ba6121
Show file tree
Hide file tree
Showing 10 changed files with 4,096 additions and 10 deletions.
27 changes: 19 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
/composer.lock
/db/log/*.log
/db/ruckusing.conf.local.php
/db/sql/*.bak
/composer.lock
/js/vendor/evercookie
/js/vendor/uuid-js
/phpunit.xml
/tests/mocha/node_modules/
/tests/integration-environment/cache/*.*
/tests/integration-environment/wordpress/
/tests/integration-environment/wordpress-*.tar.gz
/tests/integration-environment/*.zip
/tests/integration-environment/*.log
/tests/integration-environment/*.pid
/tests/integration-environment/*.zip
/tests/integration-environment/cache/*.*
/tests/integration-environment/wordpress-*.tar.gz
/tests/integration-environment/wordpress/
/tests/mocha/node_modules/
/tools/intro-video/*.mp4
/tools/intro-video/.backup/
/tools/intro-video/Wp-testing-Intro.mp4.txt
/tools/intro-video/aifc/
/tools/intro-video/background/
/tools/intro-video/mkv/
/tools/intro-video/mp3/
/tools/intro-video/node_modules/
/tools/intro-video/ogv/
/tools/intro-video/thumbnail/
/tools/intro-video/thumbs/
/tools/refactoring/*.sql
/tools/refactoring/*.svg
/tools/screenshots/decorated/*.png
/tools/screenshots/node_modules/
/tools/screenshots/raw/*.png
/tools/screenshots/decorated/*.png
/tools/support/*.txt
/tools/support/*.md
/tools/support/*.txt
/tools/support/wordpress-support-mirror/
/vendor/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ We didn't invent anything new — all this has been already invented in 19th cen

> If you like the plugin, feel free to [donate via PayPal](https://goo.gl/igulor) or rate it (on the right side of this page). Thanks a lot! :)
http://www.youtube.com/watch?v=tT3d8Jdm7kY

Test answers, scales, results and categories are edited through **wordpress standard editors**, similar to categories editor. You can associate them in sidebar. Whether test questions, answers and formulas are edited with standard wordpress metaboxes, behind content. You can even reorder them if you like by drag-n-drop. At the top of content editor you have **button for quick access** to those metaboxes: Add New Questions, Edit Questions and Scores, Edit Formulas. If you want more control then you are allowed to add to them not allowed out-of-the box HTML tags like: headers, lists, images, hr and "read more" tag taken from post editor.

**Answers** can be global to test — when all questions have the same answers. For example: "Yes", "No", "I'm not sure". Or you can use **individual answers** to add individual answer to each question. And the third option is to use global answers, but individualize their titles: not just "Yes", but "Yes, I do so and so", when you use it for the particular question. Some tests have this pattern.
Expand Down
4 changes: 2 additions & 2 deletions tests/integration-environment/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ function setup_link {

function start_nginx {
log 'Configuring and reloading nginx'
ps ax | grep "[n]ginx -g" && nginx -g "error_log /tmp/wpti/error.log;" -c /tmp/wpti/nginx.conf -s stop
nginx -g "error_log /tmp/wpti/error.log;" -c /tmp/wpti/nginx.conf
ps ax | grep "[n]ginx -c" && nginx -c /tmp/wpti/nginx.conf -g "error_log /tmp/wpti/error.log;" -s stop
nginx -c /tmp/wpti/nginx.conf -g "error_log /tmp/wpti/error.log;"
}

function php_cgi {
Expand Down
3,978 changes: 3,978 additions & 0 deletions tools/intro-video/Wp-testing-Intro.kdenlive

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tools/intro-video/convert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdir -p mkv
ls -1 ogv/* | xargs -n 1 basename -s .ogv | xargs -I {} ffmpeg -y -i ogv/{}.ogv -c copy mkv/{}.mkv
Binary file added tools/intro-video/img/01-title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tools/intro-video/img/01-title.xcf
Binary file not shown.
5 changes: 5 additions & 0 deletions tools/intro-video/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"casperjs": "^1.1.0-beta3"
}
}
76 changes: 76 additions & 0 deletions tools/intro-video/setup-site.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});

casper.options.viewportSize = {width: 1280, height: 850}

casper
.start('http://wpti.dev:8000/')

.thenOpen('http://wpti.dev:8000/wp-login.php', {
method: 'post',
data : {
log: 'wpti',
pwd: 'wpti'
}
})

.thenOpen('http://wpti.dev:8000/wp-admin/profile.php', function() {
this.clickLabel('Blue', 'label')
this.fill('form#your-profile', {
nickname : 'Tests Author',
display_name : 'Tests Author',
email : '[email protected]'
}, true)
}).waitForUrl(/updated/)

.thenOpen('http://wpti.dev:8000/wp-admin/options-general.php', function() {
this.fill('form', {
blogname : 'Psychological tests and quizzes',
blogdescription : 'WordPress testing plugin'
}, true)
}).waitForUrl(/updated/)

.thenOpen('http://wpti.dev:8000/wp-admin/options-permalink.php', function() {
this.click('#permalink_structure')
this.sendKeys('#permalink_structure', '/%postname%/')
this.click('#submit')
}).waitForUrl(/options/)

.thenOpen('http://wpti.dev:8000/wp-admin/customize.php?theme=twentyfifteen', function() {
this.evaluate(function() {
function changeColor(name, value) {
jQuery('#customize-control-' + name + ' .wp-color-picker')
.val(value)
.change();
};

changeColor('background_color', '#e0e046');
changeColor('sidebar_textcolor', '#1B380F');
changeColor('header_background_color', '#b8f741');

})

this.click('#save')
}).waitForText('Saved')

.thenOpen('http://wpti.dev:8000/wp-admin/plugins.php', function () {
this.click('#cb input')
this.evaluate(function() {
jQuery('.wrap form select:first').val('activate-selected')
})
this.click('#doaction')
}).waitForUrl(/activate/, null, null, 60000)

.then(function() {
this.click('#cb input')
this.evaluate(function() {
jQuery('.wrap form select:first').val('deactivate-selected')
})
this.click('#doaction')
}).waitForUrl(/deactivate/)

casper.run(function() {
this.exit()
})
12 changes: 12 additions & 0 deletions tools/intro-video/setup-site.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -e

HERE=$(readlink -f $(dirname "$0"))

cd $HERE/../..

tests/integration-environment/create.sh

cd $HERE
PHANTOMJS_EXECUTABLE=node_modules/casperjs/node_modules/.bin/phantomjs node_modules/.bin/casperjs setup-site.js

0 comments on commit 2ba6121

Please sign in to comment.