| | |
| | | |
| | | |
| | | User loginUser = new User(); |
| | | |
| | | Profile p = [select Id from Profile where id = :System.Label.ProfileId_2S6]; |
| | | /* |
| | | // 20221013 ljh SWAG-CK28WT 注释 |
| | | Profile p = [select Id from Profile where Name = '2S6_销售本部窗口&营业助理']; |
| | | loginUser.ProfileId = p.Id; |
| | | loginUser.FirstName = 'ユーザー'; |
| | |
| | | loginUser.Username = 'test_user@example.com' + System.now().millisecond(); |
| | | loginUser.Alias = 'テユ'; |
| | | loginUser.CommunityNickname = 'tu1' + System.now().millisecond(); |
| | | |
| | | |
| | | insert loginUser; |
| | | System.runAs(loginUser){ |
| | | insert loginUser;*/ |
| | | loginUser = [select id from user where IsActive = true and ProfileId =:p.Id limit 1]; |
| | | // System.runAs(loginUser){ // 20221013 ljh SWAG-CK28WT 注释 |
| | | |
| | | |
| | | //待确认招投标项目 : GI助理/SP助理 and 01.待确认 |
| | |
| | | info.OpportunityStatus__c = ''; |
| | | info.IsBid__c = null; |
| | | info.IsRelateProject__c = null; |
| | | // 20221013 ljh SWAG-CK28WT start |
| | | info.subInfoType__c='1-1:意见征集'; |
| | | info.ownerId = loginUser.Id; |
| | | insert info; |
| | | |
| | | info.GI_assistant__c = String.valueOf(loginUser.Id).subString(0,15); |
| | |
| | | |
| | | //System.assertEquals('00510000005sEEMAA2',info.GI_assistant__c); //18 00510000005sEEMAA2 |
| | | //System.assertEquals(null,loginUser.Id); //18 00510000005sEEMAA2 |
| | | //System.assertEquals(true,info.Is_GIORSP__c); |
| | | //System.assertEquals('01.待确认',info.status__c); |
| | | //System.assertEquals(true,info.Is_GIORSP__c); |
| | | // System.assertEquals(true,info.Is_GIORSP__c); |
| | | System.assertEquals('01.待确认',info.status__c); |
| | | // System.assertEquals(true,info.Is_GIORSP__c); |
| | | |
| | | |
| | | //待关联询价的招投标项目 : GI助理/SP助理 and 04.确认应标 |
| | |
| | | info2.Name = 'TEST002'; |
| | | info2.OpportunityStatus__c = ''; |
| | | info2.IsBid__c = '是'; |
| | | info2.OpportunityNum__c = 0; |
| | | info2.OpportunityNum__c = 0; |
| | | // 20221013 ljh SWAG-CK28WT start |
| | | info2.subInfoType__c='1-1:意见征集'; |
| | | insert info2; |
| | | |
| | | info2.SP_assistant__c = String.valueOf(loginUser.Id).subString(0,15); |
| | |
| | | |
| | | info2 = [select status__c,Is_GIORSP__c from Tender_information__c where id = :info2.Id]; |
| | | |
| | | //System.assertEquals(true,info2.Is_GIORSP__c); |
| | | //System.assertEquals('04.确认应标',info2.status__c); |
| | | |
| | | TenderManageController.getCurrentTenderInformation(); |
| | | |
| | | |
| | | // System.assertEquals(true,info2.Is_GIORSP__c); |
| | | // System.assertEquals('04.确认应标',info2.status__c); |
| | | System.runAs(loginUser){ // 20221013 ljh SWAG-CK28WT add |
| | | TenderManageController.getCurrentTenderInformation(); |
| | | } |
| | | |
| | | |