Skip to content

Commit

Permalink
Nits: spacing, refactoring, unnecessary imports
Browse files Browse the repository at this point in the history
TestEnvironment:
- Need to mock the Dom environment for tests to pass now that we are using the WebApi to create elements
TaggingContainer:
- switched to use `value` instead of `defaultValue` which is actually what we want
  • Loading branch information
rgomezp committed Jul 30, 2020
1 parent d4484eb commit 342adb7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/managers/tagManager/page/TagManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ export default class TagManager implements ITagManager {
// no change detected, return {}
return finalTagsObject;
}

/**
* @param {TagsObject} tags - values of type "boolean"
* @returns void
*/
storeTagValuesToUpdate(tags: TagsObjectWithBoolean): void {
this.tagsFromTaggingContainer = tags;
}

/**
* @param {TagsObject} remoteTags - values of type "number"
* @returns void
Expand Down
2 changes: 1 addition & 1 deletion src/slidedown/TaggingContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class TaggingContainer {
const tags: TagsObjectWithBoolean = {};

inputNodeArr.forEach(node => {
tags[(<HTMLInputElement>node).defaultValue] = (<HTMLInputElement>node).checked;
tags[(<HTMLInputElement>node).value] = (<HTMLInputElement>node).checked;
});
return tags;
}
Expand Down
1 change: 1 addition & 0 deletions test/support/sdk/TestEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export class TestEnvironment {
}

let html = '<!doctype html><html><head></head><body></body></html>';
global.document = jsdom.jsdom('');
if (config.addPrompts) {
html = `<!doctype html><html><head>\
<div class="${CustomLink.containerClass}"></div>\
Expand Down

0 comments on commit 342adb7

Please sign in to comment.