From 0df6e6bf45cd22fb52be529ff0a53a89669dc721 Mon Sep 17 00:00:00 2001 From: Anggie Alava Date: Mon, 18 Mar 2024 15:15:05 -0500 Subject: [PATCH] Agregado test y solution.hide.css al ejercicio 03-list-styling --- exercises/03-list-styling/solution.hide.css | 29 ++++++++ exercises/03-list-styling/test.js | 81 +++++++++++---------- 2 files changed, 73 insertions(+), 37 deletions(-) create mode 100644 exercises/03-list-styling/solution.hide.css diff --git a/exercises/03-list-styling/solution.hide.css b/exercises/03-list-styling/solution.hide.css new file mode 100644 index 00000000..82698f17 --- /dev/null +++ b/exercises/03-list-styling/solution.hide.css @@ -0,0 +1,29 @@ +body { + height: 100vh; + background: rgb(189, 189, 189); +} + +.container { + font-family: 'Comic Sans MS', 'Comic Sans', cursive; + margin: 0 auto; + width: 70vw; + box-shadow: 3px 5px 20px #312f2f; + background-color: white; + padding: 120px; + width: 300px; +} + +.cocacola { + list-style-type: lower-alpha; +} +.pepsi { + list-style-type: square; +} +.healthy { + list-style-type: armenian; +} +.dev-drinks { + list-style-type: none; + margin: 0; + padding: 0; +} diff --git a/exercises/03-list-styling/test.js b/exercises/03-list-styling/test.js index c8939872..27bc7c81 100644 --- a/exercises/03-list-styling/test.js +++ b/exercises/03-list-styling/test.js @@ -1,42 +1,49 @@ -const fs=require("fs"); -const path=require("path"); -const html=fs.readFileSync(path.resolve(__dirname, "./index.html"), "utf8"); +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"); +document.documentElement.innerHTML = html.toString(); jest.dontMock("fs"); -describe("The lists should be modified accordingly", function() { - beforeEach(() => { - //here I import the HTML into the document - document.documentElement.innerHTML = html.toString(); +describe("All the styles should be applied", () => { + const ols = document.querySelectorAll("ol"); + const uls = document.querySelectorAll("ul"); + + test("There should be two
    tags", () => { + expect(ols.length).toBe(2) }); - afterEach(() => { - jest.resetModules(); + test("There should be two