Dotclear

Changeset 2471:c1ec37564ab9 for tests


Ignore:
Timestamp:
10/21/13 16:45:01 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
2.6
Message:

Must not change tab when ones if openend and clicking an anchor
Add tests.
Closes #1794

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/functional/spec/page_tabs.js

    r2348 r2471  
    154154     }); 
    155155 
     156     /* ticket 1794 */ 
     157     /* 
     158      * The problem occurs when cliking an anchor in the page  
     159      */ 
     160     it("Must not change opened tab when hash does not refer to an existing div content", function() { 
     161          loadFixtures('tabs.html'); 
     162          loadStyleFixtures('default.css'); 
     163           
     164          $.pageTabs('user-profile'); 
     165          expect($('#part-user-options')).not.toBeVisible(); 
     166          expect($('#part-user-profile')).toBeVisible(); 
     167          expect($('#part-user-favorites')).not.toBeVisible(); 
     168 
     169          spyOn(jQuery.pageTabs, 'getLocationHash').andReturn('dummy'); 
     170          jQuery.event.trigger('hashchange'); 
     171          expect($('#part-user-options')).not.toBeVisible(); 
     172          expect($('#part-user-profile')).toBeVisible(); 
     173          expect($('#part-user-favorites')).not.toBeVisible(); 
     174     }); 
     175 
    156176     /* ticket 1723 */ 
    157      it("Must open first tab when hash does not refer to an existing div content", function() { 
     177     it("Must open first tab when hash does not refer to an existing div content and no tab is opened", function() { 
    158178          loadFixtures('tabs.html'); 
    159179          loadStyleFixtures('default.css'); 
     
    164184          expect($('#part-user-profile')).not.toBeVisible(); 
    165185          expect($('#part-user-favorites')).not.toBeVisible(); 
    166      }); 
     186     });   
    167187}); 
    168188 
Note: See TracChangeset for help on using the changeset viewer.

Sites map