Skip to content
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

Update TTL to 30 mins #3345

Merged
merged 30 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d18db95
Add a new ucfunnel Adapter and test page
Jun 5, 2017
f82a4b7
Add a new ucfunnel Adapter and test page
Jun 5, 2017
4c91775
1. Use prebid lib in the repo to keep updated
RyanChouTw Jun 16, 2017
52eaecb
Merge branch 'master' into master
RyanChouTw Jun 16, 2017
96a70a4
utils.getTopWindowLocation is a function
RyanChouTw Jun 20, 2017
7202a62
Merge branch 'master' of https://github.com/prebid/Prebid.js
RyanChouTw Jun 28, 2017
858b833
Change to modules from adapters
RyanChouTw Jun 28, 2017
8b46932
Migrate to module design
RyanChouTw Jun 28, 2017
d7e043b
[Dev Fix] Remove width and height which can be got from ad unit id
RyanChouTw Jul 13, 2017
badfa53
Merge branch 'master' of https://github.com/prebid/Prebid.js
RyanChouTw Jul 13, 2017
8d81704
Merge pull request #1 from prebid/master
RyanChouTw Sep 25, 2017
8e7fe31
Merge branch 'master' of https://github.com/prebid/Prebid.js
RyanChouTw Dec 21, 2017
5dc00f3
Update ucfunnelBidAdapter to fit into new spec
RyanChouTw Dec 21, 2017
66c3a06
Correct the endpoint. Fix the error of query string
RyanChouTw Dec 21, 2017
0328e97
Add test case for ucfunnelBidAdapter
RyanChouTw Jan 11, 2018
c2c5eb0
Merge branch 'master' of https://github.com/prebid/Prebid.js
RyanChouTw Jan 11, 2018
86fdd23
Fix lint error
RyanChouTw Jan 12, 2018
c331f57
Update version number
RyanChouTw Jan 16, 2018
28acb40
Combine all checks on bid request
RyanChouTw Jan 18, 2018
93621b8
Merge branch 'master' of https://github.com/prebid/Prebid.js
RyanChouTw May 25, 2018
f7f2515
Add GDPR support for ucfunnel adapter
RyanChouTw May 25, 2018
d4f3467
Merge branch 'master' of https://github.com/prebid/Prebid.js
RyanChouTw Jun 14, 2018
1f79c44
Add in-stream video and native support for ucfunnel adapter
RyanChouTw Jun 14, 2018
7d8dc52
Remove demo page. Add more test cases.
RyanChouTw Jun 20, 2018
99fa86e
Change request method from POST to GET
RyanChouTw Jun 26, 2018
03e37e6
Remove unnecessary comment
RyanChouTw Jun 27, 2018
aabfdd4
Support vastXml and vastUrl for video request
RyanChouTw Jul 3, 2018
2177c15
Merge branch 'master' of https://github.com/prebid/Prebid.js
Dec 2, 2018
af05d07
update TTL to 30 mins
Dec 2, 2018
45614c9
Avoid using arrow function which is not discuraged in mocha
Dec 3, 2018
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
2 changes: 1 addition & 1 deletion modules/ucfunnelBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const spec = {
dealId: ad.deal || null,
currency: 'USD',
netRevenue: true,
ttl: 1000
ttl: 1800
};

if (ad.creative_type) {
Expand Down
38 changes: 19 additions & 19 deletions test/spec/modules/ucfunnelBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,34 +89,34 @@ const validNativeBidRes = {
width: 1
};

describe('ucfunnel Adapter', function () {
describe('request', function () {
it('should validate bid request', function () {
describe('ucfunnel Adapter', () => {
describe('request', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use Arrow functions as recommended by mocha.
See here #2987

it('should validate bid request', () => {
expect(spec.isBidRequestValid(validBannerBidReq)).to.equal(true);
});
it('should not validate incorrect bid request', function () {
it('should not validate incorrect bid request', () => {
expect(spec.isBidRequestValid(invalidBannerBidReq)).to.equal(false);
});
});
describe('build request', function () {
describe('build request', () => {
const request = spec.buildRequests([validBannerBidReq]);
it('should create a POST request for every bid', function () {
it('should create a POST request for every bid', () => {
expect(request[0].method).to.equal('GET');
expect(request[0].url).to.equal(location.protocol + spec.ENDPOINT);
});

it('should attach the bid request object', function () {
it('should attach the bid request object', () => {
expect(request[0].bidRequest).to.equal(validBannerBidReq);
});

it('should attach request data', function () {
it('should attach request data', () => {
const data = request[0].data;
const [ width, height ] = validBannerBidReq.sizes[0];
expect(data.w).to.equal(width);
expect(data.h).to.equal(height);
});

it('must parse bid size from a nested array', function () {
it('must parse bid size from a nested array', () => {
const width = 640;
const height = 480;
validBannerBidReq.sizes = [[ width, height ]];
Expand All @@ -127,15 +127,15 @@ describe('ucfunnel Adapter', function () {
});
});

describe('interpretResponse', function () {
describe('should support banner', function () {
describe('interpretResponse', () => {
describe('should support banner', () => {
const request = spec.buildRequests([ validBannerBidReq ]);
const result = spec.interpretResponse({body: validBannerBidRes}, request[0]);
it('should build bid array for banner', function () {
it('should build bid array for banner', () => {
expect(result.length).to.equal(1);
});

it('should have all relevant fields', function () {
it('should have all relevant fields', () => {
const bid = result[0];

expect(bid.mediaType).to.equal(BANNER);
Expand All @@ -147,14 +147,14 @@ describe('ucfunnel Adapter', function () {
});
});

describe('should support video', function () {
describe('should support video', () => {
const request = spec.buildRequests([ validVideoBidReq ]);
const result = spec.interpretResponse({body: validVideoBidRes}, request[0]);
it('should build bid array', function () {
it('should build bid array', () => {
expect(result.length).to.equal(1);
});

it('should have all relevant fields', function () {
it('should have all relevant fields', () => {
const bid = result[0];

expect(bid.mediaType).to.equal(VIDEO);
Expand All @@ -167,14 +167,14 @@ describe('ucfunnel Adapter', function () {
});
});

describe('should support native', function () {
describe('should support native', () => {
const request = spec.buildRequests([ validNativeBidReq ]);
const result = spec.interpretResponse({body: validNativeBidRes}, request[0]);
it('should build bid array', function () {
it('should build bid array', () => {
expect(result.length).to.equal(1);
});

it('should have all relevant fields', function () {
it('should have all relevant fields', () => {
const bid = result[0];

expect(bid.mediaType).to.equal(NATIVE);
Expand Down