From 07c775adeb4813ec4f30f296e8bcae6e4881c9f3 Mon Sep 17 00:00:00 2001
From: plucodev
Date: Thu, 1 Aug 2019 12:11:02 -0400
Subject: [PATCH 01/25] Added all 13 exercises folders with all the files
---
bc.json | 2 +-
exercises/01-hello-world/README.md | 8 +--
exercises/02-Background/README.md | 15 ++++++
exercises/02-Background/index.html | 14 +++++
exercises/02-Background/index.js | 1 +
exercises/02-Background/styles.css | 5 ++
exercises/02-Background/tests.js | 54 +++++++++++++++++++
exercises/03-Inline-Styles/README.md | 15 ++++++
exercises/03-Inline-Styles/index.html | 14 +++++
exercises/03-Inline-Styles/index.js | 1 +
exercises/03-Inline-Styles/styles.css | 0
exercises/03-Inline-Styles/tests.js | 54 +++++++++++++++++++
exercises/04-Combined-Rules/README.md | 15 ++++++
exercises/04-Combined-Rules/index.html | 14 +++++
exercises/04-Combined-Rules/index.js | 1 +
exercises/04-Combined-Rules/styles.css | 0
exercises/04-Combined-Rules/tests.js | 54 +++++++++++++++++++
exercises/05-Specificity/README.md | 15 ++++++
exercises/05-Specificity/index.html | 14 +++++
exercises/05-Specificity/index.js | 1 +
exercises/05-Specificity/styles.css | 0
exercises/05-Specificity/tests.js | 54 +++++++++++++++++++
exercises/06-Practicing-Rules/README.md | 15 ++++++
exercises/06-Practicing-Rules/index.html | 14 +++++
exercises/06-Practicing-Rules/index.js | 1 +
exercises/06-Practicing-Rules/styles.css | 0
exercises/06-Practicing-Rules/tests.js | 54 +++++++++++++++++++
exercises/07-Very-Specific-Rules/README.md | 15 ++++++
exercises/07-Very-Specific-Rules/index.html | 14 +++++
exercises/07-Very-Specific-Rules/index.js | 1 +
exercises/07-Very-Specific-Rules/styles.css | 0
exercises/07-Very-Specific-Rules/tests.js | 54 +++++++++++++++++++
exercises/08-Rounded-Image/README.md | 15 ++++++
exercises/08-Rounded-Image/index.html | 14 +++++
exercises/08-Rounded-Image/index.js | 1 +
exercises/08-Rounded-Image/styles.css | 0
exercises/08-Rounded-Image/tests.js | 54 +++++++++++++++++++
exercises/09-Anchor-Styles/README.md | 15 ++++++
exercises/09-Anchor-Styles/index.html | 14 +++++
exercises/09-Anchor-Styles/index.js | 1 +
exercises/09-Anchor-Styles/styles.css | 0
exercises/09-Anchor-Styles/tests.js | 54 +++++++++++++++++++
exercises/10-Your-Own-Font/README.md | 15 ++++++
exercises/10-Your-Own-Font/index.html | 14 +++++
exercises/10-Your-Own-Font/index.js | 1 +
exercises/10-Your-Own-Font/styles.css | 0
exercises/10-Your-Own-Font/tests.js | 54 +++++++++++++++++++
exercises/11-Font-Awesome-Icons/README.md | 15 ++++++
exercises/11-Font-Awesome-Icons/index.html | 14 +++++
exercises/11-Font-Awesome-Icons/index.js | 1 +
exercises/11-Font-Awesome-Icons/styles.css | 0
exercises/11-Font-Awesome-Icons/tests.js | 54 +++++++++++++++++++
exercises/12-Relative-Length-EM-REM/README.md | 15 ++++++
.../12-Relative-Length-EM-REM/index.html | 14 +++++
exercises/12-Relative-Length-EM-REM/index.js | 1 +
.../12-Relative-Length-EM-REM/styles.css | 0
exercises/12-Relative-Length-EM-REM/tests.js | 54 +++++++++++++++++++
exercises/13-Anchor-Like-Button/README.md | 15 ++++++
exercises/13-Anchor-Like-Button/index.html | 14 +++++
exercises/13-Anchor-Like-Button/index.js | 1 +
exercises/13-Anchor-Like-Button/styles.css | 0
exercises/13-Anchor-Like-Button/tests.js | 54 +++++++++++++++++++
62 files changed, 1019 insertions(+), 4 deletions(-)
create mode 100644 exercises/02-Background/README.md
create mode 100644 exercises/02-Background/index.html
create mode 100644 exercises/02-Background/index.js
create mode 100644 exercises/02-Background/styles.css
create mode 100644 exercises/02-Background/tests.js
create mode 100644 exercises/03-Inline-Styles/README.md
create mode 100644 exercises/03-Inline-Styles/index.html
create mode 100644 exercises/03-Inline-Styles/index.js
create mode 100644 exercises/03-Inline-Styles/styles.css
create mode 100644 exercises/03-Inline-Styles/tests.js
create mode 100644 exercises/04-Combined-Rules/README.md
create mode 100644 exercises/04-Combined-Rules/index.html
create mode 100644 exercises/04-Combined-Rules/index.js
create mode 100644 exercises/04-Combined-Rules/styles.css
create mode 100644 exercises/04-Combined-Rules/tests.js
create mode 100644 exercises/05-Specificity/README.md
create mode 100644 exercises/05-Specificity/index.html
create mode 100644 exercises/05-Specificity/index.js
create mode 100644 exercises/05-Specificity/styles.css
create mode 100644 exercises/05-Specificity/tests.js
create mode 100644 exercises/06-Practicing-Rules/README.md
create mode 100644 exercises/06-Practicing-Rules/index.html
create mode 100644 exercises/06-Practicing-Rules/index.js
create mode 100644 exercises/06-Practicing-Rules/styles.css
create mode 100644 exercises/06-Practicing-Rules/tests.js
create mode 100644 exercises/07-Very-Specific-Rules/README.md
create mode 100644 exercises/07-Very-Specific-Rules/index.html
create mode 100644 exercises/07-Very-Specific-Rules/index.js
create mode 100644 exercises/07-Very-Specific-Rules/styles.css
create mode 100644 exercises/07-Very-Specific-Rules/tests.js
create mode 100644 exercises/08-Rounded-Image/README.md
create mode 100644 exercises/08-Rounded-Image/index.html
create mode 100644 exercises/08-Rounded-Image/index.js
create mode 100644 exercises/08-Rounded-Image/styles.css
create mode 100644 exercises/08-Rounded-Image/tests.js
create mode 100644 exercises/09-Anchor-Styles/README.md
create mode 100644 exercises/09-Anchor-Styles/index.html
create mode 100644 exercises/09-Anchor-Styles/index.js
create mode 100644 exercises/09-Anchor-Styles/styles.css
create mode 100644 exercises/09-Anchor-Styles/tests.js
create mode 100644 exercises/10-Your-Own-Font/README.md
create mode 100644 exercises/10-Your-Own-Font/index.html
create mode 100644 exercises/10-Your-Own-Font/index.js
create mode 100644 exercises/10-Your-Own-Font/styles.css
create mode 100644 exercises/10-Your-Own-Font/tests.js
create mode 100644 exercises/11-Font-Awesome-Icons/README.md
create mode 100644 exercises/11-Font-Awesome-Icons/index.html
create mode 100644 exercises/11-Font-Awesome-Icons/index.js
create mode 100644 exercises/11-Font-Awesome-Icons/styles.css
create mode 100644 exercises/11-Font-Awesome-Icons/tests.js
create mode 100644 exercises/12-Relative-Length-EM-REM/README.md
create mode 100644 exercises/12-Relative-Length-EM-REM/index.html
create mode 100644 exercises/12-Relative-Length-EM-REM/index.js
create mode 100644 exercises/12-Relative-Length-EM-REM/styles.css
create mode 100644 exercises/12-Relative-Length-EM-REM/tests.js
create mode 100644 exercises/13-Anchor-Like-Button/README.md
create mode 100644 exercises/13-Anchor-Like-Button/index.html
create mode 100644 exercises/13-Anchor-Like-Button/index.js
create mode 100644 exercises/13-Anchor-Like-Button/styles.css
create mode 100644 exercises/13-Anchor-Like-Button/tests.js
diff --git a/bc.json b/bc.json
index bca021c6..47d3bb08 100644
--- a/bc.json
+++ b/bc.json
@@ -1,3 +1,3 @@
{
"compiler": "vanillajs"
-}
\ No newline at end of file
+}
diff --git a/exercises/01-hello-world/README.md b/exercises/01-hello-world/README.md
index ea6379fb..e8143c69 100644
--- a/exercises/01-hello-world/README.md
+++ b/exercises/01-hello-world/README.md
@@ -4,14 +4,16 @@ In this website, we have 2 elements: a H1 with the ID #theTitle and a paragraph
You can select any of the objects in the DOM with the getElementById function. If we want to select the h1 paragraph and assign it to a variable, do the following:
-var aux = document.getElementById('theTitle');
+```javascript
+var aux = document.getElementById("theTitle");
+```
Now that we have our h1 element stored in the aux variable, we can access any of the properties of the element, for example we can retrieve the font-size style property.
## 📝 Instructions:
+
Prompt an alert with the ID of the h1.
Hint:
-- Here you can read more about the id property of any DOM element: http://www.w3schools.com/jsref/prop_html_id.asp
-
+- Here you can read more about the id property of any DOM element: http://www.w3schools.com/jsref/prop_html_id.asp
diff --git a/exercises/02-Background/README.md b/exercises/02-Background/README.md
new file mode 100644
index 00000000..60ff20bf
--- /dev/null
+++ b/exercises/02-Background/README.md
@@ -0,0 +1,15 @@
+# `02` Background
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/02-Background/index.html b/exercises/02-Background/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/02-Background/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/02-Background/index.js b/exercises/02-Background/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/02-Background/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/02-Background/styles.css b/exercises/02-Background/styles.css
new file mode 100644
index 00000000..fec6568c
--- /dev/null
+++ b/exercises/02-Background/styles.css
@@ -0,0 +1,5 @@
+body {
+ background-image: url(https://4geeksacademy.github.io/exercise-assets/img/bg/small-mosaic.jpg);
+ background-size: cover;
+ background-repeat: no-repeat;
+}
diff --git a/exercises/02-Background/tests.js b/exercises/02-Background/tests.js
new file mode 100644
index 00000000..dd0b70b7
--- /dev/null
+++ b/exercises/02-Background/tests.js
@@ -0,0 +1,54 @@
+const fs = require("fs");
+const path = require("path");
+const html = fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8");
+const css = fs.readFileSync(path.resolve(__dirname, "./styles.css"), "utf8");
+
+jest.dontMock("fs");
+
+describe("All the styles should be applied", function() {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector(
+ "head"
+ ).innerHTML = ``;
+ });
+ afterEach(() => {
+ jest.resetModules();
+ });
+
+ it("the background should be blue", function() {
+ // get computed styles of any element you like
+ const body = document.querySelector("body");
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+describe("All the css should match", function() {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => {
+ jest.resetModules();
+ });
+
+ it("the html code should contain a p tag", function() {
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+ it('the p tag should have a class "big"', function() {
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
diff --git a/exercises/03-Inline-Styles/README.md b/exercises/03-Inline-Styles/README.md
new file mode 100644
index 00000000..66332896
--- /dev/null
+++ b/exercises/03-Inline-Styles/README.md
@@ -0,0 +1,15 @@
+# `03` Inline Styles
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/03-Inline-Styles/index.html b/exercises/03-Inline-Styles/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/03-Inline-Styles/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/03-Inline-Styles/index.js b/exercises/03-Inline-Styles/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/03-Inline-Styles/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/03-Inline-Styles/styles.css b/exercises/03-Inline-Styles/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/03-Inline-Styles/tests.js b/exercises/03-Inline-Styles/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/03-Inline-Styles/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/04-Combined-Rules/README.md b/exercises/04-Combined-Rules/README.md
new file mode 100644
index 00000000..b881b914
--- /dev/null
+++ b/exercises/04-Combined-Rules/README.md
@@ -0,0 +1,15 @@
+# `04` Combined Rules
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/04-Combined-Rules/index.html b/exercises/04-Combined-Rules/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/04-Combined-Rules/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/04-Combined-Rules/index.js b/exercises/04-Combined-Rules/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/04-Combined-Rules/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/04-Combined-Rules/styles.css b/exercises/04-Combined-Rules/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/04-Combined-Rules/tests.js b/exercises/04-Combined-Rules/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/04-Combined-Rules/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/05-Specificity/README.md b/exercises/05-Specificity/README.md
new file mode 100644
index 00000000..e8e8d35f
--- /dev/null
+++ b/exercises/05-Specificity/README.md
@@ -0,0 +1,15 @@
+# `05` Specificity
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/05-Specificity/index.html b/exercises/05-Specificity/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/05-Specificity/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/05-Specificity/index.js b/exercises/05-Specificity/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/05-Specificity/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/05-Specificity/styles.css b/exercises/05-Specificity/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/05-Specificity/tests.js b/exercises/05-Specificity/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/05-Specificity/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/06-Practicing-Rules/README.md b/exercises/06-Practicing-Rules/README.md
new file mode 100644
index 00000000..5f712060
--- /dev/null
+++ b/exercises/06-Practicing-Rules/README.md
@@ -0,0 +1,15 @@
+# `06` Practicing Rules
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/06-Practicing-Rules/index.html b/exercises/06-Practicing-Rules/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/06-Practicing-Rules/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/06-Practicing-Rules/index.js b/exercises/06-Practicing-Rules/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/06-Practicing-Rules/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/06-Practicing-Rules/styles.css b/exercises/06-Practicing-Rules/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/06-Practicing-Rules/tests.js b/exercises/06-Practicing-Rules/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/06-Practicing-Rules/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/07-Very-Specific-Rules/README.md b/exercises/07-Very-Specific-Rules/README.md
new file mode 100644
index 00000000..b1e92db2
--- /dev/null
+++ b/exercises/07-Very-Specific-Rules/README.md
@@ -0,0 +1,15 @@
+# `07` Very Specific Rules
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/07-Very-Specific-Rules/index.html b/exercises/07-Very-Specific-Rules/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/07-Very-Specific-Rules/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/07-Very-Specific-Rules/index.js b/exercises/07-Very-Specific-Rules/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/07-Very-Specific-Rules/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/07-Very-Specific-Rules/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/08-Rounded-Image/README.md b/exercises/08-Rounded-Image/README.md
new file mode 100644
index 00000000..fdf84502
--- /dev/null
+++ b/exercises/08-Rounded-Image/README.md
@@ -0,0 +1,15 @@
+# `08` Rounded Image
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/08-Rounded-Image/index.html b/exercises/08-Rounded-Image/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/08-Rounded-Image/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/08-Rounded-Image/index.js b/exercises/08-Rounded-Image/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/08-Rounded-Image/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/08-Rounded-Image/styles.css b/exercises/08-Rounded-Image/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/08-Rounded-Image/tests.js b/exercises/08-Rounded-Image/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/08-Rounded-Image/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/09-Anchor-Styles/README.md b/exercises/09-Anchor-Styles/README.md
new file mode 100644
index 00000000..fdfcc63e
--- /dev/null
+++ b/exercises/09-Anchor-Styles/README.md
@@ -0,0 +1,15 @@
+# `09` 3D Anchor Styles
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/09-Anchor-Styles/index.html b/exercises/09-Anchor-Styles/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/09-Anchor-Styles/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/09-Anchor-Styles/index.js b/exercises/09-Anchor-Styles/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/09-Anchor-Styles/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/09-Anchor-Styles/styles.css b/exercises/09-Anchor-Styles/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/09-Anchor-Styles/tests.js b/exercises/09-Anchor-Styles/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/09-Anchor-Styles/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/10-Your-Own-Font/README.md b/exercises/10-Your-Own-Font/README.md
new file mode 100644
index 00000000..f15365cd
--- /dev/null
+++ b/exercises/10-Your-Own-Font/README.md
@@ -0,0 +1,15 @@
+# `10` Your Own Font
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/10-Your-Own-Font/index.html b/exercises/10-Your-Own-Font/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/10-Your-Own-Font/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/10-Your-Own-Font/index.js b/exercises/10-Your-Own-Font/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/10-Your-Own-Font/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/10-Your-Own-Font/styles.css b/exercises/10-Your-Own-Font/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/10-Your-Own-Font/tests.js b/exercises/10-Your-Own-Font/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/10-Your-Own-Font/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/11-Font-Awesome-Icons/README.md b/exercises/11-Font-Awesome-Icons/README.md
new file mode 100644
index 00000000..e3903e67
--- /dev/null
+++ b/exercises/11-Font-Awesome-Icons/README.md
@@ -0,0 +1,15 @@
+# `11` Font Awesome Icons
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/11-Font-Awesome-Icons/index.html b/exercises/11-Font-Awesome-Icons/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/11-Font-Awesome-Icons/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/11-Font-Awesome-Icons/index.js b/exercises/11-Font-Awesome-Icons/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/11-Font-Awesome-Icons/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/11-Font-Awesome-Icons/styles.css b/exercises/11-Font-Awesome-Icons/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/11-Font-Awesome-Icons/tests.js b/exercises/11-Font-Awesome-Icons/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/11-Font-Awesome-Icons/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/12-Relative-Length-EM-REM/README.md b/exercises/12-Relative-Length-EM-REM/README.md
new file mode 100644
index 00000000..5ad02b77
--- /dev/null
+++ b/exercises/12-Relative-Length-EM-REM/README.md
@@ -0,0 +1,15 @@
+# `12` Relative Length EM, REM
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/12-Relative-Length-EM-REM/index.html b/exercises/12-Relative-Length-EM-REM/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/12-Relative-Length-EM-REM/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/12-Relative-Length-EM-REM/index.js b/exercises/12-Relative-Length-EM-REM/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/12-Relative-Length-EM-REM/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/12-Relative-Length-EM-REM/styles.css b/exercises/12-Relative-Length-EM-REM/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/12-Relative-Length-EM-REM/tests.js b/exercises/12-Relative-Length-EM-REM/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/12-Relative-Length-EM-REM/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
diff --git a/exercises/13-Anchor-Like-Button/README.md b/exercises/13-Anchor-Like-Button/README.md
new file mode 100644
index 00000000..fe2e5f49
--- /dev/null
+++ b/exercises/13-Anchor-Like-Button/README.md
@@ -0,0 +1,15 @@
+# `13` Anchor Like Button
+
+The "background" CSS rule allows us to assign and work with the background of any container- the background can be a color or an image. If it is an image you can specify if you want the image to repeat horizontally, vertically, both, or not at all, and you can also specify if you want it to resize and fit the whole container where its being applied, among other properties that can be modified.
+
+## 📝 Instructions:
+
+Run the exercise.
+Change the background-size to "contain" (check the index.css tab).
+Run the exercise again.
+Change the background-repeat to inherit to make it repeat over the x axis and y axis.
+Run the exercise again.
+
+Hint:
+
+- How to use the background-size: http://lmgtfy.com/?q=css+background-size
diff --git a/exercises/13-Anchor-Like-Button/index.html b/exercises/13-Anchor-Like-Button/index.html
new file mode 100644
index 00000000..e5ddcd6d
--- /dev/null
+++ b/exercises/13-Anchor-Like-Button/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+ This is my description, it needs to be long because is supposed to be a
+ paragraph and not a title.
+
+
+
diff --git a/exercises/13-Anchor-Like-Button/index.js b/exercises/13-Anchor-Like-Button/index.js
new file mode 100644
index 00000000..ee1aa2a5
--- /dev/null
+++ b/exercises/13-Anchor-Like-Button/index.js
@@ -0,0 +1 @@
+//nothing to see here
diff --git a/exercises/13-Anchor-Like-Button/styles.css b/exercises/13-Anchor-Like-Button/styles.css
new file mode 100644
index 00000000..e69de29b
diff --git a/exercises/13-Anchor-Like-Button/tests.js b/exercises/13-Anchor-Like-Button/tests.js
new file mode 100644
index 00000000..48541114
--- /dev/null
+++ b/exercises/13-Anchor-Like-Button/tests.js
@@ -0,0 +1,54 @@
+
+const fs = require('fs');
+const path = require('path');
+const html = fs.readFileSync(path.resolve(__dirname, './index.html'), 'utf8');
+const css = fs.readFileSync(path.resolve(__dirname, './styles.css'), 'utf8');
+
+jest.dontMock('fs');
+
+describe('All the styles should be applied', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+
+ //apply the styles from the stylesheet if needed
+ document.querySelector('head').innerHTML = ``;
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the background should be blue', function () {
+
+ // get computed styles of any element you like
+ const body = document.querySelector('body');
+ var styles = window.getComputedStyle(body);
+ expect(styles["background-color"]).toBe("blue");
+ });
+});
+
+
+describe('All the html should match', function () {
+ beforeEach(() => {
+ //here I import the HTML into the document
+ document.documentElement.innerHTML = html.toString();
+ });
+ afterEach(() => { jest.resetModules(); });
+
+ it('the html code should contain a p tag', function () {
+
+ // we can read from the source code
+ console.log(html.toString());
+ expect(html.toString().indexOf(`
-1).toBeTruthy();
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const pTags = document.querySelectorAll("p");
+ expect(pTags.length).toBe(1);
+ });
+
+
+ it('the p tag should have a class "big"', function () {
+
+ //or use query selector to compare hoy mane scriptags do we have
+ const p = document.querySelector("p");
+ expect(p.classList.contains("big")).toBeTruthy();
+ });
+});
\ No newline at end of file
From f724ac53e2aad326a105ecd97b59f91f4a19b8e3 Mon Sep 17 00:00:00 2001
From: plucodev
Date: Thu, 1 Aug 2019 14:36:33 -0400
Subject: [PATCH 02/25] completed exercise 02
---
exercises/01-hello-world/index.html | 7 +--
exercises/02-Background/README.md | 14 +++--
exercises/02-Background/index.html | 8 +--
exercises/02-Background/styles.css | 6 +-
exercises/02-Background/tests.js | 34 +++--------
exercises/03-Inline-Styles/README.md | 24 +++++---
exercises/03-Inline-Styles/index.html | 13 +++--
exercises/03-Inline-Styles/tests.js | 84 ++++++++++-----------------
8 files changed, 79 insertions(+), 111 deletions(-)
diff --git a/exercises/01-hello-world/index.html b/exercises/01-hello-world/index.html
index e5ddcd6d..8fcd076d 100644
--- a/exercises/01-hello-world/index.html
+++ b/exercises/01-hello-world/index.html
@@ -5,10 +5,5 @@
-
-
- This is my description, it needs to be long because is supposed to be a
- paragraph and not a title.
-