Skip to content

Commit

Permalink
微調整
Browse files Browse the repository at this point in the history
  • Loading branch information
koba-ninkigumi committed Jun 27, 2015
1 parent 79b6e99 commit 7bb728e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
13 changes: 13 additions & 0 deletions test/htdocs/yubinbango.html
Expand Up @@ -123,5 +123,18 @@ <h3>都道府県 と 市町村区 と 町域 と 以降の住所に分ける場
<input type="text" class="p-extended-address" />
</form>

<h3>inputタグが深い階層にある場合</h3>
<!--href="http://microformats.org/wiki/h-adr"-->
<form class="h-adr" id="c1">
<!--href="https://www.iso.org/obp/ui/#iso:code:3166:JP"-->
<!--href="http://en.wikipedia.org/wiki/ISO_3166-1"-->
<span class="p-country-name" style="display:none;">Japan</span>

<input type="text" class="p-postal-code" size="3" maxlength="3">
<input type="text" class="p-postal-code" size="4" maxlength="4"><br>

<input type="text" class="p-region p-locality p-street-address p-extended-address" /><br>
</form>

</body>
</html>
14 changes: 14 additions & 0 deletions test/spec.js
Expand Up @@ -120,4 +120,18 @@ describe('YubinBango', function() {

});

it('inputタグが深い階層にある場合', function() {
expect( element.all(by.css('#c1 .p-postal-code')).count() ).toEqual( 2 );
element.all(by.css('#c1 .p-postal-code')).get(0).sendKeys(100)
.then(function(){
element.all(by.css('#c1 .p-postal-code')).get(1).sendKeys(8950)
.then(function(){
browser.driver.sleep(1000)
.then(function(){
expect(element(by.css('#c1 .p-region')).getAttribute('value')).toEqual('東京都千代田区霞が関1丁目2-1');
});
});
});
});

});
2 changes: 1 addition & 1 deletion yubinbango.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7bb728e

Please sign in to comment.