ft-webplatform/test/integration/qa-feeds.spec.js

125 lines
5.4 KiB
JavaScript
Raw Normal View History

2017-09-28 12:04:16 +00:00
import {getJsonFeed, expectJsonResponse} from './utils/integration-test-utils';
describe('qa etf-us feeds', () => {
let testFeeds = [
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.distribution-history',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.fund-details',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.overview',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.performance',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.performance-history',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.portfolio',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.price',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/18000/etf.price-history',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/etf.fund-labels',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/gw.fund-config',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/gw.fund-alert',
'http://rcovlnx0192:8322/etf-us/investor/data/etf/etf.ppss'
];
it('http://rcovlnx0192:8322/etf-us/investor/data/gw.caveats needs to be implemented');
testFeeds.forEach((testFeed) => {
it(testFeed + ' should return valid JSON', done => {
getJsonFeed(testFeed)
.then(response => {
expectJsonResponse(response, done);
})
.then(done)
.catch((e) => {
expect(e).toBeNull();
done();
});
});
});
});
describe('qa etf-gb feeds', () => {
let testFeeds = [
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.distribution-history',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.fund-details',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.overview',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.performance',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.performance-history',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.portfolio',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.price',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/25802/etf.price-history',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/gw.caveats',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/etf.fund-labels',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/gw.fund-config',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/gw.fund-alert',
'http://rcovlnx0192:8322/etf-gb/investor/data/etf/etf.ppss'
];
testFeeds.forEach((testFeed) => {
it(testFeed + ' should return valid JSON', done => {
getJsonFeed(testFeed)
.then(response => {
expectJsonResponse(response, done);
})
.then(done)
.catch((e) => {
expect(e).toBeNull();
done();
});
});
});
});
describe('qa etf-de feeds', () => {
let testFeeds = [
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.distribution-history',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.fund-details',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.overview',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.performance',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.performance-history',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.portfolio',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.price',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/25799/etf.price-history',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/gw.caveats',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/etf.fund-labels',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/gw.fund-config',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/gw.fund-alert',
'http://rcovlnx0192:8322/etf-de/privatanleger/data/etf/etf.ppss'
];
testFeeds.forEach((testFeed) => {
it(testFeed + ' should return valid JSON', done => {
getJsonFeed(testFeed)
.then(response => {
expectJsonResponse(response, done);
})
.then(done)
.catch((e) => {
expect(e).toBeNull();
done();
});
});
});
});
describe('qa en-gb feeds', () => {
let testFeeds = [
'http://rcovlnx0192:8322/en-gb/investor/data/gw/12904/gw.fund-details',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/12904/gw.overview',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/12904/gw.price-distribution',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/12904/gw.portfolio',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/12904/gw.performance',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/gw.caveats',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/gw.fund-labels',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/gw.fund-config',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/gw.fund-alert',
'http://rcovlnx0192:8322/en-gb/investor/data/gw/gw.ppss'
];
it('http://rcovlnx0192:8322/en-gb/investor/data/12904/gw.nav-history needs to be implemented');
it('http://rcovlnx0192:8322/en-gb/investor/data/12904/gw.performance-history needs to be implemented');
testFeeds.forEach((testFeed) => {
it(testFeed + ' should return valid JSON', done => {
getJsonFeed(testFeed)
.then(response => {
expectJsonResponse(response, done);
})
.then(done)
.catch((e) => {
expect(e).toBeNull();
done();
});
});
});
});