This commit is contained in:
@@ -208,8 +208,9 @@ try {
|
||||
const reduced = await req('/admin/channels/' + channel.id, { carriers: ['mobile'] });
|
||||
assert.equal(reduced.status, 200, await reduced.text());
|
||||
assert.deepEqual((await db.smsChannel.findUnique({ where: { id: channel.id } })).carriers, ['mobile']);
|
||||
assert.equal(await db.smsChannelGroupItem.count({ where: { groupId: unicom.id, channelId: channel.id } }), 1);
|
||||
pass('carrier reduction saves with active group references preserved');
|
||||
assert.equal(await db.smsChannelGroupItem.count({ where: { groupId: unicom.id, channelId: channel.id } }), 0);
|
||||
assert.equal(await db.smsChannelGroupItem.count({ where: { groupId: group.id, channelId: channel.id } }), 1);
|
||||
pass('carrier reduction removes incompatible members and preserves supported group members');
|
||||
const batch = await db.smsBatchTask.create({
|
||||
data: { tenantId: tenant.id, applicationId: application.id, taskNo: key(), content, phoneTotal: 1 },
|
||||
});
|
||||
@@ -373,6 +374,8 @@ try {
|
||||
.click();
|
||||
await page.getByRole('heading', { name: '编辑通道', exact: true }).waitFor();
|
||||
await page.getByRole('checkbox', { name: '联通', exact: true }).uncheck();
|
||||
assert(await page.getByRole('button', { name: '确认', exact: true }).isDisabled());
|
||||
await page.getByRole('checkbox', { name: /我已确认移除运营商/ }).check();
|
||||
await page.screenshot({ path: `.local-data/template-optout-20260920/channel-${width}.png`, fullPage: true });
|
||||
await page.getByRole('button', { name: '确认', exact: true }).click();
|
||||
await page.getByRole('heading', { name: '编辑通道', exact: true }).waitFor({ state: 'hidden' });
|
||||
|
||||
Reference in New Issue
Block a user