Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function preparePage() {
- $j('#content').hide();
- }
- //function setValueToInput() {
- // $j('#userInput').val('show');
- //}
- //function checkUserInput() {
- // if ($j('#userInput').val() == 'show') {
- // $j('#content').show();
- // }
- //}
- function setUpHTMLFixture() {
- jasmine
- .getFixtures()
- .set(' <p id="proba">T</p> '
- + '<input type="text" id="userInput" class="demo"/> '
- + ' <div id="d">Click here</div> '
- + ' <div id="content"> '
- + ' <img src="images/canberra_hero_image.jpg" class="pic"/> '
- + ' </div>');
- }
- describe("Tests for Show Button on Form", function () {
- beforeEach(function(){
- setUpHTMLFixture();
- preparePage();
- //loadFixtures('index.html');
- });
- afterEach(function () {
- });
- it("simple test", function () {
- expect($j('#content')).toBeHidden();
- expect(readFixtures).toBeDefined();
- expect(setFixtures).toBeDefined();
- expect(hello()).toEqual('Hello'); //example of how js is executing -> add it into karma config file
- });
- //it("simple test", function () {
- // jasmine.getFixtures().fixturesPath = 'scripts/fixtures/';
- // loadFixtures('indexx.html');
- // expect($j('#dd')).toExist();
- //});
- });
- //GET ALL MATCHERS HERE -> https://github.com/velesin/jasmine-jquery
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement