don't test for opacity but for the selector
This commit is contained in:
parent
0aa845f87e
commit
b1dac3e216
1 changed files with 4 additions and 16 deletions
|
|
@ -23,23 +23,11 @@ describe("app.views.ServicesSelector", function(){
|
|||
// this tests the crazy css we have in a bassackwards way
|
||||
// check out toggling the services on the new publisher and make sure it works if you change stuff.
|
||||
it("selects the checkbox when the image is clicked", function(){
|
||||
waitsFor(function() {
|
||||
return ($("label[for=service_toggle_facebook] img").css("opacity") < 0.8);
|
||||
});
|
||||
expect($("label[for=service_toggle_facebook] img").is(".magic-service-selector input:not(:checked) + label img")).toBeTruthy();
|
||||
this.view.$("input[value='facebook']").select()
|
||||
|
||||
runs(function() {
|
||||
expect($("label[for=service_toggle_facebook] img").css("opacity")).toBeLessThan(0.8) //floating point weirdness, be safe.
|
||||
this.view.$("input[value='facebook']").select()
|
||||
});
|
||||
|
||||
waitsFor(function(){
|
||||
return $("label[for=service_toggle_facebook] img").css("opacity") == 1
|
||||
});
|
||||
|
||||
runs(function() {
|
||||
expect($("label[for=service_toggle_facebook] img").css("opacity")).toBeGreaterThan(0.8) //floating point weirdness, be safe.
|
||||
});
|
||||
})
|
||||
expect($("label[for=service_toggle_facebook] img").is(".magic-service-selector input:not(:checked) + label img")).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
describe("askForAuth", function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue