From 26b28f0004115632e52edc9bb5847aff09028307 Mon Sep 17 00:00:00 2001 From: t-hiroyoshi Date: Thu, 23 Apr 2015 08:42:51 +0900 Subject: [PATCH 1/6] Add grammers. --- grammars/atom-shouldbee.cson | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 grammars/atom-shouldbee.cson diff --git a/grammars/atom-shouldbee.cson b/grammars/atom-shouldbee.cson new file mode 100644 index 0000000..e69de29 From d110a74382c8f62e811d5571a3e8004c1b4a43f7 Mon Sep 17 00:00:00 2001 From: t-hiroyoshi Date: Thu, 23 Apr 2015 23:39:00 +0900 Subject: [PATCH 2/6] Add filetypes in grammars. --- grammars/atom-shouldbee.cson | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grammars/atom-shouldbee.cson b/grammars/atom-shouldbee.cson index e69de29..1481d3b 100644 --- a/grammars/atom-shouldbee.cson +++ b/grammars/atom-shouldbee.cson @@ -0,0 +1,6 @@ +'fileTypes': [ + 'markdown' + 'md' + 'mkd' + 'mkdown' +] From 8dcac7ddb66af78a88a4d2920b239372419232b1 Mon Sep 17 00:00:00 2001 From: t-hiroyoshi Date: Thu, 23 Apr 2015 23:57:44 +0900 Subject: [PATCH 3/6] Chenge the file name from atom-shouldbee.cson to shouldbee.cson. --- grammars/atom-shouldbee.cson | 6 ------ grammars/shouldbee.cson | 13 +++++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 grammars/atom-shouldbee.cson create mode 100644 grammars/shouldbee.cson diff --git a/grammars/atom-shouldbee.cson b/grammars/atom-shouldbee.cson deleted file mode 100644 index 1481d3b..0000000 --- a/grammars/atom-shouldbee.cson +++ /dev/null @@ -1,6 +0,0 @@ -'fileTypes': [ - 'markdown' - 'md' - 'mkd' - 'mkdown' -] diff --git a/grammars/shouldbee.cson b/grammars/shouldbee.cson new file mode 100644 index 0000000..b57ca42 --- /dev/null +++ b/grammars/shouldbee.cson @@ -0,0 +1,13 @@ +'scopeName': 'source.gfm' +'name': 'shouldbee' +'fileTypes': [ + 'markdown' + 'md' + 'mkd' + 'mkdown' + 'gfm' +] +'firstLineMatch': '' +'patterns': [ + +] From fecc28e61b9edf6d5e6eb281d24bd87e7e696298 Mon Sep 17 00:00:00 2001 From: t-hiroyoshi Date: Wed, 29 Apr 2015 22:50:22 +0900 Subject: [PATCH 4/6] Edit some file. --- grammars/shouldbee.cson | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/grammars/shouldbee.cson b/grammars/shouldbee.cson index b57ca42..de01388 100644 --- a/grammars/shouldbee.cson +++ b/grammars/shouldbee.cson @@ -3,11 +3,16 @@ 'fileTypes': [ 'markdown' 'md' + 'mdown' 'mkd' 'mkdown' - 'gfm' + 'rmd' + 'ron' ] -'firstLineMatch': '' 'patterns': [ - + { + 'begin': '「' + 'end': '」' + 'name': 'name.object.gfm' + } ] From e3e7716eeeee5ddfab49b54e0027147c626dcc24 Mon Sep 17 00:00:00 2001 From: t-hiroyoshi Date: Fri, 1 May 2015 14:15:53 +0900 Subject: [PATCH 5/6] Add some grammars. --- grammars/shouldbee.cson | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/grammars/shouldbee.cson b/grammars/shouldbee.cson index de01388..b66d094 100644 --- a/grammars/shouldbee.cson +++ b/grammars/shouldbee.cson @@ -15,4 +15,52 @@ 'end': '」' 'name': 'name.object.gfm' } + { + 'match': '.*こと' + 'check.step.gfm' + } + '「${1:要素名}」エレメントをクリックする' + '画面に「${1:テキスト}」と表示されていること' + '画面に「${1:テキスト}」と表示されていないこと' + '「${1:要素名}」に「${2:テキスト}」と表示されていること' + '「${1:要素名}」に「${2:テキスト}」と表示されていないこと' + '「${1:要素名}」の「${2:属性名}」属性に「${3:テキスト}」が含まれていること' + '「${1:要素名}」の「${2:属性名}」属性に「${3:テキスト}」が含まれていないこと' + '「${1:テキスト1}」と「${2:テキスト2}」が一致すること' + '「${1:テキスト}」テキストが正規表現「${2:正規表現}」に一致すること' + '$テキスト =「${1:エレメント名}」エレメントのテキスト' + '「${1:URL}」に移動する' + '「${1:リンク名}」のリンク先へ移動する' + 'トップページに移動する' + '履歴の次のページへ進む' + '履歴の前のページに戻る' + 'ページをリロードする' + 'URLが「${1:URL}」であること' + 'URLが「${1:URL}」でないこと' + '「${1:フィールド名}」フィールドに「${2:入力値}」と入力する' + '「${1:ボタン名}」ボタンをクリックする' + '「${1:選択値}」という値を「${2:セレクトボックス名}」から選択する' + '「${1:チェックボックス名}」にチェックをつける' + '「${1:チェックボックス名}」のチェックをはずす' + '「${1:チェックボックス名}」の「${2:選択肢}」にチェックを入れる' + '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドに「${3:入力値}」と入力する' + '「${1:フォーム名}」フォームの「${2:ボタン名}」ボタンをクリックする' + '「${1:フィールド名}」フィールドにフォーカスを当てる' + '「${1:キー}」キーを押す' + '「${1:フィールド名}」フィールドの値が「${2:入力値}」であること' + '「${1:フィールド名}」フィールドの値が「${2:入力値}」でないこと' + '「${1:セレクトボックス名}」セレクトで「${2:選択値}」が選択されていること' '「${1:セレクトボックス名}」セレクトで「${2:選択値}」が選択されていないこと' 'チェックボックス「${1:チェックボックス名}」のチェックがついていること' 'チェックボックス「${1:チェックボックス名}」のチェックがはずれていること' '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドの値が「${3:入力値}」であること' '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドの値が「${3:入力値}」でないこと' '「${1:フィールド名}」フィールドにフォーカスが当たっていること' '「${1:チェックボックス名}」の「${2:選択肢}」にチェックが入っていること' '画面に「${1:ボタン名}」ボタンがあること' '「${1:リスト名}」の中に重複がないこと' '「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目のテキストが「${4:テキスト}」であること' '「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目の背景色が「${4:#000}」であること' + '「${1:テーブル名}」テーブルの「${2:検索する列番号}」列目が「${3:条件}」の「${4:合計する列番号}」列目を合計する' + '$行番号 =「${1:テーブル名}」テーブルの「列番号」列目のテキストが「テキスト」の行番号' + '$テキスト =「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目のテキスト' + 'ウィンドウを最大化する' + 'ウィンドウを幅「${1:横幅}」px、縦「${2:縦幅}」pxに変更する' + 'ウィンドウを「${1:タイトル名}」に切り替える' + '開いたウィンドウに切り替える' + '元のウィンドウに戻す' + 'アラートを閉じる' + 'アラートに「${1:メッセージ}」と表示されていること' + '確認ダイアログに「${1:メッセージ}」と表示されていること' + '$数値 =「${1:テキスト}」から数値を抜き出す' + '$計算結果 =「${1:keisanshiki}」の計算結果' ] From 6c017aed3c6c931a337fa577d00207a2e462b5a2 Mon Sep 17 00:00:00 2001 From: t-hiroyoshi Date: Wed, 29 Jul 2015 13:14:49 +0900 Subject: [PATCH 6/6] add snippets --- LICENSE.md | 2 +- grammars/shouldbee.cson | 63 +---- keymaps/atom-shouldbee.cson | 11 - lib/atom-shouldbee-view.coffee | 22 -- lib/atom-shouldbee.coffee | 33 --- menus/atom-shouldbee.cson | 22 -- package.json | 12 +- snippets/atom-shouldbee.cson | 350 ++++++++++++++------------- spec/atom-shouldbee-spec.coffee | 62 ----- spec/atom-shouldbee-view-spec.coffee | 5 - 10 files changed, 190 insertions(+), 392 deletions(-) delete mode 100644 keymaps/atom-shouldbee.cson delete mode 100644 lib/atom-shouldbee-view.coffee delete mode 100644 lib/atom-shouldbee.coffee delete mode 100644 menus/atom-shouldbee.cson delete mode 100644 spec/atom-shouldbee-spec.coffee delete mode 100644 spec/atom-shouldbee-view-spec.coffee diff --git a/LICENSE.md b/LICENSE.md index 40a0eeb..f39857d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015 +Copyright (c) 2015 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/grammars/shouldbee.cson b/grammars/shouldbee.cson index b66d094..68e973a 100644 --- a/grammars/shouldbee.cson +++ b/grammars/shouldbee.cson @@ -1,66 +1,9 @@ -'scopeName': 'source.gfm' -'name': 'shouldbee' +'scopeName': 'source.md' +'name': 'ShouldBee Test Script' 'fileTypes': [ 'markdown' 'md' - 'mdown' - 'mkd' - 'mkdown' - 'rmd' - 'ron' + 'gfm' ] 'patterns': [ - { - 'begin': '「' - 'end': '」' - 'name': 'name.object.gfm' - } - { - 'match': '.*こと' - 'check.step.gfm' - } - '「${1:要素名}」エレメントをクリックする' - '画面に「${1:テキスト}」と表示されていること' - '画面に「${1:テキスト}」と表示されていないこと' - '「${1:要素名}」に「${2:テキスト}」と表示されていること' - '「${1:要素名}」に「${2:テキスト}」と表示されていないこと' - '「${1:要素名}」の「${2:属性名}」属性に「${3:テキスト}」が含まれていること' - '「${1:要素名}」の「${2:属性名}」属性に「${3:テキスト}」が含まれていないこと' - '「${1:テキスト1}」と「${2:テキスト2}」が一致すること' - '「${1:テキスト}」テキストが正規表現「${2:正規表現}」に一致すること' - '$テキスト =「${1:エレメント名}」エレメントのテキスト' - '「${1:URL}」に移動する' - '「${1:リンク名}」のリンク先へ移動する' - 'トップページに移動する' - '履歴の次のページへ進む' - '履歴の前のページに戻る' - 'ページをリロードする' - 'URLが「${1:URL}」であること' - 'URLが「${1:URL}」でないこと' - '「${1:フィールド名}」フィールドに「${2:入力値}」と入力する' - '「${1:ボタン名}」ボタンをクリックする' - '「${1:選択値}」という値を「${2:セレクトボックス名}」から選択する' - '「${1:チェックボックス名}」にチェックをつける' - '「${1:チェックボックス名}」のチェックをはずす' - '「${1:チェックボックス名}」の「${2:選択肢}」にチェックを入れる' - '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドに「${3:入力値}」と入力する' - '「${1:フォーム名}」フォームの「${2:ボタン名}」ボタンをクリックする' - '「${1:フィールド名}」フィールドにフォーカスを当てる' - '「${1:キー}」キーを押す' - '「${1:フィールド名}」フィールドの値が「${2:入力値}」であること' - '「${1:フィールド名}」フィールドの値が「${2:入力値}」でないこと' - '「${1:セレクトボックス名}」セレクトで「${2:選択値}」が選択されていること' '「${1:セレクトボックス名}」セレクトで「${2:選択値}」が選択されていないこと' 'チェックボックス「${1:チェックボックス名}」のチェックがついていること' 'チェックボックス「${1:チェックボックス名}」のチェックがはずれていること' '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドの値が「${3:入力値}」であること' '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドの値が「${3:入力値}」でないこと' '「${1:フィールド名}」フィールドにフォーカスが当たっていること' '「${1:チェックボックス名}」の「${2:選択肢}」にチェックが入っていること' '画面に「${1:ボタン名}」ボタンがあること' '「${1:リスト名}」の中に重複がないこと' '「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目のテキストが「${4:テキスト}」であること' '「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目の背景色が「${4:#000}」であること' - '「${1:テーブル名}」テーブルの「${2:検索する列番号}」列目が「${3:条件}」の「${4:合計する列番号}」列目を合計する' - '$行番号 =「${1:テーブル名}」テーブルの「列番号」列目のテキストが「テキスト」の行番号' - '$テキスト =「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目のテキスト' - 'ウィンドウを最大化する' - 'ウィンドウを幅「${1:横幅}」px、縦「${2:縦幅}」pxに変更する' - 'ウィンドウを「${1:タイトル名}」に切り替える' - '開いたウィンドウに切り替える' - '元のウィンドウに戻す' - 'アラートを閉じる' - 'アラートに「${1:メッセージ}」と表示されていること' - '確認ダイアログに「${1:メッセージ}」と表示されていること' - '$数値 =「${1:テキスト}」から数値を抜き出す' - '$計算結果 =「${1:keisanshiki}」の計算結果' ] diff --git a/keymaps/atom-shouldbee.cson b/keymaps/atom-shouldbee.cson deleted file mode 100644 index 9712daa..0000000 --- a/keymaps/atom-shouldbee.cson +++ /dev/null @@ -1,11 +0,0 @@ -# Keybindings require three things to be fully defined: A selector that is -# matched against the focused element, the keystroke and the command to -# execute. -# -# Below is a basic keybinding which registers on all platforms by applying to -# the root workspace element. - -# For more detailed documentation see -# https://atom.io/docs/latest/behind-atom-keymaps-in-depth -'atom-workspace': - 'ctrl-shift-s': 'atom-shouldbee:toggle' diff --git a/lib/atom-shouldbee-view.coffee b/lib/atom-shouldbee-view.coffee deleted file mode 100644 index f17c31d..0000000 --- a/lib/atom-shouldbee-view.coffee +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = -class AtomShouldbeeView - constructor: (serializedState) -> - # Create root element - @element = document.createElement('div') - @element.classList.add('atom-shouldbee') - - # Create message element - message = document.createElement('div') - message.textContent = "Atom ShouldBee Mode On!" - message.classList.add('message') - @element.appendChild(message) - - # Returns an object that can be retrieved when package is activated - serialize: -> - - # Tear down any state and detach - destroy: -> - @element.remove() - - getElement: -> - @element diff --git a/lib/atom-shouldbee.coffee b/lib/atom-shouldbee.coffee deleted file mode 100644 index fe4deaf..0000000 --- a/lib/atom-shouldbee.coffee +++ /dev/null @@ -1,33 +0,0 @@ -AtomShouldbeeView = require './atom-shouldbee-view' -{CompositeDisposable} = require 'atom' - -module.exports = AtomShouldbee = - atomShouldbeeView: null - modalPanel: null - subscriptions: null - - activate: (state) -> - @atomShouldbeeView = new AtomShouldbeeView(state.atomShouldbeeViewState) - @modalPanel = atom.workspace.addModalPanel(item: @atomShouldbeeView.getElement(), visible: false) - - # Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable - @subscriptions = new CompositeDisposable - - # Register command that toggles this view - @subscriptions.add atom.commands.add 'atom-workspace', 'atom-shouldbee:toggle': => @toggle() - - deactivate: -> - @modalPanel.destroy() - @subscriptions.dispose() - @atomShouldbeeView.destroy() - - serialize: -> - atomShouldbeeViewState: @atomShouldbeeView.serialize() - - toggle: -> - console.log 'AtomShouldbee was toggled!' - - if @modalPanel.isVisible() - @modalPanel.hide() - else - @modalPanel.show() diff --git a/menus/atom-shouldbee.cson b/menus/atom-shouldbee.cson deleted file mode 100644 index 189c046..0000000 --- a/menus/atom-shouldbee.cson +++ /dev/null @@ -1,22 +0,0 @@ -# See https://atom.io/docs/latest/hacking-atom-package-word-count#menus for more details -'context-menu': - 'atom-text-editor': [ - { - 'label': 'Toggle atom-shouldbee' - 'command': 'atom-shouldbee:toggle' - } - ] -'menu': [ - { - 'label': 'Packages' - 'submenu': [ - 'label': 'atom-shouldbee' - 'submenu': [ - { - 'label': 'Toggle' - 'command': 'atom-shouldbee:toggle' - } - ] - ] - } -] diff --git a/package.json b/package.json index 330836e..403f5be 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,8 @@ { "name": "atom-shouldbee", - "main": "./lib/atom-shouldbee", "version": "0.0.0", - "description": "Make it easy to develop ShouldBee test scripts on Atom editor.", - "activationCommands": { - "atom-workspace": "atom-shouldbee:toggle" - }, + "description": "Make it easy to develop ShouldBee test scripts on Atom", "repository": "https://github.com/shouldbee/atom-shouldbee", "license": "MIT", - "engines": { - "atom": ">=0.174.0 <2.0.0" - }, - "dependencies": { - } + "engines": {"atom": "<2.0.0"} } diff --git a/snippets/atom-shouldbee.cson b/snippets/atom-shouldbee.cson index d8e22ab..2bbe491 100644 --- a/snippets/atom-shouldbee.cson +++ b/snippets/atom-shouldbee.cson @@ -1,166 +1,184 @@ -'.source.gfm': - '「要素名」エレメントをクリックする': - 'prefix' : 'エレメントクリック' - 'body' : '「${1:要素名}」エレメントをクリックする' - '画面に「テキスト」と表示されていること': - 'prefix' : '画面テキスト表示' - 'body' : '画面に「${1:テキスト}」と表示されていること' - '画面に「テキスト」と表示されていないこと': - 'prefix' : '画面テキスト表示なし' - 'body' : '画面に「${1:テキスト}」と表示されていないこと' - '「要素名」に「テキスト」と表示されていること': - 'prefix' : '要素テキスト表示' - 'body' : '「${1:要素名}」に「${2:テキスト}」と表示されていること' - '「要素名」に「テキスト」と表示されていないこと': - 'prefix' : '要素テキスト表示なし' - 'body' : '「${1:要素名}」に「${2:テキスト}」と表示されていないこと' - '「要素名」の「属性名」属性に「テキスト」が含まれていること': - 'prefix' : '要素属性含む' - 'body' : '「${1:要素名}」の「${2:属性名}」属性に「${3:テキスト}」が含まれていること' - '「要素名」の「属性名」属性に「テキスト」が含まれていないこと': - 'prefix' : '要素属性含まない' - 'body' : '「${1:要素名}」の「${2:属性名}」属性に「${3:テキスト}」が含まれていないこと' - '「テキスト1」と「テキスト2」が一致すること': - 'prefix' : 'テキスト一致' - 'body' : '「${1:テキスト1}」と「${2:テキスト2}」が一致すること' - '「テキスト」テキストが正規表現「正規表現」に一致すること': - 'prefix' : 'テキスト正規表現一致' - 'body' : '「${1:テキスト}」テキストが正規表現「${2:正規表現}」に一致すること' - '$テキスト =「エレメント名」エレメントのテキスト': - 'prefix' : 'エレメントテキスト取得' - 'body' : '$テキスト =「${1:エレメント名}」エレメントのテキスト' - '「URL」に移動する': - 'prefix' : '移動' - 'body' : '「${1:URL}」に移動する' - '「リンク名」のリンク先へ移動する': - 'prefix' : 'リンクへ移動' - 'body' : '「${1:リンク名}」のリンク先へ移動する' - 'トップページに移動する': - 'prefix' : 'トップページ' - 'body' : 'トップページに移動する' - '履歴の次のページへ進む': - 'prefix' : '進む' - 'body' : '履歴の次のページへ進む' - '履歴の前のページに戻る': - 'prefix' : '戻る' - 'body' : '履歴の前のページに戻る' - 'ページをリロードする': - 'prefix' : '更新' - 'body' : 'ページをリロードする' - 'URLが「URL」であること': - 'prefix' : 'URL確認' - 'body' : 'URLが「${1:URL}」であること' - 'URLが「URL」でないこと': - 'prefix' : 'URLでない' - 'body' : 'URLが「${1:URL}」でないこと' - '「フィールド名」フィールドに「入力値」と入力する': - 'prefix' : 'フィールド入力' - 'body' : '「${1:フィールド名}」フィールドに「${2:入力値}」と入力する' - '「ボタン名」ボタンをクリックする': - 'prefix' : 'ボタンクリック' - 'body' : '「${1:ボタン名}」ボタンをクリックする' - '「選択値」という値を「セレクトボックス名」から選択する': - 'prefix' : 'セレクトボックス選択' - 'body' : '「${1:選択値}」という値を「${2:セレクトボックス名}」から選択する' - '「チェックボックス名」にチェックをつける': - 'prefix' : 'セレクトボックスチェック' - 'body' : '「${1:チェックボックス名}」にチェックをつける' - '「チェックボックス名」のチェックをはずす': - 'prefix' : 'セレクトボックスアンチェック' - 'body' : '「${1:チェックボックス名}」のチェックをはずす' - '「チェックボックス名」の「選択肢」にチェックを入れる': - 'prefix' : 'セレクトボックス選択チェック' - 'body' : '「${1:チェックボックス名}」の「${2:選択肢}」にチェックを入れる' - '「フォーム名」フォームの「フィールド名」フィールドに「入力値」と入力する': - 'prefix' : 'フォームフィールド入力' - 'body' : '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドに「${3:入力値}」と入力する' - '「フォーム名」フォームの「ボタン名」ボタンをクリックする': - 'prefix' : 'フォームボタンクリック' - 'body' : '「${1:フォーム名}」フォームの「${2:ボタン名}」ボタンをクリックする' - '「フィールド名」フィールドにフォーカスを当てる': - 'prefix' : 'フォームフォーカス' - 'body' : '「${1:フィールド名}」フィールドにフォーカスを当てる' - '「キー」キーを押す': - 'prefix' : 'キー' - 'body' : '「${1:キー}」キーを押す' - '「フィールド名」フィールドの値が「入力値」であること': - 'prefix' : 'フィールド確認' - 'body' : '「${1:フィールド名}」フィールドの値が「${2:入力値}」であること' - '「フィールド名」フィールドの値が「入力値」でないこと': - 'prefix' : 'フィールド確認なし' - 'body' : '「${1:フィールド名}」フィールドの値が「${2:入力値}」でないこと' - '「セレクトボックス名」セレクトで「選択値」が選択されていること': - 'prefix' : 'セレクトボックス確認' - 'body' : '「${1:セレクトボックス名}」セレクトで「${2:選択値}」が選択されていること' - '「セレクトボックス名」セレクトで「選択値」が選択されていないこと': - 'prefix' : 'セレクトボックス確認なし' - 'body' : '「${1:セレクトボックス名}」セレクトで「${2:選択値}」が選択されていないこと' - 'チェックボックス「チェックボックス名」のチェックがついていること': - 'prefix' : 'セレクトボックス確認チェック' - 'body' : 'チェックボックス「${1:チェックボックス名}」のチェックがついていること' - 'チェックボックス「チェックボックス名」のチェックがはずれていること': - 'prefix' : 'セレクトボックス確認チェックなし' - 'body' : 'チェックボックス「${1:チェックボックス名}」のチェックがはずれていること' - '「フォーム名」フォームの「フィールド名」フィールドの値が「入力値」であること': - 'prefix' : 'フォームフィールド確認' - 'body' : '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドの値が「${3:入力値}」であること' - '「フォーム名」フォームの「フィールド名」フィールドの値が「入力値」でないこと': - 'prefix' : 'フォームフィールド確認なし' - 'body' : '「${1:フォーム名}」フォームの「${2:フィールド名}」フィールドの値が「${3:入力値}」でないこと' - '「フィールド名」フィールドにフォーカスが当たっていること': - 'prefix' : 'フィールドフォーカス' - 'body' : '「${1:フィールド名}」フィールドにフォーカスが当たっていること' - '「チェックボックス名」の「選択肢」にチェックが入っていること': - 'prefix' : 'チェックボックス選択確認' - 'body' : '「${1:チェックボックス名}」の「${2:選択肢}」にチェックが入っていること' - '画面に「ボタン名」ボタンがあること': - 'prefix' : 'ボタン確認' - 'body' : '画面に「${1:ボタン名}」ボタンがあること' - '「リスト名」の中に重複がないこと': - 'prefix' : 'リスト確認' - 'body' : '「${1:リスト名}」の中に重複がないこと' - '「テーブル名」テーブルの「行番号」行目「列番号」列目のテキストが「テキスト」であること': - 'prefix' : 'テーブルテキスト確認' - 'body' : '「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目のテキストが「${4:テキスト}」であること' - '「テーブル名」テーブルの「行番号」行目「列番号」列目の背景色が「#000」であること': - 'prefix' : 'テーブル色確認' - 'body' : '「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目の背景色が「${4:#000}」であること' - '「テーブル名」テーブルの「検索する列番号」列目が「条件」の「合計する列番号」列目を合計する': - 'prefix' : 'テーブル合計' - 'body' : '「${1:テーブル名}」テーブルの「${2:検索する列番号}」列目が「${3:条件}」の「${4:合計する列番号}」列目を合計する' - '$行番号 =「テーブル名」テーブルの「列番号」列目のテキストが「テキスト」の行番号': - 'prefix' : 'テーブル行番号取得' - 'body' : '$行番号 =「${1:テーブル名}」テーブルの「列番号」列目のテキストが「テキスト」の行番号' - '$テキスト =「テーブル名」テーブルの「行番号」行目「列番号」列目のテキスト': - 'prefix' : 'テーブルテキスト取得' - 'body' : '$テキスト =「${1:テーブル名}」テーブルの「${2:行番号}」行目「${3:列番号}」列目のテキスト' - 'ウィンドウを最大化する': - 'prefix' : '窓最大化' - 'body' : 'ウィンドウを最大化する' - 'ウィンドウを幅「横幅」px、縦「縦幅」pxに変更する': - 'prefix' : '窓変更' - 'body' : 'ウィンドウを幅「${1:横幅}」px、縦「${2:縦幅}」pxに変更する' - 'ウィンドウを「タイトル名」に切り替える': - 'prefix' : '窓タイトル変更' - 'body' : 'ウィンドウを「${1:タイトル名}」に切り替える' - '開いたウィンドウに切り替える': - 'prefix' : '窓切り替え' - 'body' : '開いたウィンドウに切り替える' - '元のウィンドウに戻す': - 'prefix' : '窓戻す' - 'body' : '元のウィンドウに戻す' - 'アラートを閉じる': - 'prefix' : 'アラート閉じる' - 'body' : 'アラートを閉じる' - 'アラートに「メッセージ」と表示されていること': - 'prefix' : 'アラート確認' - 'body' : 'アラートに「${1:メッセージ}」と表示されていること' - '確認ダイアログに「メッセージ」と表示されていること': - 'prefix' : 'ダイアログ確認' - 'body' : '確認ダイアログに「${1:メッセージ}」と表示されていること' - '$数値 =「テキスト」から数値を抜き出す': - 'prefix' : 'テキスト数値取得' - 'body' : '$数値 =「${1:テキスト}」から数値を抜き出す' - '$計算結果 =「計算式」の計算結果': - 'prefix' : '計算結果取得' - 'body' : '$計算結果 =「${1:keisanshiki}」の計算結果' +'.source.md': + 'Click on Element': + 'prefix' : 'click on element' + 'body' : 'Click on "${1:Element}"' + 'Wait for Seconds': + 'prefix' : 'wait for seconds' + 'body' : 'Wait for "${1:Seconds}" seconds' + 'The Page should contain Text': + 'prefix' : 'the page should contain text' + 'body' : 'The page should contain "${1:Text}"' + 'The Page should not contain Text': + 'prefix' : 'the page should not contain text' + 'body' : 'The page should not contain "${1:Text}"' + 'The Element should contain Text': + 'prefix' : 'the element should contain text' + 'body' : 'The "${1:Element}" element should contain "${2:Text}"' + 'The Element should not contain Text': + 'prefix' : 'the element should not contain text' + 'body' : 'The "${1:Element}" element should not contain "${2:Text}"' + 'The Attribute of Element should contain Text': + 'prefix' : 'the attribute of element should contain text' + 'body' : 'the "${1:Attribute}" attribute of "${2:Element}" should contain "${3:Text}"' + 'The Attribute of Element should not contain Text': + 'prefix' : 'the attribute of element should not contain text' + 'body' : 'the "${1:Attribute}" attribute of "${2:Element}" should not contain "${3:Text}"' + 'Text shoud equal Text': + 'prefix' : 'text should equal text' + 'body' : '"${1:Text}" should equal "${2:Text}"' + 'Text should match Pattern': + 'prefix' : 'text should match pattern' + 'body' : '"${1:Text}" should match "${2:Pattern}"' + 'Text of Element': + 'prefix' : 'the text of element' + 'body' : 'The text of "${1:Element}"' + 'Count the elements which match Css': + 'prefix' : 'Count the elements which math css' + 'body' : 'Count the elements which match "${1:Css Selector}"' + 'Go to Url': + 'prefix' : 'go to Url' + 'body' : 'Go to "${1:Url}"' + 'Follow Link': + 'prefix' : 'follow link' + 'body' : 'Follow "${1:Link}"' + 'Go to the homepage': + 'prefix' : 'go to the homepage' + 'body' : 'Go to the homepage' + 'Move forward one page': + 'prefix' : 'move forward one page' + 'body' : 'Move forward one page' + 'Move backward one page': + 'prefix' : 'move backward one page' + 'body' : 'Move backward one page' + 'Reload the page': + 'prefix' : 'reload the page' + 'body' : 'Reload the page' + 'URL should be Url': + 'prefix' : 'url should be Url' + 'body' : 'The URL should be "${1:Url}"' + 'URL should not be Url': + 'prefix' : 'url should not be Url' + 'body' : 'The URl should not be "${1:Url}"' + 'Fill in Field with Value': + 'prefix' : 'fill in the Field with Value' + 'body' : 'Fill in the "${1:Field}" field with "${2:Value}"' + 'Press Button': + 'prefix' : 'press button' + 'body' : 'Press "${1:Button}" button' + 'Select Option from Select': + 'prefix' : 'select option from select' + 'body' : 'Select "${1:Option}" from "${2:Select}"' + 'Check Checkbox': + 'prefix' : 'check checkbox' + 'body' : 'Check "${1:Checkbox}"' + 'Uncheck Checkbox': + 'prefix' : 'uncheck checkbox' + 'body' : 'Uncheck "${1:Checkbox}"' + 'Check Option in Checkbox': + 'prefix' : 'check option in checkbox' + 'body' : 'Check "${1:Option}" in "${2:Checkbox}"' + 'Fill in the Field in the Form with Value': + 'prefix' : 'fill in the field in the form with value' + 'body' : 'Fill in the "${}" field in the "${}" form with "${}"' + 'Press Button in the Form': + 'prefix' : 'press button in the form' + 'body' : 'Press the "${1:Button}" button in the "${2:Form}" form' + 'Focus on the Fiel': + 'prefix' : 'focus on the field' + 'body' : 'Focus on the "${1:Field}" field' + 'Press Key': + 'prefix' : 'press the key' + 'body' : 'Press the "${1:Key}" key' + 'The value of the Field should be Value': + 'prefix' : 'the value of the field should be value' + 'body' : 'The value of the #{1:Field}" field should be "${2:Value}"' + 'The value of the Field should not be Value': + 'prefix' : 'the value of the field should not be value' + 'body' : 'The value of the #{1:Field}" field should not be "${2:Value}"' + 'Option in Select shoud be selected': + 'prefix' : 'option in select should be selected' + 'body' : '"${1:Option}" in "${2:Select}" should be selected' + 'Option in Select shoud not be selected': + 'prefix' : 'option in select should not be selected' + 'body' : '"${1:Option}" in "${2:Select}" should not be selected' + 'The Checkbox should be checked': + 'prefix' : 'the checkbox should be checked' + 'body' : 'The "${1:Checkbox}" checkbox should be checked' + 'The Checkbox should not be checked': + 'prefix' : 'the checkbox should not be checked' + 'body' : 'The "${1:Checkbox}" checkbox should not be checked' + 'The value of the Field in the Form should be Value': + 'prefix' : 'the value of the field in the form should be value' + 'body' : 'The value of the "${1:Field}" field in the "${2:Form}" form should be "${3:Value}"' + 'The value of the Field in the Form should not be Value': + 'prefix' : 'the value of the field in the form should not be value' + 'body' : 'The value of the "${1:Field}" field in the "${2:Form}" form should not be "${3:Value}"' + 'The Field should have focus': + 'prefix' : 'the field should have focus' + 'body' : 'The "${1:Field}" field shoud have focus' + 'Option in Chechbox should be checked': + 'prefix' : 'option in checkbox should be checked' + 'body' : '"${1:Option}" in "${2:Checkbox}" should be checked' + 'The Button should be shown': + 'prefix' : 'the button should be shown' + 'body' : 'The "${1:Button}" button should be shown' + 'Each items of List should be unique': + 'prefix' : 'each items of list should be unique' + 'body' : 'Each items of "${1:List}" should be unique' + 'The text of the cell in Column and Row in the Table should be Text': + 'prefix' : 'the text of the cell in column and row in the table should be text' + 'body' : 'The text of the cell in "${1:Column number}" column and "${2:Row number}" row in the "${3:Table}" table shoulde be "${4:Text}"' + 'Background color of the cell in Column and Row in the Table shoud be Color': + 'prefix' : 'background color of the cell in column and row in the table should be color' + 'body' : 'Background color of the cell in "${1:Column number}" column and "${2:Row number}" row in the "${3:Table}" table should be "${4:Color code}"' + 'the row number of the cell where Column text equals Text in the Table': + 'prefix' : 'The row number of the cell where column text equals text in the table' + 'body' : 'The row number of the cell where "${1:Column number}" column text equals "${2:Text}" in the "${3:Table}" table' + 'the column number of the cell where Row text equals Text in the Table': + 'prefix' : 'The column umber of the cell where row text equals text in the table' + 'body' : 'The column umber of the cell where "${1:Row number}" column text equals "${2:Text}" in the "${3:Table}" table' + 'The text of the cell in Column and Row in the Table': + 'prefix' : 'the text of the cell in column and row in the table' + 'body' : 'The text of the cell in the "${1:Column number}" column and "${2:Row number}" row in the "${3:Table}" table' + 'The text of the cell in Column and Row in the header of the Table': + 'prefix' : 'the text of the cell in column and row in the header of the table' + 'body' : 'The text of the cell in the "${1:Column number}" column and "${2:Row number}" row in the header of the "${3:Table}" table' + 'Sum of ColumnSum which ColumnSearch is Text in the Table': + 'prefix' : 'sum of the columnsum which columnsearch is text in the table' + 'body' : 'Sum of the "${1:Column number to sum}" column which "${2:Column number to search}" column is "${3:Text}" in the "${4:Table}" table' + 'Maximize the window': + 'prefix' : 'maximize the window' + 'body' : 'Maximize the window' + 'Change window size': + 'prefix' : 'change window size' + 'body' : 'Change window size: width "${1:px}" px, height "${2:px}" px' + 'Open Url in new window': + 'prefix' : 'open url in new window' + 'body' : 'Open "${1:Url}" in new window' + 'Swhitch to Window': + 'prefix' : 'swhitch to window' + 'body' : 'Switch to "${1:Window title}" window' + 'Swhich to the opened window': + 'prefix' : 'swhitch to the opened wiondow' + 'body' : 'Swhitch to the opened window' + 'Swhitch back to the oirginal window': + 'prefix' : 'swhitch to the original window' + 'body' : 'Swhitch to the original window' + 'Close Window': + 'prefix' : 'close window' + 'body' : 'Close "${1:Window title}" window' + 'Accept the currently displayed dialog': + 'prefix' : 'accept th ecurrently displayed dialog' + 'body' : 'Accept the currently displayed dialog' + 'The alert message shoud be Text': + 'prefix' : 'the alert message should be text' + 'body' : 'The alert message should be "${1:Text}"' + 'The confirm message should be Text': + 'prefix' : 'the confirm message should be text' + 'body' : 'The confirm message should be "${1:Text}"' + 'The number in Text': + 'prefix' : 'the number in text' + 'body' : 'The number in "${1:Text}"' + 'The result of CalculationFormula': + 'prefix' : 'the result of calculationformula' + 'body' : 'The result of "${1:CalculationFormula}"' diff --git a/spec/atom-shouldbee-spec.coffee b/spec/atom-shouldbee-spec.coffee deleted file mode 100644 index ec942b5..0000000 --- a/spec/atom-shouldbee-spec.coffee +++ /dev/null @@ -1,62 +0,0 @@ -AtomShouldbee = require '../lib/atom-shouldbee' - -# Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs. -# -# To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit` -# or `fdescribe`). Remove the `f` to unfocus the block. - -describe "AtomShouldbee", -> - [workspaceElement, activationPromise] = [] - - beforeEach -> - workspaceElement = atom.views.getView(atom.workspace) - activationPromise = atom.packages.activatePackage('atom-shouldbee') - - describe "when the atom-shouldbee:toggle event is triggered", -> - it "hides and shows the modal panel", -> - # Before the activation event the view is not on the DOM, and no panel - # has been created - expect(workspaceElement.querySelector('.atom-shouldbee')).not.toExist() - - # This is an activation event, triggering it will cause the package to be - # activated. - atom.commands.dispatch workspaceElement, 'atom-shouldbee:toggle' - - waitsForPromise -> - activationPromise - - runs -> - expect(workspaceElement.querySelector('.atom-shouldbee')).toExist() - - atomShouldbeeElement = workspaceElement.querySelector('.atom-shouldbee') - expect(atomShouldbeeElement).toExist() - - atomShouldbeePanel = atom.workspace.panelForItem(atomShouldbeeElement) - expect(atomShouldbeePanel.isVisible()).toBe true - atom.commands.dispatch workspaceElement, 'atom-shouldbee:toggle' - expect(atomShouldbeePanel.isVisible()).toBe false - - it "hides and shows the view", -> - # This test shows you an integration test testing at the view level. - - # Attaching the workspaceElement to the DOM is required to allow the - # `toBeVisible()` matchers to work. Anything testing visibility or focus - # requires that the workspaceElement is on the DOM. Tests that attach the - # workspaceElement to the DOM are generally slower than those off DOM. - jasmine.attachToDOM(workspaceElement) - - expect(workspaceElement.querySelector('.atom-shouldbee')).not.toExist() - - # This is an activation event, triggering it causes the package to be - # activated. - atom.commands.dispatch workspaceElement, 'atom-shouldbee:toggle' - - waitsForPromise -> - activationPromise - - runs -> - # Now we can test for view visibility - atomShouldbeeElement = workspaceElement.querySelector('.atom-shouldbee') - expect(atomShouldbeeElement).toBeVisible() - atom.commands.dispatch workspaceElement, 'atom-shouldbee:toggle' - expect(atomShouldbeeElement).not.toBeVisible() diff --git a/spec/atom-shouldbee-view-spec.coffee b/spec/atom-shouldbee-view-spec.coffee deleted file mode 100644 index 8dd823f..0000000 --- a/spec/atom-shouldbee-view-spec.coffee +++ /dev/null @@ -1,5 +0,0 @@ -AtomShouldbeeView = require '../lib/atom-shouldbee-view' - -describe "AtomShouldbeeView", -> - it "has one valid test", -> - expect("life").toBe "easy"