Sha256: 2c1ef80cee7c21afd795dc51b70c58ca484c1dc0cb7c6ffc9cdaf7996a251138

Contents?: true

Size: 1.32 KB

Versions: 5

Compression:

Stored size: 1.32 KB

Contents

require('/jquery.js');
stylesheet('/styles.css')

describe('templates', function() {

  describe('with template', function() {
    template('one_template.html')

    it("should append the template to the test div", function() {
      expect($('#test h1#from-template').length).toEqual(1);
    });

    it("should change stuff in one test...", function() {
      expect($('#test h1#from-template').length).toEqual(1);

      $('#test h1#from-template').attr('id', 'changed');

      expect($('#test h1#changed').length).toEqual(1);
      expect($('#test h1#from-template').length).toEqual(0);
    });

    it("... should have been removed before the next starts", function() {
      expect($('#test h1#changed').length).toEqual(0);
      expect($('#test h1#from-template').length).toEqual(1);
    });
  });

  describe('with another template', function() {
    template('another_template.html')

    it("should append the template to the test div", function() {
      expect($('#test h1#another-template').length).toEqual(1);
    });
  });

});

describe('stylesheet', function() {
  template('one_template.html')

  it("should style the template", function() {
    // Env-js does not have support for stylesheets
    if (Evergreen.driver != "envjs") {
      expect(document.getElementById('from-template').offsetWidth).toEqual(300)
    }
  });
});

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
danieldkim-evergreen-0.4.0.6 spec/suite1/spec/javascripts/templates_spec.js
danieldkim-evergreen-0.4.0.5 spec/suite1/spec/javascripts/templates_spec.js
gjastrab-evergreen-0.4.0.3 spec/suite1/spec/javascripts/templates_spec.js
evergreen-0.4.0 spec/suite1/spec/javascripts/templates_spec.js
evergreen-0.3.0 spec/suite1/spec/javascripts/templates_spec.js