Skip to content

Commit

Permalink
Fix some unscoped tests which failed after recent changes to QUnit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jitter committed Feb 15, 2011
1 parent 7fd5ef0 commit 069085f
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions test/unit/selector.js
Expand Up @@ -10,7 +10,7 @@ test("element", function() {
if ( all[i].nodeType == 8 )
good = false;
ok( good, "Select all elements, no comment nodes" );
t( "Element Selector", "p", ["firstp","ap","sndp","en","sap","first"] );
t( "Element Selector", "#main p", ["firstp","ap","sndp","en","sap","first"] );
t( "Element Selector", "body", ["body"] );
t( "Element Selector", "html", ["html"] );
t( "Parent Element", "div p", ["firstp","ap","sndp","en","sap","first"] );
Expand All @@ -31,7 +31,7 @@ test("element", function() {

t( "Checking sort order", "h2, h1", ["qunit-header", "qunit-banner", "qunit-userAgent"] );
t( "Checking sort order", "h2:first, h1:first", ["qunit-header", "qunit-banner"] );
t( "Checking sort order", "p, p a", ["firstp", "simon1", "ap", "google", "groups", "anchor1", "mark", "sndp", "en", "yahoo", "sap", "anchor2", "simon", "first"] );
t( "Checking sort order", "#main p, #main p a", ["firstp", "simon1", "ap", "google", "groups", "anchor1", "mark", "sndp", "en", "yahoo", "sap", "anchor2", "simon", "first"] );

// Test Conflict ID
same( jQuery("#lengthtest").find("#idTest").get(), q("idTest"), "Finding element with id of ID." );
Expand Down Expand Up @@ -221,10 +221,10 @@ test("name", function() {
test("multiple", function() {
expect(4);

t( "Comma Support", "h2, p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
t( "Comma Support", "h2 , p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
t( "Comma Support", "h2 , p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
t( "Comma Support", "h2,p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
t( "Comma Support", "h2, #main p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
t( "Comma Support", "h2 , #main p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
t( "Comma Support", "h2 , #main p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
t( "Comma Support", "h2,#main p", ["qunit-banner","qunit-userAgent","firstp","ap","sndp","en","sap","first"]);
});

test("child and adjacent", function() {
Expand All @@ -245,7 +245,7 @@ test("child and adjacent", function() {
t( "Adjacent", "p[lang=en] + p", ["sap"] );
t( "Adjacent", "a.GROUPS + code + a", ["mark"] );
t( "Comma, Child, and Adjacent", "#main a + a, code > a", ["groups","anchor1","anchor2"] );
t( "Element Preceded By", "p ~ div", ["foo", "moretests","tabindex-tests", "liveHandlerOrder", "siblingTest"] );
t( "Element Preceded By", "#main p ~ div", ["foo", "moretests","tabindex-tests", "liveHandlerOrder", "siblingTest"] );
t( "Element Preceded By", "#first ~ div", ["moretests","tabindex-tests", "liveHandlerOrder", "siblingTest"] );
t( "Element Preceded By", "#groups ~ a", ["mark"] );
t( "Element Preceded By", "#length ~ input", ["idTest"] );
Expand Down Expand Up @@ -344,16 +344,16 @@ test("attributes", function() {

test("pseudo - child", function() {
expect(38);
t( "First Child", "p:first-child", ["firstp","sndp"] );
t( "First Child", "#main p:first-child", ["firstp","sndp"] );
t( "Last Child", "p:last-child", ["sap"] );
t( "Only Child", "#main a:only-child", ["simon1","anchor1","yahoo","anchor2","liveLink1","liveLink2"] );
t( "Empty", "ul:empty", ["firstUL"] );
t( "Is A Parent", "p:parent", ["firstp","ap","sndp","en","sap","first"] );
t( "Is A Parent", "#main p:parent", ["firstp","ap","sndp","en","sap","first"] );

t( "First Child", "p:first-child", ["firstp","sndp"] );
t( "Nth Child", "p:nth-child(1)", ["firstp","sndp"] );
t( "Nth Child With Whitespace", "p:nth-child( 1 )", ["firstp","sndp"] );
t( "Not Nth Child", "p:not(:nth-child(1))", ["ap","en","sap","first"] );
t( "Not Nth Child", "#main p:not(:nth-child(1))", ["ap","en","sap","first"] );

// Verify that the child position isn't being cached improperly
jQuery("p:first-child").after("<div></div>");
Expand Down Expand Up @@ -419,16 +419,16 @@ test("pseudo - :not", function() {
t( "Not - multiple", "#form option:not(:contains(Nothing),#option1b,:selected)", ["option1c", "option1d", "option2b", "option2c", "option3d", "option3e", "option4e", "option5b", "option5c"] );
t( "Not - recursive", "#form option:not(:not(:selected))[id^='option3']", [ "option3b", "option3c"] );

t( ":not() failing interior", "p:not(.foo)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "p:not(div.foo)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "p:not(p.foo)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "p:not(#blargh)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "p:not(div#blargh)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "p:not(p#blargh)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "#main p:not(.foo)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "#main p:not(div.foo)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "#main p:not(p.foo)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "#main p:not(#blargh)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "#main p:not(div#blargh)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not() failing interior", "#main p:not(p#blargh)", ["firstp","ap","sndp","en","sap","first"] );

t( ":not Multiple", "p:not(a)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not Multiple", "p:not(a, b)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not Multiple", "p:not(a, b, div)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not Multiple", "#main p:not(a)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not Multiple", "#main p:not(a, b)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not Multiple", "#main p:not(a, b, div)", ["firstp","ap","sndp","en","sap","first"] );
t( ":not Multiple", "p:not(p)", [] );
t( ":not Multiple", "p:not(a,p)", [] );
t( ":not Multiple", "p:not(p,a)", [] );
Expand All @@ -448,14 +448,14 @@ test("pseudo - :not", function() {

test("pseudo - position", function() {
expect(25);
t( "nth Element", "p:nth(1)", ["ap"] );
t( "First Element", "p:first", ["firstp"] );
t( "nth Element", "#main p:nth(1)", ["ap"] );
t( "First Element", "#main p:first", ["firstp"] );
t( "Last Element", "p:last", ["first"] );
t( "Even Elements", "p:even", ["firstp","sndp","sap"] );
t( "Odd Elements", "p:odd", ["ap","en","first"] );
t( "Position Equals", "p:eq(1)", ["ap"] );
t( "Position Greater Than", "p:gt(0)", ["ap","sndp","en","sap","first"] );
t( "Position Less Than", "p:lt(3)", ["firstp","ap","sndp"] );
t( "Even Elements", "#main p:even", ["firstp","sndp","sap"] );
t( "Odd Elements", "#main p:odd", ["ap","en","first"] );
t( "Position Equals", "#main p:eq(1)", ["ap"] );
t( "Position Greater Than", "#main p:gt(0)", ["ap","sndp","en","sap","first"] );
t( "Position Less Than", "#main p:lt(3)", ["firstp","ap","sndp"] );

t( "Check position filtering", "div#nothiddendiv:eq(0)", ["nothiddendiv"] );
t( "Check position filtering", "div#nothiddendiv:last", ["nothiddendiv"] );
Expand Down

0 comments on commit 069085f

Please sign in to comment.