This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"customer": { | |
"first_name": "Jakob", | |
"last_name": "Lindberg", | |
"tel": "0705111111", | |
"email": "[email protected]" | |
}, | |
"appointment": { | |
"title": "Telefonmöte", | |
"start_date": "2020-12-01 13:00:00", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Test Complete Order' (browser) { | |
browser | |
.url( 'http://lavendla.se.dev.synot.io/test/' ) | |
.waitForElementVisible( '.cart', 5000 ) | |
.click( '.go-to-checkout' ) // This didn't work | |
.execute(function() { // This DID work! | |
document.querySelector('.go-to-checkout').click() | |
}) | |
// ...test something | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
'Test Something' (browser) { | |
browser | |
.url( 'https://wordpress.org/' ) | |
.waitForElementVisible( '#download' ) | |
.click( '#download' ) | |
.waitForElementVisible( '.download-meta' ) | |
.assert.urlContains( 'download' ) | |
.end(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const seleniumServer = require("selenium-server"); | |
const chromedriver = require("chromedriver"); | |
module.exports = { | |
"src_folders": [ | |
"tests/e2e" // Change this to the directory where your test are | |
], | |
"output_folder": "./reports", // the directory for your rest reports | |
"selenium": { | |
"start_process": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class Singelton { | |
/** | |
* @var null|Singleton | |
*/ | |
protected static $instance = null; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp post update $(wp post list --post_type='page' --post_status='publish' --format=ids) --post_status='publish' --defer-term-counting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// in javascript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value | |
function pacsoft_enqueue(){ | |
wp_enqueue_script('jquery'); | |
// You can't hardcode the path to a plugin directory. WordPress may rename it. | |
// Below is incorrect. | |
// wp_register_script( 'pacsoft-script', plugins_url( '/woocommerce-pacsoft-unifaun/js/pacsoft.js' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register widget area. | |
* | |
* @link http://codex.wordpress.org/Function_Reference/register_sidebar | |
*/ | |
add_action( 'widgets_init', function() { | |
register_sidebar([ | |
'name' => __( 'Sidebar', 'shipyard' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name www.site.com; | |
return 301 $scheme://site.com$request_uri; | |
} | |
server { | |
listen 80; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: NGINX FastCGI cache purge | |
* Version: 0.1 | |
* Description: Flush NGINX FastCGI cache purge | |
* Author: The Shipyard Crew | |
* Author URI: https://theshipyard.se/ | |
* Plugin URI: https://theshipyard.se/ | |
* Text Domain: nginx-fastcgi-cache-purge |
NewerOlder