Skip to content

Editor version #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion exercises/01.2-Your-First-Style/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ describe("All the styles should be applied", function() {
// console.log(bodyInlineStyle[0].style._values.background);
});
it("You should not change the existing head tag elements", function () {
let meta = document.querySelector('head').querySelector("meta")
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).toBe(null)
})
});
5 changes: 3 additions & 2 deletions exercises/01.3-Your-Second-Style/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ describe("All the styles should be applied", function() {
// console.log(bodyInlineStyle[0].style._values.background);
});
it("You should not change the existing head tag elements", function () {
let meta = document.querySelector('head').querySelector("meta")

let head = document.querySelector('head')
expect(head).toBeTruthy()
let meta = head.querySelector("meta")
expect(meta).toBe(null)
})
});
9 changes: 6 additions & 3 deletions exercises/02-Separate-Stylesheet/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ describe("All the styles should be applied", function () {
expect(styles["background-repeat"]).toBe("inherit");
});
it("You should not change the existing head tag elements", function () {
let meta = document.querySelector('head').querySelector("meta")
let link = document.querySelector('link').href
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')
})
});
13 changes: 8 additions & 5 deletions exercises/02.1-Background/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ describe("All the styles should be applied", function () {
expect(styles["background-repeat"]).toBe("inherit");
});
it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title').innerHTML
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title').innerHTML
expect(title).toBe('02 Background')
})
});
9 changes: 5 additions & 4 deletions exercises/03-Inline-Styles/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ describe("The Table tag should contain inline style background: green", function
});

it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let title = head.querySelector('title').innerHTML
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).toBe(null)
expect(title).toBe('03 Inline Styles')

let title = head.querySelector('title').innerHTML
expect(title).toBe('03 Inline Styles')
})

it("The background should be green", function() {
Expand Down
13 changes: 8 additions & 5 deletions exercises/04.1-Combined-Rules/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,16 @@ describe("All the styles should be applied", function () {
expect(padLeft).toBeFalsy();
});
it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})
});
13 changes: 8 additions & 5 deletions exercises/05-Specificity/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ describe("All the styles should be applied", function () {


it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).not.toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})
it("You should not delete or edit the existing code", function () {
Expand Down
13 changes: 8 additions & 5 deletions exercises/06-Practicing-Rules/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,16 @@ describe("All the styles should be applied", function () {
expect(orangeHoverSelector).toBe('green');
});
it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).not.toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})

Expand Down
13 changes: 8 additions & 5 deletions exercises/07-Very-Specific-Rules/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,16 @@ describe("All the styles should be applied", function () {
}
)
it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).not.toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})

Expand Down
13 changes: 8 additions & 5 deletions exercises/08-Rounded-Image/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,16 @@ describe("All the styles should be applied", function() {
expect(idTagStyles["background-image"]).toBeTruthy();
});
it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).not.toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})
});
13 changes: 8 additions & 5 deletions exercises/09-Anchor-Styles/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ describe("All the styles should be applied", function () {
});

it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).not.toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})
});
Expand Down
13 changes: 8 additions & 5 deletions exercises/12-Relative-Length-EM-REM/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ describe("All the styles should be applied", function () {
}
)
it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).not.toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})

Expand Down
13 changes: 8 additions & 5 deletions exercises/13-Anchor-Like-Button/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,16 @@ describe("All the styles should be applied", function () {
}
)
it("You should not change the existing head tag elements", function () {
let head = document.querySelector('head');
let meta = head.querySelector("meta")
let link = head.querySelector('link').href
let title = head.querySelector('title')
let head = document.querySelector('head')
expect(head).toBeTruthy()

let meta = head.querySelector("meta")
expect(meta).not.toBe(null)
expect(link).toBe('http://localhost/styles.css')

const pathname = new URL(document.querySelector('link').href).pathname
expect(pathname).toBe('/styles.css')

let title = head.querySelector('title')
expect(title).not.toBe(null)
})

Expand Down
6 changes: 3 additions & 3 deletions learn.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"duration": 8,
"difficulty": "easy",
"video-solutions": true,
"graded": false,
"graded": true,
"config": {
"disableGrading": true,
"disableGrading": false,
"editor": {
"version": "1.0.69"
"version": "1.0.71"
}
}
}