Skip to content

Commit

Permalink
test: add isLegacyAuth flag to registration in E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HuanCheng65 committed Feb 21, 2025
1 parent d6baa03 commit d3013ae
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/answer.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('Answers Module', () => {
password: 'abc123456!!!',
email,
emailCode: verificationCode,
isLegacyAuth: true,
});
expect(respond2.status).toBe(201);
return [respond2.body.data.user.id, respond2.body.data.accessToken];
Expand Down Expand Up @@ -108,6 +109,7 @@ describe('Answers Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
1 change: 1 addition & 0 deletions test/attachments.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('Attachment Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
1 change: 1 addition & 0 deletions test/avatars.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe('Avatar Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
2 changes: 2 additions & 0 deletions test/comment.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ describe('comments Module', () => {
password: 'abc123456!!!',
email,
emailCode: verificationCode,
isLegacyAuth: true,
});
expect(respond2.status).toBe(201);
return [respond2.body.data.user, respond2.body.data.accessToken];
Expand Down Expand Up @@ -112,6 +113,7 @@ describe('comments Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
2 changes: 2 additions & 0 deletions test/groups.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('Groups Module', () => {
password: 'abc123456!!!',
email,
emailCode: verificationCode,
isLegacyAuth: true,
});
expect(respond2.status).toBe(201);
return [respond2.body.data.user, respond2.body.data.accessToken];
Expand Down Expand Up @@ -115,6 +116,7 @@ describe('Groups Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
2 changes: 2 additions & 0 deletions test/materialbundle.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe('MaterialBundle Module', () => {
password: 'abc123456!!!',
email,
emailCode: verificationCode,
isLegacyAuth: true,
});
expect(respond2.status).toBe(201);
return respond2.body.data.accessToken;
Expand Down Expand Up @@ -100,6 +101,7 @@ describe('MaterialBundle Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
1 change: 1 addition & 0 deletions test/materials.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ describe('Material Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
2 changes: 2 additions & 0 deletions test/question.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('Questions Module', () => {
password: 'abc123456!!!',
email,
emailCode: verificationCode,
isLegacyAuth: true,
});
expect(respond2.status).toBe(201);
return [respond2.body.data.user.id, respond2.body.data.accessToken];
Expand Down Expand Up @@ -115,6 +116,7 @@ describe('Questions Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
1 change: 1 addition & 0 deletions test/topic.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ describe('Topic Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
2 changes: 2 additions & 0 deletions test/user.follow.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('Following Submodule of User Module', () => {
password: 'abc123456!!!',
email,
emailCode: verificationCode,
isLegacyAuth: true,
});
expect(respond2.status).toBe(201);
return [respond2.body.data.user.id, respond2.body.data.accessToken];
Expand Down Expand Up @@ -105,6 +106,7 @@ describe('Following Submodule of User Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down
1 change: 1 addition & 0 deletions test/user.profile.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('Profile Submodule of User Module', () => {
password: 'abc123456!!!',
email: TestEmail,
emailCode: verificationCode,
isLegacyAuth: true,
});
const respond = await req;
expect(respond.body.message).toStrictEqual('Register successfully.');
Expand Down

0 comments on commit d3013ae

Please sign in to comment.