Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coding-kata/beautiful-code-vs-mr-oldtype
jQuery refactoring and E2E Tests using testium.
https://github.com/coding-kata/beautiful-code-vs-mr-oldtype
Last synced: about 2 months ago
JSON representation
jQuery refactoring and E2E Tests using testium.
- Host: GitHub
- URL: https://github.com/coding-kata/beautiful-code-vs-mr-oldtype
- Owner: coding-kata
- License: mit
- Created: 2015-01-20T02:10:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-01-23T07:53:13.000Z (over 9 years ago)
- Last Synced: 2024-07-04T00:55:42.571Z (3 months ago)
- Language: JavaScript
- Homepage: https://github.com/azu/testium-seed
- Size: 242 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jQuery refactoring with E2E Tests [![Build Status](https://travis-ci.org/coding-kata/beautiful-code-vs-mr-oldtype.svg)](https://travis-ci.org/coding-kata/beautiful-code-vs-mr-oldtype)
- [美しいプログラムを書く(業務用Webアプリケーション保守編) - TIM Labs](http://labs.timedia.co.jp/2012/07/beautiful-code-vs-mr-oldtype.html "美しいプログラムを書く(業務用Webアプリケーション保守編) - TIM Labs")
のリファクタリングを適応する
## 目的
特定のバージョンでの変更点を簡単に確認できるよう、
「Aの列のラジオボタンを選ぶと同じ行より一つ下にあるBの列のラジオボタンを自動で選ぶ」 という補助を実装する![img](http://gyazo.com/b7e1593ef11326f5d6bf788d25e1bd6d.gif)
## テスト方法
[testium](https://github.com/groupon-testium/testium "testium")を使ったE2Eテストで状態が壊れてないかをチェックしてリファクタリングを行う。
- `npm start` で[nodeapps/http-server](https://github.com/nodeapps/http-server "nodeapps/http-server")を使ったローカルサーバを立てる
- [Mocha](http://mochajs.org/ "Mocha") + [testium](https://github.com/groupon-testium/testium "testium") + [power-assert](https://github.com/twada/power-assert "power-assert") でテストケースを書く
- リファクタリングを開始する
- `npm test` でテストを動かし確認する## 実践
- [Refactoring jQuery #1](https://github.com/coding-kata/beautiful-code-vs-mr-oldtype/pull/1 "Refactoring jQuery #1")
- [Refactoring E2E tests to apply page-object pattern by azu · Pull Request #2 · coding-kata/beautiful-code-vs-mr-oldtype](https://github.com/coding-kata/beautiful-code-vs-mr-oldtype/pull/2 "Refactoring E2E tests to apply page-object pattern by azu · Pull Request #2 · coding-kata/beautiful-code-vs-mr-oldtype")## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D## License
MIT