fix(curriculum): Portuguese challenge tests (#37283)

This commit is contained in:
Huyen Nguyen
2019-12-24 00:31:58 +07:00
committed by mrugesh
parent b5ffa2f172
commit b2d3ff7420
5 changed files with 35 additions and 30 deletions

View File

@ -17,10 +17,10 @@ localeTitle: Adicionar cantos arredondados com raio de borda
```yml
tests:
- text: Seu elemento de imagem deve ter a classe "borda verde espessa".
testString: 'assert($("img").hasClass("thick-green-border"), "Your image element should have the class "thick-green-border".");'
- text: Sua imagem deve ter um raio de 10 <code>10px</code>
testString: 'assert(parseInt($("img").css("border-top-left-radius")) > 8, "Your image should have a border radius of <code>10px</code>");'
- text: Seu elemento de imagem deve ter a classe "thick-green-border".
testString: assert($("img").hasClass("thick-green-border"));
- text: Sua imagem deve ter uma borda com raio de <code>10px</code>
testString: assert(parseInt($("img").css("border-top-left-radius")) > 8);
```
@ -104,4 +104,5 @@ tests:
```js
// solution required
```
</section>

View File

@ -17,10 +17,10 @@ localeTitle: Tamanho suas imagens
```yml
tests:
- text: Seu elemento <code>img</code> deve ter a classe <code>smaller-image</code> .
testString: 'assert($("img[src="https://bit.ly/fcc-relaxing-cat"]").attr("class") === "smaller-image", "Your <code>img</code> element should have the class <code>smaller-image</code>.");'
- text: Seu elemento <code>img</code> deveria ter a classe <code>smaller-image</code>.
testString: assert($("img[src='https://bit.ly/fcc-relaxing-cat']").attr('class') === "smaller-image");
- text: Sua imagem deve ter 100 pixels de largura. O zoom do navegador deve estar em 100%.
testString: 'assert($("img").width() === 100, "Your image should be 100 pixels wide. Browser zoom should be at 100%.");'
testString: assert($("img").width() === 100);
```
@ -94,4 +94,5 @@ tests:
```js
// solution required
```
</section>

View File

@ -17,14 +17,14 @@ localeTitle: Use uma classe CSS para estilizar um elemento
```yml
tests:
- text: Seu elemento <code>h2</code> deve estar vermelho.
testString: 'assert($("h2").css("color") === "rgb(255, 0, 0)", "Your <code>h2</code> element should be red.");'
- text: Seu elemento <code>h2</code> deve ter a classe <code>red-text</code> .
testString: 'assert($("h2").hasClass("red-text"), "Your <code>h2</code> element should have the class <code>red-text</code>.");'
- text: Sua folha de estilo deve declarar uma classe de <code>red-text</code> e ter sua cor definida como vermelha.
testString: 'assert(code.match(/\.red-text\s*\{\s*color\s*:\s*red;\s*\}/g), "Your stylesheet should declare a <code>red-text</code> class and have its color set to red.");'
- text: 'Não use declarações de estilo inline como <code>style=&quot;color: red&quot;</code> em seu elemento <code>h2</code> .'
testString: 'assert($("h2").attr("style") === undefined, "Do not use inline style declarations like <code>style="color&#58; red"</code> in your <code>h2</code> element.");'
- text: Seu elemento <code>h2</code> deve ser vermelho.
testString: assert($("h2").css("color") === "rgb(255, 0, 0)");
- text: Seu elemento <code>h2</code> deveria ter a classe <code>red-text</code>.
testString: assert($("h2").hasClass("red-text"));
- text: Sua folha de estilo deve declarar uma classe <code>red-text</code> e tenha a cor definida em vermelho.
testString: assert(code.match(/\.red-text\s*\{\s*color\s*:\s*red;\s*\}/g));
- text: Não use declarações de estilo embutido como <code>style="color&#58; red"</code> em seu elemento <code>h2</code>.
testString: assert($("h2").attr("style") === undefined);
```
@ -88,4 +88,5 @@ tests:
```js
// solution required
```
</section>

View File

@ -17,12 +17,12 @@ localeTitle: Use Seletores de Atributo para Elementos de Estilo
```yml
tests:
- text: O seletor de atributo de <code>type</code> deve ser usado para selecionar as caixas de seleção.
testString: 'assert(code.match(/<style>[\s\S]*?\[type=("|")checkbox\1\]\s*?{[\s\S]*?}[\s\S]*?<\/style>/gi),"The <code>type</code> attribute selector should be used to select the checkboxes.");'
- text: O seletor de atributo <code>type</code> deve ser usado para selecionar as caixas de seleção.
testString: assert(code.match(/<style>[\s\S]*?\[type=("|")checkbox\1\]\s*?{[\s\S]*?}[\s\S]*?<\/style>/gi));
- text: As margens superiores das caixas de seleção devem ser 10px.
testString: 'assert((function() {var count=0; $("[type="checkbox"]").each(function() { if($(this).css("marginTop") === "10px") {count++;}});return (count===3)}()),"The top margins of the checkboxes should be 10px.");'
- text: As margens inferiores das caixas de seleção devem ser de 15px.
testString: 'assert((function() {var count=0; $("[type="checkbox"]").each(function() { if($(this).css("marginBottom") === "15px") {count++;}});return (count===3)}()),"The bottom margins of the checkboxes should be 15px.");'
testString: assert((function() {var count=0; $("[type=\"checkbox\"]").each(function() { if($(this).css("marginTop") === "10px") {count++;}});return (count===3)}()));
- text: As margens inferiores das caixas de seleção devem ser 15px.
testString: assert((function() {var count=0; $("[type=\"checkbox\"]").each(function() { if($(this).css("marginBottom") === "15px") {count++;}});return (count===3)}()));
```
@ -111,4 +111,5 @@ tests:
```js
// solution required
```
</section>

View File

@ -17,16 +17,16 @@ localeTitle: Use seletores CSS para elementos de estilo
```yml
tests:
- text: Remova o atributo style do seu elemento <code>h2</code> .
testString: 'assert(!$("h2").attr("style"), "Remove the style attribute from your <code>h2</code> element.");'
- text: Crie um elemento de <code>style</code> .
testString: 'assert($("style") && $("style").length > 1, "Create a <code>style</code> element.");'
- text: Seu elemento <code>h2</code> deve ser azul.
testString: 'assert($("h2").css("color") === "rgb(0, 0, 255)", "Your <code>h2</code> element should be blue.");'
- text: Certifique-se de que a declaração <code>h2</code> sua folha de estilo seja válida com um ponto-e-vírgula e uma chave de fechamento.
testString: 'assert(code.match(/h2\s*\{\s*color\s*:.*;\s*\}/g), "Ensure that your stylesheet <code>h2</code> declaration is valid with a semicolon and closing brace.");'
- text: Certifique-se de que todos os seus elementos de <code>style</code> sejam válidos e tenham uma tag de fechamento.
testString: 'assert(code.match(/<\/style>/g) && code.match(/<\/style>/g).length === (code.match(/<style((\s)*((type|media|scoped|title|disabled)="[^"]*")?(\s)*)*>/g) || []).length, "Make sure all your <code>style</code> elements are valid and have a closing tag.");'
- text: Remova o atributo style do seu elemento <code>h2</code>.
testString: assert(!$("h2").attr("style"));
- text: Crie um elemento <code>style</code>.
testString: assert($("style") && $("style").length >= 1);
- text: Seu elemento <code>h2</code> deveria ser azul.
testString: assert($("h2").css("color") === "rgb(0, 0, 255)");
- text: Certifique-se de que sua declaração <code> h2 </code> da folha de estilo seja válida com um ponto-e-vírgula e uma chave de fechamento.
testString: assert(code.match(/h2\s*\{\s*color\s*:.*;\s*\}/g));
- text: Verifique se todos os seus elementos <code> style </code> são válidos e têm uma tag de fechamento.
testString: assert(code.match(/<\/style>/g) && code.match(/<\/style>/g).length === (code.match(/<style((\s)*((type|media|scoped|title|disabled)="[^"]*")?(\s)*)*>/g) || []).length);
```
@ -120,4 +120,5 @@ tests:
</form>
</main>
```
</section>