|
|
@@ -82,7 +82,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
it('应该成功创建商户', async () => {
|
|
|
const createData = {
|
|
|
name: '新商户',
|
|
|
- username: `new_merchant_${Date.now()}`,
|
|
|
+ username: `new_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138000',
|
|
|
realname: '张三',
|
|
|
@@ -142,7 +142,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
const merchantRepository = dataSource.getRepository(Merchant);
|
|
|
const testMerchant = merchantRepository.create({
|
|
|
name: '测试商户',
|
|
|
- username: `test_merchant_${Date.now()}`,
|
|
|
+ username: `tm_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138000',
|
|
|
realname: '张三',
|
|
|
@@ -192,7 +192,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
const merchantRepository = dataSource.getRepository(Merchant);
|
|
|
const testMerchant = merchantRepository.create({
|
|
|
name: '原始商户',
|
|
|
- username: `original_merchant_${Date.now()}`,
|
|
|
+ username: `om_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138000',
|
|
|
realname: '原始姓名',
|
|
|
@@ -237,7 +237,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
const merchantRepository = dataSource.getRepository(Merchant);
|
|
|
const testMerchant = merchantRepository.create({
|
|
|
name: '待删除商户',
|
|
|
- username: `delete_merchant_${Date.now()}`,
|
|
|
+ username: `dm_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138000',
|
|
|
realname: '张三',
|
|
|
@@ -269,7 +269,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
it('管理员应该可以为其他用户创建商户', async () => {
|
|
|
const createData = {
|
|
|
name: '其他用户商户',
|
|
|
- username: `other_user_merchant_${Date.now()}`,
|
|
|
+ username: `oum_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138001',
|
|
|
realname: '李四',
|
|
|
@@ -302,7 +302,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
|
|
|
const userMerchant1 = merchantRepository.create({
|
|
|
name: '用户商户1',
|
|
|
- username: `user_merchant1_${Date.now()}`,
|
|
|
+ username: `um1_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138002',
|
|
|
realname: '张三',
|
|
|
@@ -313,7 +313,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
|
|
|
const userMerchant2 = merchantRepository.create({
|
|
|
name: '用户商户2',
|
|
|
- username: `user_merchant2_${Date.now()}`,
|
|
|
+ username: `um2_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138003',
|
|
|
realname: '李四',
|
|
|
@@ -345,7 +345,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
const merchantRepository = dataSource.getRepository(Merchant);
|
|
|
const testMerchant = merchantRepository.create({
|
|
|
name: '原始商户',
|
|
|
- username: `original_merchant_${Date.now()}`,
|
|
|
+ username: `om_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138004',
|
|
|
realname: '王五',
|
|
|
@@ -386,7 +386,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
const merchantRepository = dataSource.getRepository(Merchant);
|
|
|
const testMerchant = merchantRepository.create({
|
|
|
name: '待删除商户',
|
|
|
- username: `delete_merchant_${Date.now()}`,
|
|
|
+ username: `dm_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138005',
|
|
|
realname: '赵六',
|
|
|
@@ -420,7 +420,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
|
|
|
const userMerchant = merchantRepository.create({
|
|
|
name: '指定用户商户',
|
|
|
- username: `specific_user_merchant_${Date.now()}`,
|
|
|
+ username: `sum_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138006',
|
|
|
realname: '钱七',
|
|
|
@@ -458,7 +458,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
// 创建启用状态的商户
|
|
|
const createData = {
|
|
|
name: '状态测试商户',
|
|
|
- username: `state_test_merchant_${Date.now()}`,
|
|
|
+ username: `stm_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138007',
|
|
|
realname: '状态测试',
|
|
|
@@ -498,7 +498,7 @@ describe('管理员商户管理API集成测试', () => {
|
|
|
// 创建商户
|
|
|
const createData = {
|
|
|
name: '登录统计商户',
|
|
|
- username: `login_stat_merchant_${Date.now()}`,
|
|
|
+ username: `lsm_${Date.now()}`,
|
|
|
password: 'password123',
|
|
|
phone: '13800138008',
|
|
|
realname: '登录统计',
|