From b329ab986e250bb27e46ace97cf208f3b26d145a Mon Sep 17 00:00:00 2001
From: FUYU <fuyu@prec-tech.com>
Date: 星期一, 18 十二月 2023 17:38:15 +0800
Subject: [PATCH] 修改复制(不带产品按钮)
---
force-app/main/default/classes/TransferShippmentReceived5ControllerTest.cls | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/TransferShippmentReceived5ControllerTest.cls b/force-app/main/default/classes/TransferShippmentReceived5ControllerTest.cls
index aa42ed1..808dd9b 100644
--- a/force-app/main/default/classes/TransferShippmentReceived5ControllerTest.cls
+++ b/force-app/main/default/classes/TransferShippmentReceived5ControllerTest.cls
@@ -1,6 +1,8 @@
@isTest
public class TransferShippmentReceived5ControllerTest {
static private User u;
+
+ // @testSetup
static void setupTestData1() {
StaticParameter.EscapeNFM001AgencyContractTrigger = true;
StaticParameter.EscapeNFM001Trigger = true;
@@ -96,6 +98,7 @@
insert new Product2[] {pro1, pro2, pro3};
+ AssetHandler.disabled = true;
// 淇濇湁璁惧
Asset asset1 = new Asset(Asset_Owner__c = 'Olympus');
asset1.RecordTypeId = System.Label.Asset_RecordType;
@@ -333,8 +336,8 @@
}
@isTest
public static void test_init() {
- Test.startTest();
setupTestData1();
+ Test.startTest();
System.runAs(u) {
List<TransferApplySummary__c> esList;
@@ -372,6 +375,7 @@
@isTest
public static void test_save() {
setupTestData1();
+ Oly_TriggerHandler.bypass('TransferApplyHandler');
System.runAs(u) {
List<TransferApplySummary__c> esList;
@@ -382,10 +386,10 @@
TransferShippmentReceived5Controller controller = new TransferShippmentReceived5Controller();
+ Test.startTest();
controller.init();
System.assertEquals(true, controller.esdList[0].editable);
- Test.startTest();
controller.esdList[0].rec.Inspection_result_after__c = 'OK';
controller.save();
Test.stopTest();
--
Gitblit v1.9.1