├── Templates
└── WatirCuke Template.tmTemplate
│ ├── template.feature
│ └── info.plist
├── Snippets
├── Debug.tmSnippet
├── Div.tmSnippet
├── Image.tmSnippet
├── Refresh.tmSnippet
├── Button.tmSnippet
├── List.tmSnippet
├── Radio.tmSnippet
├── Checkbox.tmSnippet
├── Screenshot.tmSnippet
├── Sleep for.tmSnippet
├── Path go to url.tmSnippet
├── Path on a page.tmSnippet
├── Check all objects.tmSnippet
├── Table.tmSnippet
├── Link.tmSnippet
├── Check image.tmSnippet
├── Check text.tmSnippet
├── Sleep until.tmSnippet
├── Check span.tmSnippet
├── Text Field.tmSnippet
├── Check sentence.tmSnippet
├── File Field.tmSnippet
└── Date Field.tmSnippet
├── info.plist
└── README
/Templates/WatirCuke Template.tmTemplate/template.feature:
--------------------------------------------------------------------------------
1 | Feature: New feature
2 | In order to value
3 | As a role
4 | I want feature
5 |
6 |
7 | Scenario: New scenario
8 | Given
9 | When
10 | Then
--------------------------------------------------------------------------------
/Snippets/Debug.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I debug
7 | name
8 | Debug
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | debug
13 | uuid
14 | 1D16B11C-9639-43EE-B083-6236381B2468
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Div.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I click the "${1:name}" div
7 | name
8 | Div
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | div
13 | uuid
14 | 2D46E4F5-8D1C-46D6-A9C9-57CAAE94EE1C
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Image.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I click the "${1:image}" image
7 | name
8 | Image
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | image
13 | uuid
14 | B72DB7CB-0A52-4D5F-8EC1-EDD080712F28
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Refresh.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I refresh the page
7 |
8 | name
9 | Refresh
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | refresh
14 | uuid
15 | FCE99152-B4E6-488F-881D-C1FD128548A5
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Button.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I click the "${1:button}" button
7 | name
8 | Button
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | button
13 | uuid
14 | A66C40B3-DB61-4D74-86E8-5ACF3298511E
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/List.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I select "${1:some}" from "${2:from list}"
7 | name
8 | List
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | list
13 | uuid
14 | FF3F91F6-852F-4AC9-8B4C-1429718902D5
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Radio.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I click the "${1:radio}" radio button
7 | name
8 | Radio
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | radio
13 | uuid
14 | 6A6F9DCF-FB51-45EC-A722-11720690C9F1
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Checkbox.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I click the "${1:name}" checkbox
7 | name
8 | Checkbox
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | checkbox
13 | uuid
14 | 0E5E0338-D31E-4D2F-9C78-F91F24CF8664
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Screenshot.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I take a screenshot
7 |
8 | name
9 | Screenshot
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | screenshot
14 | uuid
15 | 457C482F-10BE-4392-BA6A-8D3D4A911207
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Sleep for.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I sleep for "${1:seconds}"
7 |
8 | name
9 | Sleep for
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | sleep
14 | uuid
15 | 7AB85550-67B0-4ABB-984E-1B743F556B7E
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Path go to url.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I go to "${1:some url}"
7 |
8 | name
9 | Path go to url
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | goto
14 | uuid
15 | D09EB148-49AF-4E52-8F8D-ED73AFC9CC30
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Path on a page.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I am on the "${1:page}" page
7 |
8 | name
9 | Path on a page
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | on
14 | uuid
15 | 048A7411-204B-4BE5-A9D2-4366664AAFD7
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Check all objects.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I check all objects
7 |
8 | name
9 | Check all objects
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | check_all
14 | uuid
15 | 3D7675F8-AED7-45FE-921C-A4CD5DFA28F3
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Table.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I click row "${1:some}" in the "${2:some table}" table
7 | name
8 | Table
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | table
13 | uuid
14 | 6185645D-D0EF-4A3C-9DD1-264464EBEC06
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Link.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I ${1:click/onmouseover} the "${2:link name}" link${3: with alert}
7 | name
8 | Link
9 | scope
10 | text.gherkin.feature
11 | tabTrigger
12 | link
13 | uuid
14 | 11E7F92F-0FF2-4D48-90CD-85EBE653A1E0
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/Check image.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I should see the text "${1:some image}" image
7 |
8 | name
9 | Check image
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | check_image
14 | uuid
15 | A0E28135-BF11-430C-801B-E6DBAE6B12AE
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Check text.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I should ${1:NOT }see the text "${2:some text}"
7 |
8 | name
9 | Check text
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | check_text
14 | uuid
15 | E6DACA31-A0C1-4D85-A640-CDB184257800
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Sleep until.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I sleep for ${1:seconds} until I see the text "${2:text}"
7 |
8 | name
9 | Sleep until
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | sleepu
14 | uuid
15 | BAA1E361-A043-48CD-9D04-45BA011DCA18
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Check span.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I should see the span "${1:some class}" with "${2:some text}"
7 |
8 | name
9 | Check span
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | check_span
14 | uuid
15 | F06FD599-D8E6-4CA9-9A4B-DA18EBC54BD5
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Text Field.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I fill in the text field "${1:text field name}" with "${2:some text}"
7 |
8 | name
9 | Text Field
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | tf
14 | uuid
15 | 2BA97FEC-A33A-4079-8CF8-B79146B9A9E7
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Check sentence.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | It should ${1:NOT }contains the html "${2:some html object}"
7 |
8 | name
9 | Check html
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | check_html
14 | uuid
15 | 17AEF2E3-9C73-45FF-834F-2D0AA360BBA6
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/File Field.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I fill in the file field "${1:file field name}" with "${2:path to file}"
7 |
8 | name
9 | File Field
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | ff
14 | uuid
15 | 7D685147-5DD2-427C-8D7B-25090B704D7B
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Snippets/Date Field.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | I fill in the text field "${1:text field name}" with "${2:yesterday,today, tomorrow,2 days from now, 4 days from now, next monday, next week, next month, next year }"
7 |
8 | name
9 | Date Field
10 | scope
11 | text.gherkin.feature
12 | tabTrigger
13 | df
14 | uuid
15 | 7E7DC7DC-D3AD-4E62-94AF-C396CEF6A011
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Templates/WatirCuke Template.tmTemplate/info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | command
6 | #!/usr/bin/env ruby -wKU
7 | f = open(ENV["TM_NEW_FILE"], 'w')
8 | template = open("template.feature").read
9 |
10 | ENV["TM_YEAR"] = `date +%Y`.chomp
11 | ENV["TM_DATE"] = `date +%Y-%m-%d`.chomp
12 |
13 | if ENV["TM_SOFT_TABS"] == "YES"
14 | tab_size = ENV["TM_TAB_SIZE"].to_i
15 | tab_size = tab_size ? tab_size : 4
16 | template = template.gsub(/\t/, " "*tab_size)
17 | end
18 |
19 | template = template.gsub(/[$]\{([^}]+)\}/){|match| "#{ENV[$1]}" }
20 | f.write template
21 | f.close
22 | extension
23 | feature
24 | name
25 | WatirCuke Template
26 | uuid
27 | F8E6F9E2-35B6-4E6A-934F-9B4AF7CAC68E
28 |
29 |
30 |
--------------------------------------------------------------------------------
/info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | WatirCuke
7 | ordering
8 |
9 | 11E7F92F-0FF2-4D48-90CD-85EBE653A1E0
10 | A66C40B3-DB61-4D74-86E8-5ACF3298511E
11 | B72DB7CB-0A52-4D5F-8EC1-EDD080712F28
12 | 6A6F9DCF-FB51-45EC-A722-11720690C9F1
13 | 0E5E0338-D31E-4D2F-9C78-F91F24CF8664
14 | 2D46E4F5-8D1C-46D6-A9C9-57CAAE94EE1C
15 | 6185645D-D0EF-4A3C-9DD1-264464EBEC06
16 | FF3F91F6-852F-4AC9-8B4C-1429718902D5
17 | 1D16B11C-9639-43EE-B083-6236381B2468
18 | FCE99152-B4E6-488F-881D-C1FD128548A5
19 | 3D7675F8-AED7-45FE-921C-A4CD5DFA28F3
20 | 2BA97FEC-A33A-4079-8CF8-B79146B9A9E7
21 | 7E7DC7DC-D3AD-4E62-94AF-C396CEF6A011
22 | 7D685147-5DD2-427C-8D7B-25090B704D7B
23 | F06FD599-D8E6-4CA9-9A4B-DA18EBC54BD5
24 | 17AEF2E3-9C73-45FF-834F-2D0AA360BBA6
25 | E6DACA31-A0C1-4D85-A640-CDB184257800
26 | A0E28135-BF11-430C-801B-E6DBAE6B12AE
27 | 048A7411-204B-4BE5-A9D2-4366664AAFD7
28 | D09EB148-49AF-4E52-8F8D-ED73AFC9CC30
29 | 7AB85550-67B0-4ABB-984E-1B743F556B7E
30 | BAA1E361-A043-48CD-9D04-45BA011DCA18
31 | 457C482F-10BE-4392-BA6A-8D3D4A911207
32 | F8E6F9E2-35B6-4E6A-934F-9B4AF7CAC68E
33 |
34 | uuid
35 | D814B34F-25F0-44B0-A163-160A0E7BD001
36 |
37 |
38 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | == WatirCuke Bundles ==
2 |
3 | This bundles speeds up writing sentences for watircuke. It works with ".feature" files
4 |
5 | => Textmate:
6 | git clone git://github.com/gs/WatirCuke-Bundles.git Watircuke.tmbundle
7 | osascript -e 'tell app "TextMate" to reload bundles'
8 |
9 | => Sublime 2:
10 | git clone git://github.com/gs/WatirCuke-Bundles.git WatircukeBundle
11 |
12 | => Redcar:
13 | git clone git://github.com/gs/WatirCuke-Bundles.git Watircuke.tmbundle
14 |
15 |
16 | Hope it helps a lot :)
17 |
18 | Below is a list of available actions:
19 |
20 | Actions:
21 |
22 | link[tab] I click the "some" button
23 | checkbox[tab] I click the "some" checkbox
24 | image[tab] I click the "some" image
25 | link[tab] I click/onmouseover the "some" link (with alert)
26 | radio[tab] I click the "some" radio button
27 | table[tab] I click row "some" in the "some" table
28 | list[tab] I select "some" from "from list"
29 | tf[tab] I fill in the text field "text field name" with "some text"
30 | df[tab] I fill in the date field "text field name" with "fraze (from http://chronic.rubyforge.org/ are supported)"
31 |
32 | ff[tab] I fill in the file field "file field name" with "file path"
33 | div[tab] I click the "some" div
34 | screenshot[tab] I take a screenshot
35 | debug[tab] I debug
36 | refresh[tab] I refresh the page
37 |
38 | Check results:
39 | check_image[tab] Then I should see the "some image" image
40 | check_span[tab] Then I should see the span "some class" with "some text"
41 | check_sentence[tab] Then I should (NOT )?see the sentence "some sentence"
42 | check_text[tab] Then I should (NOT )?see the text "some text"
43 | check_html[tab] Then It should NOT contains the html "some html object"
44 | check_all[tab] Then I check all objects (this will dump all page objects to file)
45 |
46 | Paths redirection:
47 | red[tab] I am redirected to "some"
48 | on[tab] I am on the "server" page
49 | goto[tab] I go to "some url"
50 | sleep[tab] I sleep for "some"
51 | sleepu[tab] I sleep until I see the text "text"
52 |
53 |
54 | LICENCE MIT
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------