From ce1b1525cba80dba9293f5e3d6a5ce9fa87a1272 Mon Sep 17 00:00:00 2001 From: Aditi Joshi Date: Sat, 27 Apr 2019 03:00:23 -0400 Subject: [PATCH] Fix/update challenges for responsive-web-design-principles spanish (#35915) --- .../create-a-media-query.spanish.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/spanish/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.spanish.md b/curriculum/challenges/spanish/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.spanish.md index 2918d28808..9af2c90f47 100644 --- a/curriculum/challenges/spanish/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.spanish.md +++ b/curriculum/challenges/spanish/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.spanish.md @@ -17,10 +17,12 @@ localeTitle: Crear una consulta de medios ```yml tests: - - text: Tu elemento p debe tener el font-size de 10 px cuando la height del dispositivo sea menor o igual a 800 px. - testString: 'assert($("p").css("font-size") == "10px", "Your p element should have the font-size of 10px when the device height is less than or equal to 800px.");' - text: Declara una consulta @media para dispositivos con una height menor o igual a 800px. - testString: 'assert(code.match(/@media\s*?\(\s*?max-height\s*?:\s*?800px\s*?\)/g), "Declare a @media query for devices with a height less than or equal to 800px.");' + testString: assert($("style").text().replace(/\s/g ,'').match(/@media\(max-height:800px\)/g), "Declare a @media query for devices with a height less than or equal to 800px.");' + - text: Tu elemento p debe tener el font-size de 10 px cuando la height del dispositivo sea menor o igual a 800 px. + testString: 'assert($("style").text().replace(/\s/g ,'').match(/@media\(max-height:800px\){p{font-size:10px;?}}/g), "Your p element should have the font-size of 10px when the device height is less than or equal to 800px.");' + - text: Tu elemento p debe tener el inicial font-size de 20 px cuando la height del dispositivo sea maior a 800 px. + testString: assert($("style").text().replace(/\s/g ,'').replace(/@media.*}/g, '').match(/p{font-size:20px;?}/g), Your p element should have an initial font-size of 20px when the device height is more than 800px); ```