Simplified the XML selector test (save the result).

This commit is contained in:
John Resig 2009-01-05 21:04:15 +00:00
parent f796ad14fd
commit c6de039bb1

View file

@ -291,9 +291,10 @@ test("jQuery(selector, xml).text(str) - Loaded via XML document", function() {
stop(); stop();
jQuery.get('data/dashboard.xml', function(xml) { jQuery.get('data/dashboard.xml', function(xml) {
// tests for #1419 where IE was a problem // tests for #1419 where IE was a problem
equals( jQuery("tab:first", xml).text(), "blabla", "Verify initial text correct" ); var tab = jQuery("tab", xml).eq(0);
jQuery("tab:first", xml).text("newtext"); equals( tab.text(), "blabla", "Verify initial text correct" );
equals( jQuery("tab:first", xml).text(), "newtext", "Verify new text correct" ); tab.text("newtext");
equals( tab.text(), "newtext", "Verify new text correct" );
start(); start();
}); });
}); });