Skip to content

Pubwise 481 #8

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 24 commits into from
Nov 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e9721c8
updates for first cut at bidder
GLStephen Nov 12, 2020
0277aca
fix up height and width
GLStephen Nov 13, 2020
9161810
adds test spec
GLStephen Nov 15, 2020
a2f4946
remove hello_world from commit'
GLStephen Nov 15, 2020
7700d9b
updates to support native and fix issues found in initial review
GLStephen Nov 22, 2020
39e2228
fix handling of new node in response for native vs banner
GLStephen Nov 23, 2020
860b1cc
updates to handle OpenRTB base
GLStephen Nov 25, 2020
3a1607e
updates to support RTB style calls
GLStephen Nov 25, 2020
2b9de0d
updates to get back to parity
GLStephen Nov 25, 2020
fde493a
updates to testing
GLStephen Nov 25, 2020
d49be62
updates to test media type handling
GLStephen Nov 25, 2020
ba548b7
:Merge branch 'external-pw-481' of github.com:PubWise/Prebid.js into …
GLStephen Nov 25, 2020
28d4b7c
updates to handling testing
GLStephen Nov 25, 2020
62c3007
updates to testing
GLStephen Nov 28, 2020
c10b9a7
remove report file
GLStephen Nov 28, 2020
25f9df4
updates to fix up unit/spec tests
GLStephen Nov 28, 2020
6cbd498
updates to fix up unit/spec tests
GLStephen Nov 28, 2020
bd8c7a7
updates to fix up unit/spec tests
GLStephen Nov 28, 2020
c0396fe
updates to handling of gdpr
GLStephen Nov 28, 2020
bec22f1
Delete hello_world.html
GLStephen Nov 28, 2020
2c8c3c6
remove hellow-world-sample
GLStephen Nov 28, 2020
7484100
remove hellow-world-sample
GLStephen Nov 28, 2020
48889f7
updates to fix param tes
GLStephen Nov 29, 2020
6b835f3
fix merge
GLStephen Nov 29, 2020
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
6 changes: 5 additions & 1 deletion modules/pubwiseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ export const spec = {
* @return boolean True if this is a valid bid, and false otherwise.
*/
isBidRequestValid: function (bid) {
if (bid.params && bid.params) {
// siteId is required
if (bid.params && bid.params.siteId) {
// it must be a string
if (!utils.isStr(bid.params.siteId)) {
_logWarn('siteId is required for bid', bid);
return false;
}
} else {
return false;
}

return true;
Expand Down
15 changes: 7 additions & 8 deletions test/spec/modules/pubwiseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,30 +496,29 @@ describe('PubWiseAdapter', function () {
bidder: 'pubwise',
params: {
siteId: 'xxxxxx',
placeHolder: ''
gender: 'M',
}
},
isValid = spec.isBidRequestValid(validBid);
expect(isValid).to.equal(true);
});

it('invalid bid: no siteId', function () {
let validBid = {
let inValidBid = {
bidder: 'pubwise',
params: {
placeHolder: ''
gender: 'M',
}
},
isValid = spec.isBidRequestValid(validBid);
isValid = spec.isBidRequestValid(inValidBid);
expect(isValid).to.equal(false);
});

it('invalid bid: siteId shuold be a sring', function () {
it('invalid bid: siteId should be a string', function () {
let validBid = {
bidder: 'pubwise',
params: {
publisherId: 100000,
placeHolder: ''
siteId: 123456
}
},
isValid = spec.isBidRequestValid(validBid);
Expand All @@ -530,7 +529,7 @@ describe('PubWiseAdapter', function () {
describe('Handling Request Construction', function () {
it('bid requests are not mutable', function() {
let sourceBidRequest = utils.deepClone(sampleValidBidRequests)
let request = spec.buildRequests(sampleValidBidRequests, {auctinId: 'placeholder'});
spec.buildRequests(sampleValidBidRequests, {auctinId: 'placeholder'});
expect(sampleValidBidRequests).to.deep.equal(sourceBidRequest, 'Should be unedited as they are used elsewhere');
});
it('should handle complex bidRequest', function() {
Expand Down