From 5b1f0c76aece9fdd4987384e7db3c42ebfbc0ba6 Mon Sep 17 00:00:00 2001 From: Sadiel0 Date: Tue, 7 Jun 2022 13:20:31 +0000 Subject: [PATCH 1/3] added a condition to the test to make it more flexible --- exercises/07-Very-Specific-Rules/styles.css | 2 +- exercises/07-Very-Specific-Rules/tests.js | 4 ++-- learn.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/styles.css b/exercises/07-Very-Specific-Rules/styles.css index defdb77a..300d0677 100644 --- a/exercises/07-Very-Specific-Rules/styles.css +++ b/exercises/07-Very-Specific-Rules/styles.css @@ -1,7 +1,7 @@ /** Insert your code here **/ /*********** READ ONLY BLOCK ****** -You CAN NOT UPDATE anything from here on, +You CANNOT UPDATE anything from here on, only add lines of code on top of this lines **/ diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js index f3b4d5a9..4b5040e2 100644 --- a/exercises/07-Very-Specific-Rules/tests.js +++ b/exercises/07-Very-Specific-Rules/tests.js @@ -27,7 +27,7 @@ describe("All the styles should be applied", function () { let orangeHoverSelector=""; for (let i=0; i li") { orangeHoverSelector=cssArray[i].style.color; } @@ -44,7 +44,7 @@ describe("All the styles should be applied", function () { let orangeHoverSelector=""; for (let i=0; i li:nth-child(2)" ) { orangeHoverSelector=cssArray[i].style['background-color']; } diff --git a/learn.json b/learn.json index cd0b8478..e11a82b6 100644 --- a/learn.json +++ b/learn.json @@ -12,7 +12,7 @@ "video-solutions": true, "graded": true, - "disableGrading": true, + "disableGrading": false, "editor": { "version": "1.0.73" } From d96fc2b989389c29bbed41481d294308fd68aff5 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Thu, 9 Jun 2022 21:26:03 +0000 Subject: [PATCH 2/3] disableGrading set to true --- exercises/07-Very-Specific-Rules/tests.js | 16 ++-------------- learn.json | 10 ++++------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/exercises/07-Very-Specific-Rules/tests.js b/exercises/07-Very-Specific-Rules/tests.js index 4b5040e2..9cdd774c 100644 --- a/exercises/07-Very-Specific-Rules/tests.js +++ b/exercises/07-Very-Specific-Rules/tests.js @@ -9,9 +9,7 @@ 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 - }); afterEach(() => { jest.resetModules(); @@ -23,18 +21,13 @@ describe("All the styles should be applied", function () { "head" ).innerHTML=``; let cssArray=document.styleSheets[0].cssRules; - let orangeHoverSelector=""; for (let i=0; i li") { + if (cssArray[i].selectorText==="ul li" || cssArray[i].selectorText==="ul > li") { orangeHoverSelector=cssArray[i].style.color; - } expect(orangeHoverSelector).toBe("red"); } - - }); it("The ul second element background should be green", function () { document.querySelector( @@ -44,7 +37,7 @@ describe("All the styles should be applied", function () { let orangeHoverSelector=""; for (let i=0; i li:nth-child(2)" ) { + if (cssArray[i].selectorText==="ol li:nth-child(2)" || cssArray[i].selectorText==="ol > li:nth-child(2)" ) { orangeHoverSelector=cssArray[i].style['background-color']; } @@ -90,9 +83,4 @@ describe("All the styles should be applied", function () { let title = head.querySelector('title') expect(title).not.toBe(null) }) - - - - - }); \ No newline at end of file diff --git a/learn.json b/learn.json index e11a82b6..6574dcef 100644 --- a/learn.json +++ b/learn.json @@ -11,10 +11,8 @@ "difficulty": "easy", "video-solutions": true, "graded": true, - - "disableGrading": false, - "editor": { - "version": "1.0.73" - } - + "disableGrading": false, + "editor": { + "version": "1.0.73" + } } From aa84d1182fcebac776106e3789b45084478338f6 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez Date: Thu, 9 Jun 2022 21:26:05 +0000 Subject: [PATCH 3/3] disableGrading set to true --- learn.json | 1 + 1 file changed, 1 insertion(+) diff --git a/learn.json b/learn.json index 6574dcef..3c17442e 100644 --- a/learn.json +++ b/learn.json @@ -11,6 +11,7 @@ "difficulty": "easy", "video-solutions": true, "graded": true, + "disabledActions": ["test"], "disableGrading": false, "editor": { "version": "1.0.73"