Skip to content

Commit 664c06f

Browse files
test: fix e2e tests
1 parent 6978d16 commit 664c06f

4 files changed

Lines changed: 25 additions & 1 deletion

File tree

‎src/extensions/endpoints/adoption-code/test/index.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ describe('adoption code endpoints', () => {
430430
});
431431
});
432432

433-
it.only('should not accept valid verification code if request to GP api failed', async () => {
433+
it('should not accept valid verification code if request to GP api failed', async () => {
434434
let code = '';
435435
nock('https://api.globalping.io').post('/v1/adoption-code', (body) => {
436436
expect(body.ip).to.equal('1.1.1.1');

‎test/e2e/tests/credits.spec.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const addCredits = async (user: User) => {
1313
asn: 16019,
1414
city: 'Prague',
1515
country: 'CZ',
16+
countryName: 'Czech Republic',
17+
continent: 'EU',
18+
continentName: 'Europe',
19+
region: 'Eastern Europe',
1620
date_created: '2024-02-22 11:02:12',
1721
date_updated: null,
1822
ip: probeIP,

‎test/e2e/tests/index.spec.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const addData = async (user: User) => {
1313
asn: 3302,
1414
city: 'Naples',
1515
country: 'IT',
16+
countryName: 'Italy',
17+
continent: 'EU',
18+
continentName: 'Europe',
19+
region: 'Southern Europe',
1620
date_created: '2024-02-22 11:04:30',
1721
date_updated: '2024-02-22 11:05:48',
1822
ip: probeIP,
@@ -43,6 +47,10 @@ const addData = async (user: User) => {
4347
asn: 16019,
4448
city: 'Prague',
4549
country: 'CZ',
50+
countryName: 'Czech Republic',
51+
continent: 'EU',
52+
continentName: 'Europe',
53+
region: 'Eastern Europe',
4654
date_created: '2024-02-22 11:02:12',
4755
date_updated: null,
4856
ip: randomIP(),

‎test/e2e/tests/probes.spec.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ const addUserProbes = async (user: User) => {
1717
asn: 16019,
1818
city: 'Prague',
1919
country: 'CZ',
20+
countryName: 'Czech Republic',
21+
continent: 'EU',
22+
continentName: 'Europe',
23+
region: 'Eastern Europe',
2024
date_created: '2024-02-22 11:02:12',
2125
date_updated: null,
2226
ip: randomIP(),
@@ -41,6 +45,10 @@ const addUserProbes = async (user: User) => {
4145
asn: 3302,
4246
city: 'Naples',
4347
country: 'IT',
48+
countryName: 'Italy',
49+
continent: 'EU',
50+
continentName: 'Europe',
51+
region: 'Southern Europe',
4452
date_created: '2024-02-22 11:04:30',
4553
date_updated: '2024-02-22 11:05:48',
4654
ip: randomIP(),
@@ -77,6 +85,10 @@ const defaultProbe = {
7785
asn: 3302,
7886
city: 'Ouagadougou',
7987
country: 'BF',
88+
countryName: 'Burkina Faso',
89+
continent: 'AF',
90+
continentName: 'Africa',
91+
region: 'Western Africa',
8092
date_created: new Date(),
8193
lastSyncDate: new Date(),
8294
latitude: 12.37,

0 commit comments

Comments
 (0)