Skip to content

Fixed test bug for Part 2.2 #13

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 12 additions & 7 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('Git Checks', function() {

// 'dtr' contains module exportsfrom 01-data-to-rows
describe('Part 1: From Data to Rows', function() {

it('tagIt should return a string of the form <tagname>content</tagname>, even if the content and tagname are random English words', function() {
let t = 'h1',
c = 'Header Words',
Expand All @@ -157,7 +157,9 @@ describe('Part 1: From Data to Rows', function() {
});

it('peopleRows should return a full <table> with appropriate data', function() {
expect (dtr.peopleRows([dtr.biko, dtr.tambo]), 'Check your table code for differences').to.equal(`<table><tr><td>Steve Biko</td><td>1946</td><td>1977</td><td>SASO,Black Consciousness</td><td>The most potent weapon in the hands of the oppressor is the mind of the oppressed.</td></tr><tr><td>Oliver Tambo</td><td>1917</td><td>1993</td><td>ANC</td><td>The fight for freedom must go on until it is won; until our country is free and happy and peaceful as part of the community of man, we cannot rest.</td></tr></table>`) ;
expect (dtr.peopleRows([dtr.biko, dtr.tambo]),
'Check your table code for differences').to
.equal(`<table><tr><td>Steve Biko</td><td>1946</td><td>1977</td><td>SASO,Black Consciousness</td><td>The most potent weapon in the hands of the oppressor is the mind of the oppressed.</td></tr><tr><td>Oliver Tambo</td><td>1917</td><td>1993</td><td>ANC</td><td>The fight for freedom must go on until it is won; until our country is free and happy and peaceful as part of the community of man, we cannot rest.</td></tr></table>`) ;
});
});

Expand Down Expand Up @@ -210,13 +212,16 @@ describe('Part 2: Dom Tricks', function(done) {
done();
});

// TODO: fix
it('Nav Border Color', function(done) {
expect($('nav').css("border-bottom-width"), 'The `border-bottom width` property should be set to 10px').
it('Nav Border', function(done) {
// console.log("border-bottom", $('nav').css())
expect($('nav').css("border-bottom-width"),
'The `border bottom` shold be set to 10px').
to.equal('10px');
expect($('nav').css("border-bottom-style"), 'The `border-bottom style` property should be set to solid').
expect($('nav').css("border-bottom-style"),
'The `background-color` property should be set to blue').
to.equal('solid');
expect($('nav').css("border-bottom-color"), 'The `border-bottom coloe` property should be set to rgb(180,40,40)').
expect($('nav').css("border-bottom-color"),
'The `background-color` property should be set to blue').
to.equal('rgb(180,40,40)');

done();
Expand Down