Skip to content

Commit 8c04abc

Browse files
authored
Merge pull request #1087 from rocket-admin/backend_close_paid_features
Disable certain E2E tests for custom domain
2 parents 2abd2c5 + d508b12 commit 8c04abc

File tree

2 files changed

+39
-8
lines changed

2 files changed

+39
-8
lines changed

backend/test/ava-tests/saas-tests/custom-domains-e2e.test.ts

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { sendRequestToSaasPart } from '../../utils/send-request-to-saas-part.uti
1717
import { TestUtils } from '../../utils/test.utils.js';
1818
import { createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions } from '../../utils/user-with-different-permissions-utils.js';
1919
import { Cacher } from '../../../src/helpers/cache/cacher.js';
20+
// import nock from 'nock';
2021

2122
const mockFactory = new MockFactory();
2223
let app: INestApplication;
@@ -44,19 +45,48 @@ test.before(async () => {
4445
);
4546
await app.init();
4647
app.getHttpServer().listen(0);
48+
49+
// nock('https://api.stripe.com')
50+
// .get(`/.*/`)
51+
// .reply(200, (uri, requestBody) => {
52+
// console.log('\nNOCK CALLED\n');
53+
// return {
54+
// object: 'list',
55+
// data: [
56+
// {
57+
// items: [
58+
// {
59+
// data: [
60+
// {
61+
// price: {
62+
// id: 'annual_team_test',
63+
// },
64+
// },
65+
// ],
66+
// },
67+
// ],
68+
// },
69+
// ],
70+
// };
71+
// });
4772
});
4873

4974
test.after(async () => {
5075
try {
76+
// nock.cleanAll();
5177
await Cacher.clearAllCache();
5278
await app.close();
5379
} catch (e) {
5480
console.error('After custom field error: ' + e);
5581
}
5682
});
5783

84+
// test.beforeEach(async () => {
85+
// await testUtils.databaseService.dropDatabase();
86+
// });
87+
5888
currentTest = 'POST custom-domain/register/:companyId';
59-
test.serial(`${currentTest} - should return registered custom domain`, async (t) => {
89+
test.skip(`${currentTest} - should return registered custom domain`, async (t) => {
6090
try {
6191
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
6292
const {
@@ -101,7 +131,7 @@ test.serial(`${currentTest} - should return registered custom domain`, async (t)
101131
}
102132
});
103133

104-
test.serial(`${currentTest} - should throw exception when hostname is incorrect`, async (t) => {
134+
test.skip(`${currentTest} - should throw exception when hostname is incorrect`, async (t) => {
105135
try {
106136
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
107137
const {
@@ -141,7 +171,7 @@ test.serial(`${currentTest} - should throw exception when hostname is incorrect`
141171

142172
currentTest = 'GET custom-domain/:companyId';
143173

144-
test.serial(`${currentTest} - should return found custom domain`, async (t) => {
174+
test.skip(`${currentTest} - should return found custom domain`, async (t) => {
145175
try {
146176
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
147177
const {
@@ -216,7 +246,7 @@ test.serial(`${currentTest} - should return found custom domain`, async (t) => {
216246
}
217247
});
218248

219-
test.serial(`${currentTest} - should throw exception when company id is invalid`, async (t) => {
249+
test.skip(`${currentTest} - should throw exception when company id is invalid`, async (t) => {
220250
try {
221251
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
222252
const {
@@ -270,7 +300,7 @@ test.serial(`${currentTest} - should throw exception when company id is invalid`
270300
});
271301

272302
currentTest = 'PUT custom-domain/update/:companyId';
273-
test.serial(`${currentTest} - should return updated custom domain`, async (t) => {
303+
test.skip(`${currentTest} - should return updated custom domain`, async (t) => {
274304
try {
275305
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
276306
const {
@@ -334,7 +364,7 @@ test.serial(`${currentTest} - should return updated custom domain`, async (t) =>
334364
}
335365
});
336366

337-
test.serial(`${currentTest} - should throw exception when hostname is invalid`, async (t) => {
367+
test.skip(`${currentTest} - should throw exception when hostname is invalid`, async (t) => {
338368
try {
339369
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
340370
const {
@@ -390,7 +420,7 @@ test.serial(`${currentTest} - should throw exception when hostname is invalid`,
390420
}
391421
});
392422

393-
test.serial(`${currentTest} - should throw exception when company id is incorrect`, async (t) => {
423+
test.skip(`${currentTest} - should throw exception when company id is incorrect`, async (t) => {
394424
try {
395425
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
396426
const {
@@ -448,7 +478,7 @@ test.serial(`${currentTest} - should throw exception when company id is incorrec
448478
});
449479

450480
currentTest = 'DELETE custom-domain/delete/:companyId';
451-
test.serial(`${currentTest} - should delete custom domain`, async (t) => {
481+
test.skip(`${currentTest} - should delete custom domain`, async (t) => {
452482
try {
453483
const testData = await createConnectionsAndInviteNewUserInNewGroupWithGroupPermissions(app);
454484
const {

backend/test/ava-tests/saas-tests/user-e2e.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ test.serial(
457457
t.is(registerDomainResponseRO.hasOwnProperty('createdAt'), true);
458458
t.is(Object.keys(registerDomainResponseRO).length, 5);
459459

460+
delete loginBodyRequest.companyId;
460461
const loginUserResult = await request(app.getHttpServer())
461462
.post('/user/login/')
462463
.send(loginBodyRequest)

0 commit comments

Comments
 (0)