From 3460159f68d91aa2a9c739f82e9b79f5e07caf7e Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 1 Mar 2013 14:04:33 +0000 Subject: [PATCH] fix a test --- tests/frontend/specs/embed_value.js | 9 ++++++--- tests/frontend/specs/font_type.js | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/frontend/specs/embed_value.js b/tests/frontend/specs/embed_value.js index 729cc6667..029f0dd5d 100644 --- a/tests/frontend/specs/embed_value.js +++ b/tests/frontend/specs/embed_value.js @@ -100,8 +100,8 @@ describe("embed links", function(){ //open share dropdown chrome$(".buttonicon-embed").click(); - //check read only checkbox, a bit hacky - chrome$('#readonlyinput').attr('checked','checked').click().attr('checked','checked'); + chrome$('#readonlyinput').click(); + chrome$('#readonlyinput:checkbox:not(:checked)').attr('checked', 'checked'); //get the link of the share field + the actual pad url and compare them var shareLink = chrome$("#linkinput").val(); @@ -119,7 +119,9 @@ describe("embed links", function(){ //open share dropdown chrome$(".buttonicon-embed").click(); //check read only checkbox, a bit hacky - chrome$('#readonlyinput').attr('checked','checked').click().attr('checked','checked'); + chrome$('#readonlyinput').click(); + chrome$('#readonlyinput:checkbox:not(:checked)').attr('checked', 'checked'); + //get the link of the share field + the actual pad url and compare them var embedCode = chrome$("#embedinput").val(); @@ -129,5 +131,6 @@ describe("embed links", function(){ done(); }); }); + }); }); diff --git a/tests/frontend/specs/font_type.js b/tests/frontend/specs/font_type.js index af90b865b..8ef489aa8 100644 --- a/tests/frontend/specs/font_type.js +++ b/tests/frontend/specs/font_type.js @@ -17,9 +17,11 @@ describe("font select", function(){ var $viewfontmenu = chrome$("#viewfontmenu"); var $monospaceoption = $viewfontmenu.find("[value=monospace]"); +console.log($monospaceoption); + //select monospace and fire change event $monospaceoption.attr('selected','selected'); - $viewfontmenu.change(); + // $viewfontmenu.change(); //check if font changed to monospace var fontFamily = inner$("body").css("font-family").toLowerCase();