Skip to content

Instantly share code, notes, and snippets.

————————————————————————————————————————————————————————————————————————————————————————————————————
BBEDIT/TEXTWRANGLER REGULAR EXPRESSION GUIDE MODIFIED 2014-01-13 : 00:12
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
Scenario: Student can search for a user
Given I am viewing the user list
And I have entered the search term "cwl15"
When I press search
Then I will see the following search results:
| cwl15 |
@javascript
Scenario: Student will be suggested search terms to help speed up their search
Given I am viewing the user list

Media Asset Pages powered by a PID should be playable

Given I'm on a media asset page powered by a PID
 When I press play on the video
 Then the video should play

has now become..

Videos authored by UK journalists through system X should be playable on media asset pages

@robsquires
robsquires / transform_not_matching
Created March 17, 2013 17:41
For the given gherkin feature the standard step definitions are matching not problem. However, the @Transform is not being matched. Is the syntax correct?
for the given scenario:
Scenario: I can drill down by product line
Given I have searched for "light sources"
And I have selected the category "led"
When I select the product line "Track 3"
Then I should see products:
| name |
| Test Product 3 |
@robsquires
robsquires / selenium treats
Created September 6, 2013 01:03
code snippets to aid error diagnosis when using phantomjs
catching uncaught JS errors
//put this in your <head>
<script type="text/javascript" >
window.jsErrors = [];
window.onerror = function() {
window.jsErrors[window.jsErrors.length] = arguments;
}
</script>
@robsquires
robsquires / set-auth-cookie.php
Created December 10, 2013 09:52
set cookie (maybe for authentication) when using WebApiDriver
@robsquires
robsquires / pre-commit
Created April 8, 2016 12:40
Run jshint on git commit
#!/bin/sh
# You'll need Jshint available, perhaps 'npm install -g jshint'
files=$(git diff --cached --name-only --diff-filter=ACM | grep "\.js$")
if [ "$files" = "" ]; then
exit 0
fi
pass=true
@robsquires
robsquires / prepare-commit-msg
Last active September 14, 2017 16:23
Pre populate the jira prefix on commit messages
# abort if .git-hooks is not present
# add .git-hooks to .git-ignore so people can opt-in
if [ ! -f .git-hooks ]; then
exit 0
fi
# some commit operations we dont want to prefix the message
if [[ "$2" == "merge" || "$2" == "commit" || "$2" == "template" || "$2" == "squash" ]]; then
echo "Not a regular commit so ignoring.."
exit 0
@robsquires
robsquires / bubbles-data.md
Last active May 1, 2020 08:40
Outlines what data is currently used by the bubbles

From Myft API follows data

Returns array of concepts:

[
    {
        conceptId,
        conceptName
 },