-
-
Save ratbeard/170478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe 'Creating a Sheet...' | |
setup_page(1, function () { | |
pane = new Ext.ux.NewSheet() | |
area = display(pane, '#new-sheet') | |
form = pane.items.get(0).getForm(); | |
^ | |
.., must specify a unique sheet id ... | |
.., in an input box | |
area.should.have_tag 'input#_id_field' | |
... thats unique | |
Current.sheets.should.receive('has', 'twice').with_args('Taken').and_return(true) | |
form.set('_id', 'Taken').should_not.be_valid | |
// cant mock w/ diff args, so stub now | |
Current.sheets.stub('has').and_return(false) | |
form.set('_id', 'New').should.be_valid | |
... its required | |
form.set('_id', '').should_not.be_valid | |
... must specify whether its a `text` or `grid` sheet ... | |
.., in a radio box | |
area.should.have_radio 'format', 'grid', 'text' | |
^ | |
^ | |
^ | |
// # Syntax ideaz # | |
// alt mock syntax ⌥ 1 | |
// current.sheets ¡has('Toad') -> true | |
// real elipses ⌥ ; | |
// … it should | |
// better closing | |
// ???? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment