Blame view

src/main/java/com/essa/testSuite/TestLoadContainer.java 4.28 KB
d3c5a77a   zengjin   idea第一次提交
1
2
  package com.essa.testSuite;
  
d3c5a77a   zengjin   idea第一次提交
3
  import com.essa.pageObject.BaseTest;
d7f15c1c   zengjin   提交并且覆盖之前的
4
  import com.essa.pageObject.DocumentaryManage.BillingCenterPage;
a294c18e   zengjin   修改设置装柜的返回值
5
6
7
  import com.essa.pageObject.DocumentaryManage.ConvertTailPage;
  import com.essa.pageObject.DocumentaryManage.POBoardPage;
  import com.essa.pageObject.DocumentaryManage.PODocumentaryListPage;
d7f15c1c   zengjin   提交并且覆盖之前的
8
  import com.essa.pageObject.HomePage;
d3c5a77a   zengjin   idea第一次提交
9
10
11
12
  import com.essa.pageObject.StorageManage.GoodsReceiveTaskPage;
  import com.essa.pageObject.StorageManage.NoticeReceivePage;
  import com.essa.pageObject.StorageManage.ReceiveTaskDealPage;
  import com.essa.pageObject.needDealt.NeedDealtApplyPage;
d7f15c1c   zengjin   提交并且覆盖之前的
13
14
15
16
17
18
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.support.PageFactory;
  import org.testng.annotations.AfterClass;
  import org.testng.annotations.BeforeClass;
  import org.testng.annotations.Test;
  import org.testng.asserts.SoftAssert;
d3c5a77a   zengjin   idea第一次提交
19
  
d7f15c1c   zengjin   提交并且覆盖之前的
20
  public class TestLoadContainer extends BaseTest {
0b640e79   zengjin   修改设置装柜的返回值
21
  	WebDriver driver;
d3c5a77a   zengjin   idea第一次提交
22
  
0b640e79   zengjin   修改设置装柜的返回值
23
24
25
  	@BeforeClass
  	public void setUp() {
  		initsetUp();
d7f15c1c   zengjin   提交并且覆盖之前的
26
27
  		loginValid("zhidanbu");
  //		loginValid("chenyijie");
0b640e79   zengjin   修改设置装柜的返回值
28
  	}
d3c5a77a   zengjin   idea第一次提交
29
  
0b640e79   zengjin   修改设置装柜的返回值
30
31
32
33
  	@AfterClass
  	public void tearDown() {
  		driver.quit();
  	}
a524812a   zengjin   idea增加epd环境
34
  
0b640e79   zengjin   修改设置装柜的返回值
35
36
37
38
  	/**
  	 * 转尾货
  	 */
  	@Test
d7f15c1c   zengjin   提交并且覆盖之前的
39
  	public void toTail() {
0b640e79   zengjin   修改设置装柜的返回值
40
  		driver = getDriver();
d7f15c1c   zengjin   提交并且覆盖之前的
41
  		loginValid("chenyijie");
0b640e79   zengjin   修改设置装柜的返回值
42
43
44
45
46
47
48
49
50
  		HomePage homePage = PageFactory.initElements(driver, HomePage.class);
  		PODocumentaryListPage poDocumentaryListPage = PageFactory.initElements(driver, PODocumentaryListPage.class);
  		POBoardPage poBoardPage = PageFactory.initElements(driver, POBoardPage.class);
  		ConvertTailPage convertTailPage = PageFactory.initElements(driver, ConvertTailPage.class);
  		homePage.toPoDocumentaryListPage();
  		poDocumentaryListPage.todetail();
  		poBoardPage.toTail();
  		convertTailPage.convertTail();
  	}
a524812a   zengjin   idea增加epd环境
51
  
0b640e79   zengjin   修改设置装柜的返回值
52
53
54
55
56
57
58
59
60
61
62
  	/**
  	 * 设置收货、装柜的仓库地址
  	 */
  	@Test
  	public void noticReceive() {
  		driver = getDriver();
  		HomePage homePage = PageFactory.initElements(driver, HomePage.class);
  		NoticeReceivePage noticeReceivePage = PageFactory.initElements(driver, NoticeReceivePage.class);
  		homePage.toNoticeReceivePage();
  		noticeReceivePage.setWareHouse();
  	}
a524812a   zengjin   idea增加epd环境
63
  
0b640e79   zengjin   修改设置装柜的返回值
64
  	/**
d7f15c1c   zengjin   提交并且覆盖之前的
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
  	 * 通知收货、装柜
  	 */
  	@Test(description = "通知收货、装柜")
  	public void NoticeReceiveAndLoad(){
  		this.driver = getDriver();
  		HomePage homePage = PageFactory.initElements(driver,HomePage.class);
  		homePage.toPoDocumentaryListPage();
  		PODocumentaryListPage poDocumentaryListPage = PageFactory.initElements(driver,PODocumentaryListPage.class);
  		POBoardPage poBoardPage = PageFactory.initElements(driver,POBoardPage.class);
  		poDocumentaryListPage.toPoFollowDetail();
  
  		//通知收货
  		poBoardPage.noticeReceive();
  
  		//断言:通知收货是否成功
  		boolean actualReceive = poBoardPage.isNoticeReceSucceed();
  		SoftAssert softAssert = new SoftAssert();
  		softAssert.assertEquals(actualReceive,true,"通知收货失败!");
  		//通知装柜
  		poBoardPage.noticeLoad();
  
  		//断言:通知装柜是否成功
  		boolean actualLoae = poBoardPage.isNoticeLoadSucceed();
  		softAssert.assertEquals(actualLoae,true,"通知装柜失败!");
  		softAssert.assertAll();
  //		homePage.logout();
  	}
  
  	/**
  	 * 收货任务管理,处理
0b640e79   zengjin   修改设置装柜的返回值
95
96
97
98
99
100
101
102
  	 */
  	@Test
  	public void dealWithDelivery() {
  		driver = getDriver();
  		HomePage homePage = PageFactory.initElements(driver, HomePage.class);
  		GoodsReceiveTaskPage goodsReceiveTaskPage = PageFactory.initElements(driver, GoodsReceiveTaskPage.class);
  		ReceiveTaskDealPage receiveTaskDealPage = PageFactory.initElements(driver, ReceiveTaskDealPage.class);
  		homePage.toGoodsReceiveTaskPage();
1458ba60   zengjin   组装用例
103
  		do {
d7f15c1c   zengjin   提交并且覆盖之前的
104
105
  			goodsReceiveTaskPage.dealReceive();
  			receiveTaskDealPage.allReceive();
1458ba60   zengjin   组装用例
106
  		}while (!(goodsReceiveTaskPage.isFinish()));
0b640e79   zengjin   修改设置装柜的返回值
107
  	}
a524812a   zengjin   idea增加epd环境
108
  
0b640e79   zengjin   修改设置装柜的返回值
109
110
111
112
113
114
  	/**
  	 * 大跟单确认船期
  	 */
  	@Test
  	public void confirmSailingDate() {
  		driver = getDriver();
d7f15c1c   zengjin   提交并且覆盖之前的
115
  		loginValid("yuwanhang");
0b640e79   zengjin   修改设置装柜的返回值
116
117
118
119
120
  		HomePage homePage = PageFactory.initElements(driver, HomePage.class);
  		NeedDealtApplyPage needDealtApplyPage = PageFactory.initElements(driver, NeedDealtApplyPage.class);
  		homePage.toSailingDateConfirmPage();
  		needDealtApplyPage.confirmSailingDate();
  	}
d7f15c1c   zengjin   提交并且覆盖之前的
121
122
123
124
125
126
127
128
129
130
131
132
133
134
  	/**
  	 *制单部发单
  	 * @param
  	 * @return
  	 */
  	@Test
  	public void Billing(){
  		this.driver = getDriver();
  		HomePage homePage = PageFactory.initElements(driver, HomePage.class);
  		BillingCenterPage billingCenterPage = PageFactory.initElements(driver,BillingCenterPage.class);
  		homePage.toBillingCenterPage();
  		billingCenterPage.MoreBilling();
  		homePage.logout();
  	}
d3c5a77a   zengjin   idea第一次提交
135
  }