Dotclear


Ignore:
Timestamp:
10/22/13 14:22:06 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
2.6
Message:

Fix issue when hash not refer to existing div content. Closes #1794
Improve the way ton find anchor related to a div content, addresses #1723

File:
1 edited

Legend:

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

    r2471 r2479  
    153153          expect($('#part-user-favorites')).not.toBeVisible(); 
    154154     }); 
    155  
    156      /* ticket 1794 */ 
    157      /* 
     155      
     156     /* ticket 1723 and 1794 
     157      * 
    158158      * The problem occurs when cliking an anchor in the page  
    159159      */ 
    160      it("Must not change opened tab when hash does not refer to an existing div content", function() { 
     160     it("Must try to find tab to open in page when hash refer ton an anchor and not to an existing div content", function() { 
    161161          loadFixtures('tabs.html'); 
    162162          loadStyleFixtures('default.css'); 
     163           
     164          var anchor_name = 'anchor-in-favorites'; 
     165          $('<div id="anchor-in-favorites"></div>').appendTo($('#user-favorites')); 
    163166           
    164167          $.pageTabs('user-profile'); 
     
    167170          expect($('#part-user-favorites')).not.toBeVisible(); 
    168171 
    169           spyOn(jQuery.pageTabs, 'getLocationHash').andReturn('dummy'); 
     172          spyOn(jQuery.pageTabs, 'getLocationHash').andReturn(anchor_name); 
    170173          jQuery.event.trigger('hashchange'); 
    171174          expect($('#part-user-options')).not.toBeVisible(); 
    172           expect($('#part-user-profile')).toBeVisible(); 
    173           expect($('#part-user-favorites')).not.toBeVisible(); 
     175          expect($('#part-user-profile')).not.toBeVisible(); 
     176          expect($('#part-user-favorites')).toBeVisible(); 
    174177     }); 
    175178 
    176      /* ticket 1723 */ 
    177      it("Must open first tab when hash does not refer to an existing div content and no tab is opened", function() { 
     179     it("Must open first tab when hash does not refer to an existing div content", function() { 
    178180          loadFixtures('tabs.html'); 
    179181          loadStyleFixtures('default.css'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map