This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
/* | ||
* This is a basic func test for a UseCase application. | ||
*/ | ||
YUI({ | ||
useConsoleOutput: true, | ||
useBrowserConsole: true, | ||
logInclude: { TestRunner: true } | ||
}).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { | ||
|
||
var suite = new Y.Test.Suite("UseCases: preattachedbinder"); | ||
YUI.add('usecases_testpreattachedbinder', function (Y) { | ||
var suite = new Y.Test.Suite("UseCases: preattachedbinder"); | ||
|
||
suite.add(new Y.Test.Case({ | ||
"test preattachedbinder": function() { | ||
var that = this; | ||
Y.Assert.areEqual('Enjoy your Flickr Images!',Y.one('h2').get('innerHTML').match(/Enjoy your Flickr Images!/gi)); | ||
Y.Assert.areEqual('\"This is the config for config1 in application.json\"', Y.one('#myconfig').get('innerHTML')); | ||
Y.one('#paginate a').simulate('click'); | ||
that.wait(function(){ | ||
Y.Assert.areEqual('Hallo!',Y.one('h2').get('innerHTML').match(/Hallo!/gi)); | ||
Y.Assert.areEqual('\"mynewconfig\"', Y.one('#myconfig').get('innerHTML')); | ||
}, 2000); | ||
} | ||
|
||
})); | ||
suite.add(new Y.Test.Case({ | ||
"test preattachedbinder": function() { | ||
var that = this; | ||
Y.Assert.areEqual('Enjoy your Flickr Images!',Y.one('h2').get('innerHTML').match(/Enjoy your Flickr Images!/gi)); | ||
Y.Assert.areEqual('\"This is the config for config1 in application.json\"', Y.one('#myconfig').get('innerHTML')); | ||
Y.one('#paginate a').simulate('click'); | ||
that.wait(function(){ | ||
Y.Assert.areEqual('Hallo!',Y.one('h2').get('innerHTML').match(/Hallo!/gi)); | ||
Y.Assert.areEqual('\"mynewconfig\"', Y.one('#myconfig').get('innerHTML')); | ||
}, 2000); | ||
} | ||
})); | ||
|
||
Y.Test.Runner.add(suite); | ||
}); | ||
Y.Test.Runner.add(suite); | ||
}, '0.0.1', {requires: [ | ||
'node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format' | ||
]}); |
This file contains 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