git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<?php | |
/** | |
* @Given /^The element "(?P<selector>[^"]*)" should have a css property "(?P<property>[^"]*)" with a value of "(?P<value>[^"]*)"$/ | |
* | |
* @TODO Need to find a way to test for css styles on elements. | |
* Or possibly we should just be checking the markup, and not the styling... Research this more. | |
*/ | |
public function assertElementHasCssValue($selector, $property, $value) | |
{ | |
$page = $this->getSession()->getPage(); |
$sprite-color-position: 1; | |
$sprite-section-height: 33; | |
$sprite-total-image-height: 198; | |
$desired-button-height: 66px; | |
background-position: 0 calc (-3 * #{$desired-button-height}); | |
background-size: 2px calc(#{$sprite-total-image-height}px * 2); | |
background-position: 0 calc(-1 * (#{$sprite-color-position} - 1) * #{$sprite-section-height}px / #{$desired-button-height}); | |
// background size: width height; | |
height: $desired-button-height; |
/** | |
* @AfterStep | |
*/ | |
public function takeScreenShotAfterFailedStep(afterStepScope $scope) | |
{ | |
if (99 === $scope->getTestResult()->getResultCode()) { | |
$driver = $this->getSession()->getDriver(); | |
$filePath = getcwd() . DIRECTORY_SEPARATOR . 'screenshots'; |
// Include the following step definition in your FeatureContext.php file: | |
/** | |
* @Given /^I set browser window size to "([^"]*)" x "([^"]*)"$/ | |
*/ | |
public function iSetBrowserWindowSizeToX($width, $height) | |
{ | |
$this->getSession()->resizeWindow((int)$width, (int)$height, 'current'); | |
} |
Template: | |
{% if <codename-1> %} | |
<ul class="social-links-menu"> | |
{% for <codename-2> in <codename-1> %} | |
<li> | |
<a href="{{<codename-2>.<repeater-subfield>}}"> | |
{{ <codename-2>.<some-other-repeater-subfield> }} | |
</a> | |
</li> | |
{% endfor %} |
We're installing our Pantheon D8 sites in /web to **provoke** merge conflicts and thus prevent us from appliying Pantheon's one click updates from the dashboard. We're using composer to manage our D8 sites, which is incompatible with the one-click updates. (So this isn't a bug, it's a feature!) Happily, we're pretty sure that Pantheon have moved all their magical secret sauce into modules and the settings file. In theory, none of it is in core anymore. | |
Instead: | |
1. Pull a copy of the site onto your local | |
2. Navigate to the /web directory of your site | |
3. Use `composer update drupal/core --with-dependencies` to update using composer | |
- Unfortunately, Composer sometimes installs nested .git directories, which make Pantheon very unhappy. So after you've updated, you need to find and remove any nested .git directories: | |
4. Run `find . -name .git -type d -prune` to get a list of any new .git directories hiding in the bowels of your install. You might see something like: `/web/vendor/afdafaf/adsfasdfdas/. |