From 108cc42b5d0ecc0be183b421b871e0df4fe65b88 Mon Sep 17 00:00:00 2001 From: Aditi Joshi Date: Sat, 25 May 2019 23:26:24 -0400 Subject: [PATCH] Fix/update challenge for responsive web design principles portuguese (#35919) * Fix/update challenges for responsive-web-design-principles portuguese * Added correct regex --- .../create-a-media-query.portuguese.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/curriculum/challenges/portuguese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.portuguese.md b/curriculum/challenges/portuguese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.portuguese.md index 518b950f70..4341a56dc6 100644 --- a/curriculum/challenges/portuguese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.portuguese.md +++ b/curriculum/challenges/portuguese/01-responsive-web-design/responsive-web-design-principles/create-a-media-query.portuguese.md @@ -17,11 +17,12 @@ localeTitle: Criar uma consulta de mídia ```yml tests: - - text: Seu elemento p deve ter o font-size da font-size de 10px quando a height do dispositivo for menor ou igual a 800px. - 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: Declare uma consulta @media para dispositivos com uma height menor ou 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: Seu elemento p deve ter o font-size da font-size de 10px quando a height do dispositivo for menor ou igual a 800px. + 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: Seu elemento p deve ter o inicialfont-size da font-size de 20px quando a height do dispositivo for maior a 800px. + 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."); ```