summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/att/ecomp/dcae/ci/ui/tests/ServiceTest.java
blob: bc9903397258e4c7c35b562afb328cfc847782df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.att.ecomp.dcae.ci.ui.tests;

import java.util.UUID;

import org.openecomp.d2.ci.datatypes.UserRoleEnum;
import org.openecomp.d2.ci.utilities.GeneralUIUtils;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Test;

import com.att.ecomp.dcae.ci.ui.pages.DCAEHomePage;
import com.att.ecomp.dcae.ci.ui.setup.ConfigTest;

public class ServiceTest extends ConfigTest {

	@Override
	protected UserRoleEnum getUserRole() {
		return UserRoleEnum.DESIGNER;
	}
	
	@Test
	public void createServiceTest(){
		DCAEHomePage.clickOnDcaeTab();
		
		GeneralUIUtils.hoverOnAreaByTestId("AddButtonsArea");
		GeneralUIUtils.findByText("Add Service Assurance Template").click();
		GeneralUIUtils.ultimateWait();
		
		WebElement nameTextbox = GeneralUIUtils.getWebElementByTestID("name");
		nameTextbox.clear();
		nameTextbox.sendKeys("autoServicer" + UUID.randomUUID());
		
		WebElement descriptionTextbox = GeneralUIUtils.getWebElementByTestID("description");
		descriptionTextbox.clear();
		descriptionTextbox.sendKeys("new service");
		
		GeneralUIUtils.findByText("Create").click();
		GeneralUIUtils.ultimateWait();
	}



}