kezhenxu94
3 years ago
committed by
GitHub
73 changed files with 0 additions and 5138 deletions
@ -1,163 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more |
||||
~ contributor license agreements. See the NOTICE file distributed with |
||||
~ this work for additional information regarding copyright ownership. |
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
~ (the "License"); you may not use this file except in compliance with |
||||
~ the License. You may obtain a copy of the License at |
||||
~ |
||||
~ http://www.apache.org/licenses/LICENSE-2.0 |
||||
~ |
||||
~ Unless required by applicable law or agreed to in writing, software |
||||
~ distributed under the License is distributed on an "AS IS" BASIS, |
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
~ See the License for the specific language governing permissions and |
||||
~ limitations under the License. |
||||
--> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<groupId>org.apache.dolphinscheduler-e2e</groupId> |
||||
<artifactId>dolphinscheduler-e2e</artifactId> |
||||
<version>1.0.0</version> |
||||
|
||||
<properties> |
||||
<testng.version>6.14.3</testng.version> |
||||
<selenium.version>3.141.59</selenium.version> |
||||
<guava.version>22.0</guava.version> |
||||
<commons-io.version>2.6</commons-io.version> |
||||
<reportng.version>1.1.4</reportng.version> |
||||
<commons-pool2.version>2.8.0</commons-pool2.version> |
||||
<inject.version>4.2.1</inject.version> |
||||
<xml.file>testng.xml</xml.file> |
||||
</properties> |
||||
|
||||
<dependencies> |
||||
<!-- selenium --> |
||||
<dependency> |
||||
<groupId>org.seleniumhq.selenium</groupId> |
||||
<artifactId>selenium-java</artifactId> |
||||
<version>${selenium.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.google.guava</groupId> |
||||
<artifactId>guava</artifactId> |
||||
<version>${guava.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.google.inject</groupId> |
||||
<artifactId>guice</artifactId> |
||||
<version>${inject.version}</version> |
||||
</dependency> |
||||
<!-- testng --> |
||||
<dependency> |
||||
<groupId>org.testng</groupId> |
||||
<artifactId>testng</artifactId> |
||||
<version>${testng.version}</version> |
||||
</dependency> |
||||
<!-- Depends on reportNg, associated with testNg--> |
||||
<dependency> |
||||
<groupId>org.uncommons</groupId> |
||||
<artifactId>reportng</artifactId> |
||||
<version>${reportng.version}</version> |
||||
<scope>test</scope> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>org.testng</groupId> |
||||
<artifactId>testng</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>commons-io</groupId> |
||||
<artifactId>commons-io</artifactId> |
||||
<version>${commons-io.version}</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.apache.servicemix.bundles</groupId> |
||||
<artifactId>org.apache.servicemix.bundles.jedis</artifactId> |
||||
<version>2.6.2_1</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.apache.commons</groupId> |
||||
<artifactId>commons-pool2</artifactId> |
||||
<version>${commons-pool2.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.jyaml</groupId> |
||||
<artifactId>jyaml</artifactId> |
||||
<version>1.3</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springframework</groupId> |
||||
<artifactId>spring-core</artifactId> |
||||
<version>5.1.5.RELEASE</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<build> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-compiler-plugin</artifactId> |
||||
<version>3.8.0</version> |
||||
<configuration> |
||||
<source>1.8</source> |
||||
<target>1.8</target> |
||||
<encoding>UTF-8</encoding> |
||||
</configuration> |
||||
</plugin> |
||||
|
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-surefire-plugin</artifactId> |
||||
<version>2.20.1</version> |
||||
<configuration> |
||||
<suiteXmlFiles> |
||||
<suiteXmlFile>${xml.file}</suiteXmlFile> |
||||
</suiteXmlFiles> |
||||
<argLine>-Dfile.encoding=UTF-8</argLine> |
||||
<properties> |
||||
<property> |
||||
<name>usedefaultlisteners</name> |
||||
<!--Set listen false, Do not use the default report testng, use reportng--> |
||||
<value>false</value> |
||||
</property> |
||||
<property> |
||||
<name>listener</name> |
||||
<value>org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter</value> |
||||
</property> |
||||
</properties> |
||||
<!--<workingDirectory>target/</workingDirectory>--> |
||||
<!--<forkMode>always</forkMode>--> |
||||
</configuration> |
||||
</plugin> |
||||
|
||||
|
||||
<!--<plugin>--> |
||||
<!--<groupId>org.apache.maven.plugins</groupId>--> |
||||
<!--<artifactId>maven-surefire-plugin</artifactId>--> |
||||
<!--<version>2.5</version>--> |
||||
<!--<configuration>--> |
||||
<!--<properties>--> |
||||
<!--<property>--> |
||||
<!--<name>usedefaultlisteners</name>--> |
||||
<!--<!–Set listen false, Do not use the default report testng, use reportng–>--> |
||||
<!--<value>false</value>--> |
||||
<!--</property>--> |
||||
<!--<property>--> |
||||
<!--<name>listener</name>--> |
||||
<!--<value>org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter</value>--> |
||||
<!--</property>--> |
||||
<!--</properties>--> |
||||
<!--<workingDirectory>target/</workingDirectory>--> |
||||
<!--<forkMode>always</forkMode>--> |
||||
<!--</configuration>--> |
||||
<!--</plugin>--> |
||||
</plugins> |
||||
</build> |
||||
</project> |
@ -1,35 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.constant; |
||||
|
||||
public class TestConstant { |
||||
/** |
||||
* 1000 |
||||
*/ |
||||
public static final int ONE_THOUSAND = 1000; |
||||
|
||||
/** |
||||
* 3000 |
||||
*/ |
||||
public static final int THREE_THOUSAND = 3000; |
||||
|
||||
/** |
||||
* 10000 |
||||
*/ |
||||
public static final int TEN_THOUSAND = 10000; |
||||
|
||||
} |
@ -1,49 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.util; |
||||
|
||||
import java.io.*; |
||||
import java.util.Properties; |
||||
|
||||
/** |
||||
* read properties |
||||
*/ |
||||
public class PropertiesReader { |
||||
private static Properties properties = new Properties(); |
||||
|
||||
/** |
||||
* @param propertiesPath properties path |
||||
* @return Properties |
||||
* @throws IOException IOException |
||||
*/ |
||||
public static Properties readProperties(String propertiesPath) throws IOException { |
||||
System.out.println("read properties "); |
||||
InputStream inputStream = new FileInputStream(propertiesPath); |
||||
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8"); |
||||
BufferedReader bufferedReader = new BufferedReader(inputStreamReader); |
||||
properties.load(bufferedReader); |
||||
return properties; |
||||
} |
||||
|
||||
/*** |
||||
* @param key key |
||||
* @return value |
||||
*/ |
||||
public static String getKey(String key) { |
||||
return properties.getProperty(key); |
||||
} |
||||
} |
@ -1,204 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.util; |
||||
|
||||
import org.apache.dolphinscheduler.constant.TestConstant; |
||||
import redis.clients.jedis.Jedis; |
||||
import redis.clients.jedis.JedisPool; |
||||
import redis.clients.jedis.JedisPoolConfig; |
||||
|
||||
/** |
||||
* redis util |
||||
*/ |
||||
public class RedisUtil { |
||||
/** |
||||
* redis ip |
||||
*/ |
||||
private static String redisIp; |
||||
|
||||
/** |
||||
* redis port |
||||
*/ |
||||
private static int redisPort; |
||||
|
||||
/** |
||||
* redis password |
||||
*/ |
||||
private static String redisPwd; |
||||
|
||||
/** |
||||
* redis pool config |
||||
*/ |
||||
private static JedisPoolConfig jedisPoolConfig; |
||||
|
||||
/** |
||||
* redis pool |
||||
*/ |
||||
private static JedisPool jedisPool; |
||||
|
||||
/** |
||||
* jedis connection |
||||
*/ |
||||
private Jedis jedis; |
||||
|
||||
/** |
||||
* jedis expire time |
||||
*/ |
||||
private int jedisExpireTime; |
||||
|
||||
/** |
||||
* jedis max total |
||||
*/ |
||||
private static int jedisPoolMaxTotal; |
||||
|
||||
/** |
||||
* jedis max idle |
||||
*/ |
||||
private static int jedisPoolMaxIdle; |
||||
|
||||
/** |
||||
* jedis max wait time |
||||
*/ |
||||
private static int jedisPoolMaxWaitMillis; |
||||
|
||||
/** |
||||
* Whether to perform a valid check when calling the borrowObject method |
||||
*/ |
||||
private static boolean jedisPoolTestOnBorrow; |
||||
|
||||
/** |
||||
* Whether to perform a valid check when calling the returnObject method |
||||
*/ |
||||
private static boolean jedisPoolTestOnReturn; |
||||
|
||||
/** |
||||
* storage local thread |
||||
*/ |
||||
public static ThreadLocal<Jedis> threadLocal = new ThreadLocal<>(); |
||||
|
||||
/* |
||||
* redis init |
||||
*/ |
||||
static { |
||||
// redis properties
|
||||
redisIp = PropertiesReader.getKey("redis.ip"); |
||||
redisPort = Integer.valueOf(PropertiesReader.getKey("redis.port")); |
||||
redisPwd = PropertiesReader.getKey("redis.pwd"); |
||||
//redis pool properties
|
||||
jedisPoolMaxTotal = Integer.valueOf(PropertiesReader.getKey("jedis.pool.maxTotal")); |
||||
jedisPoolMaxIdle = Integer.valueOf(PropertiesReader.getKey("jedis.pool.maxIdle")); |
||||
jedisPoolMaxWaitMillis = Integer.valueOf(PropertiesReader.getKey("jedis.pool.maxWaitMillis")); |
||||
jedisPoolTestOnBorrow = Boolean.valueOf(PropertiesReader.getKey("jedis.pool.testOnBorrow")); |
||||
jedisPoolTestOnReturn = Boolean.valueOf(PropertiesReader.getKey("jedis.pool.testOnReturn")); |
||||
// redis pool start properties
|
||||
jedisPoolConfig = new JedisPoolConfig(); |
||||
jedisPoolConfig.setMaxTotal(jedisPoolMaxTotal); |
||||
jedisPoolConfig.setMaxIdle(jedisPoolMaxIdle); |
||||
jedisPoolConfig.setMaxWaitMillis(jedisPoolMaxWaitMillis); |
||||
jedisPoolConfig.setTestOnBorrow(jedisPoolTestOnBorrow); |
||||
jedisPoolConfig.setTestOnReturn(jedisPoolTestOnReturn); |
||||
// connect redis
|
||||
try { |
||||
System.out.println("redis init"); |
||||
if (redisPwd.isEmpty()) |
||||
jedisPool = new JedisPool(jedisPoolConfig, redisIp, redisPort, TestConstant.THREE_THOUSAND); |
||||
else { |
||||
jedisPool = new JedisPool(jedisPoolConfig, redisIp, redisPort, TestConstant.TEN_THOUSAND, redisPwd); |
||||
} |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
System.out.println("redis connect fail"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* get redis pool |
||||
* |
||||
* @return redis pool |
||||
*/ |
||||
public static JedisPool getJedisPool() { |
||||
return jedisPool; |
||||
} |
||||
|
||||
/** |
||||
* get jedis connection |
||||
* |
||||
* @return jedis connection |
||||
*/ |
||||
public Jedis getNewJedis() { |
||||
Jedis newJedis = null; |
||||
try { |
||||
newJedis = jedisPool.getResource(); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
System.out.println("redis connection fail"); |
||||
} |
||||
System.out.println("redis connection success"); |
||||
return newJedis; |
||||
} |
||||
|
||||
/** |
||||
* get jedis connection |
||||
* |
||||
* @return jedis connection |
||||
*/ |
||||
public Jedis getJedis() { |
||||
return jedis; |
||||
} |
||||
|
||||
public void setJedisAndExpire(Jedis jedis) { |
||||
this.jedis = jedis; |
||||
threadLocal.set(jedis); |
||||
// jedis expire time(s)
|
||||
jedisExpireTime = Integer.valueOf(PropertiesReader.getKey("jedis.expireTime")); |
||||
System.out.println("redisUtil sets up a redis connection"); |
||||
} |
||||
|
||||
/** |
||||
* set key |
||||
* |
||||
* @param key key |
||||
* @param value value |
||||
* |
||||
*/ |
||||
|
||||
public void setKey(String key, String value) { |
||||
jedis.set(key, value); |
||||
// set expire time 1h
|
||||
jedis.expire(key, jedisExpireTime); |
||||
} |
||||
|
||||
/** |
||||
* get key |
||||
* |
||||
* @param key key |
||||
* @return value |
||||
*/ |
||||
public String getKey(String key) { |
||||
return jedis.get(key); |
||||
} |
||||
|
||||
/** |
||||
* Return jedis connection |
||||
*/ |
||||
public void returnJedis() { |
||||
if (jedis != null) { |
||||
jedis.close(); |
||||
} |
||||
System.out.println("jedis has been returned"); |
||||
} |
||||
} |
@ -1,45 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.util; |
||||
|
||||
import java.io.IOException; |
||||
import java.io.InputStream; |
||||
import java.util.HashMap; |
||||
|
||||
import org.ho.yaml.Yaml; |
||||
import org.springframework.core.io.DefaultResourceLoader; |
||||
import org.springframework.core.io.Resource; |
||||
|
||||
/** |
||||
* read yml file |
||||
*/ |
||||
public class YmlReader { |
||||
public static HashMap<String,HashMap<String, String>> map; |
||||
public String getDataYml(String filePath, String key1, String key2) { |
||||
Yaml yaml = new Yaml(); |
||||
Resource resource = new DefaultResourceLoader().getResource("classpath:" + filePath + ".yml"); |
||||
try { |
||||
InputStream inputStream = resource.getInputStream(); |
||||
map = yaml.loadType(inputStream, HashMap.class); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
String data = map.get(key1).get(key2); |
||||
return data; |
||||
} |
||||
} |
@ -1,147 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.base; |
||||
|
||||
|
||||
import org.apache.dolphinscheduler.constant.TestConstant; |
||||
import org.apache.dolphinscheduler.util.PropertiesReader; |
||||
import org.openqa.selenium.PageLoadStrategy; |
||||
import org.openqa.selenium.WebDriver; |
||||
import org.openqa.selenium.chrome.ChromeDriver; |
||||
import org.openqa.selenium.chrome.ChromeOptions; |
||||
|
||||
import java.io.IOException; |
||||
import java.util.concurrent.TimeUnit; |
||||
|
||||
|
||||
/** |
||||
* base driver class
|
||||
*/ |
||||
public class BaseDriver { |
||||
/** |
||||
* driver |
||||
*/ |
||||
private static WebDriver driver; |
||||
|
||||
/** |
||||
* chrome driver path |
||||
*/ |
||||
private String chromeDriverPath; |
||||
|
||||
|
||||
/** |
||||
* implicitly wait time(s) |
||||
*/ |
||||
private long implicitlyWait; |
||||
|
||||
/** |
||||
* page load timeout(s) |
||||
*/ |
||||
private long pageLoadTimeout; |
||||
|
||||
/** |
||||
* script Timeout(s) |
||||
*/ |
||||
private long setScriptTimeout; |
||||
|
||||
|
||||
/** |
||||
* Local thread storage is used to store the driver |
||||
*/ |
||||
public static ThreadLocal<WebDriver> threadLocal = new ThreadLocal<>(); |
||||
|
||||
/** |
||||
*Initialization parameters |
||||
*/ |
||||
public BaseDriver() throws IOException { |
||||
/* driver test class path */ |
||||
chromeDriverPath = PropertiesReader.getKey("driver.chromeDriver"); |
||||
|
||||
/* wait time */ |
||||
implicitlyWait = Long.valueOf(PropertiesReader.getKey("driver.timeouts.implicitlyWait")); |
||||
pageLoadTimeout = Long.valueOf(PropertiesReader.getKey("driver.timeouts.pageLoadTimeout")); |
||||
setScriptTimeout = Long.valueOf(PropertiesReader.getKey("driver.timeouts.setScriptTimeout")); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* start chrome browser |
||||
*/ |
||||
public void startBrowser() throws Exception { |
||||
System.out.println("===================test start==================="); |
||||
// set chrome driver
|
||||
System.setProperty("webdriver.chrome.driver", chromeDriverPath); |
||||
ChromeOptions chromeOptions = new ChromeOptions(); |
||||
chromeOptions.setPageLoadStrategy(PageLoadStrategy.NONE); |
||||
chromeOptions.addArguments("--no-sandbox"); |
||||
chromeOptions.addArguments("--disable-dev-shm-usage"); |
||||
//Browser client running requires annotation --headless
|
||||
chromeOptions.addArguments("--headless"); |
||||
chromeOptions.addArguments("--disable-gpu"); |
||||
chromeOptions.addArguments("--whitelisted-ips"); |
||||
chromeOptions.addArguments("--disable-infobars"); |
||||
chromeOptions.addArguments("--disable-browser-side-navigation"); |
||||
driver = new ChromeDriver(chromeOptions); |
||||
|
||||
/* driver setting wait time */ |
||||
// implicitly wait time
|
||||
driver.manage().timeouts().implicitlyWait(implicitlyWait, TimeUnit.SECONDS); |
||||
|
||||
// page load timeout
|
||||
driver.manage().timeouts().pageLoadTimeout(pageLoadTimeout, TimeUnit.SECONDS); |
||||
|
||||
// script timeout
|
||||
driver.manage().timeouts().setScriptTimeout(setScriptTimeout, TimeUnit.SECONDS); |
||||
|
||||
// window maximize
|
||||
driver.manage().window().maximize(); |
||||
|
||||
// set threadLocal
|
||||
threadLocal.set(driver); |
||||
} |
||||
|
||||
/** |
||||
* get webDriver |
||||
* |
||||
* @return driver |
||||
*/ |
||||
public static WebDriver getDriver() { |
||||
return driver; |
||||
} |
||||
|
||||
/** |
||||
* set webDriver |
||||
* |
||||
* @param driver driver |
||||
*/ |
||||
public void setDriver(WebDriver driver) { |
||||
this.driver = driver; |
||||
// Thread local storage
|
||||
threadLocal.set(driver); |
||||
} |
||||
|
||||
/** |
||||
* close browser |
||||
*/ |
||||
public void closeBrowser() throws InterruptedException { |
||||
Thread.sleep(TestConstant.THREE_THOUSAND); |
||||
if (driver != null) { |
||||
driver.quit(); |
||||
System.out.println("===================test end==================="); |
||||
} |
||||
} |
||||
} |
@ -1,451 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.common; |
||||
|
||||
import org.apache.dolphinscheduler.util.PropertiesReader; |
||||
import org.apache.dolphinscheduler.util.RedisUtil; |
||||
import org.openqa.selenium.*; |
||||
import org.openqa.selenium.interactions.Actions; |
||||
import org.openqa.selenium.support.ui.ExpectedConditions; |
||||
import org.openqa.selenium.support.ui.WebDriverWait; |
||||
import redis.clients.jedis.Jedis; |
||||
import org.openqa.selenium.JavascriptExecutor; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.Set; |
||||
|
||||
/** |
||||
* Encapsulate the most basic operations on the interface in the browser |
||||
*/ |
||||
public class BrowserCommon { |
||||
/** |
||||
* driver |
||||
*/ |
||||
protected WebDriver driver; |
||||
|
||||
/** |
||||
* actions |
||||
*/ |
||||
protected Actions actions; |
||||
|
||||
/** |
||||
* JavaScript |
||||
*/ |
||||
protected JavascriptExecutor je; |
||||
|
||||
/** |
||||
* Show wait |
||||
*/ |
||||
protected WebDriverWait wait; |
||||
|
||||
/** |
||||
* Jedis |
||||
*/ |
||||
protected Jedis jedis; |
||||
|
||||
/** |
||||
* redis util |
||||
*/ |
||||
protected RedisUtil redisUtil; |
||||
|
||||
/** |
||||
* @param driver driver |
||||
*/ |
||||
public BrowserCommon(WebDriver driver) { |
||||
this.driver = driver; |
||||
this.actions = new Actions(driver); |
||||
this.je = ((JavascriptExecutor) driver); |
||||
// show wait timeout
|
||||
long timeout = Long.valueOf(PropertiesReader.getKey("driver.timeouts.webDriverWait")); |
||||
wait = new WebDriverWait(driver, timeout); |
||||
} |
||||
|
||||
/** |
||||
* @param driver driver |
||||
* @param jedis jedis |
||||
*/ |
||||
public BrowserCommon(WebDriver driver, Jedis jedis) { |
||||
this.driver = driver; |
||||
this.actions = new Actions(driver); |
||||
this.je = ((JavascriptExecutor) driver); |
||||
// show wait timeout
|
||||
long timeout = Long.valueOf(PropertiesReader.getKey("driver.timeouts.webDriverWait")); |
||||
wait = new WebDriverWait(driver, timeout); |
||||
this.jedis = jedis; |
||||
} |
||||
|
||||
/** |
||||
* @param driver driver |
||||
* @param redisUtil redisUtil |
||||
*/ |
||||
public BrowserCommon(WebDriver driver, RedisUtil redisUtil) { |
||||
this.driver = driver; |
||||
this.actions = new Actions(driver); |
||||
this.je = ((JavascriptExecutor) driver); |
||||
// show wait timeout
|
||||
long timeout = Long.valueOf(PropertiesReader.getKey("driver.timeouts.webDriverWait")); |
||||
wait = new WebDriverWait(driver, timeout); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Get WebElement element object through element positioning |
||||
* |
||||
* @param locator By |
||||
* @return WebElement |
||||
*/ |
||||
|
||||
public WebElement locateElement(By locator) { |
||||
return wait.until(ExpectedConditions.presenceOfElementLocated(locator)); |
||||
} |
||||
|
||||
/** |
||||
* Click button element |
||||
* |
||||
* @param locator By |
||||
* @return clickButton |
||||
*/ |
||||
public WebElement clickButton(By locator) { |
||||
WebElement buttonElement = locateElement(locator); |
||||
wait.until(ExpectedConditions.elementToBeClickable(locator)); |
||||
ExpectedConditions.elementToBeClickable(locator); |
||||
buttonElement.click(); |
||||
return buttonElement; |
||||
} |
||||
|
||||
/** |
||||
* Click Navigation Bar element |
||||
* |
||||
* @param locator By |
||||
* @return clickButton |
||||
*/ |
||||
public void clickTopElement(By locator) { |
||||
WebElement element = driver.findElement(locator); |
||||
JavascriptExecutor executor = (JavascriptExecutor) driver; |
||||
executor.executeScript("arguments[0].click();", element); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Click element |
||||
* |
||||
* @param locator By |
||||
* @return inputElement |
||||
*/ |
||||
public WebElement clickElement(By locator) { |
||||
WebElement clickElement = locateElement(locator); |
||||
clickElement.click(); |
||||
return clickElement; |
||||
} |
||||
|
||||
|
||||
/** |
||||
* input element |
||||
* |
||||
* @param locator By |
||||
* @param content Input content |
||||
* @return inputElement |
||||
*/ |
||||
public WebElement sendInput(By locator, String content) { |
||||
WebElement inputElement = locateElement(locator); |
||||
inputElement.clear(); |
||||
inputElement.sendKeys(content); |
||||
return inputElement; |
||||
} |
||||
|
||||
|
||||
/** |
||||
* input element after clearing |
||||
* |
||||
* @param locator By |
||||
* @param content Input content |
||||
* @return inputElement |
||||
*/ |
||||
public WebElement clearSendInput(By locator, String content) { |
||||
WebElement inputElement = locateElement(locator); |
||||
//input date
|
||||
inputElement.clear(); |
||||
inputElement.sendKeys(Keys.HOME,Keys.chord(Keys.SHIFT,Keys.END)); |
||||
inputElement.sendKeys(content); |
||||
return inputElement; |
||||
} |
||||
|
||||
/** |
||||
* clear element |
||||
* |
||||
* @param locator By |
||||
*/ |
||||
public WebElement clearInput(By locator) { |
||||
WebElement clearElement = locateElement(locator); |
||||
clearElement.click(); |
||||
clearElement.sendKeys(Keys.chord(Keys.CONTROL, "a")); |
||||
clearElement.sendKeys(Keys.BACK_SPACE); |
||||
return clearElement; |
||||
} |
||||
|
||||
/** |
||||
* input codeMirror |
||||
* |
||||
* @param codeMirrorLocator By codeMirror |
||||
* @param codeMirrorLineLocator By codeMirrorLine |
||||
*/ |
||||
public void inputCodeMirror(By codeMirrorLocator, By codeMirrorLineLocator, String content) { |
||||
WebElement codeMirrorElement = locateElement(codeMirrorLocator); |
||||
WebElement codeMirrorLineElement = locateElement(codeMirrorLineLocator); |
||||
codeMirrorElement.click(); |
||||
codeMirrorLineElement.sendKeys(content); |
||||
} |
||||
|
||||
/** |
||||
* move to element |
||||
* |
||||
* @param locator BY |
||||
* @return actions |
||||
*/ |
||||
public Actions moveToElement(By locator) { |
||||
return actions.moveToElement(locateElement(locator)); |
||||
} |
||||
|
||||
/** |
||||
* mouse drag element |
||||
* |
||||
* @param sourceLocator BY |
||||
* @param targetLocator BY |
||||
*/ |
||||
public void dragAndDrop(By sourceLocator, By targetLocator) { |
||||
WebElement sourceElement = locateElement(sourceLocator); |
||||
WebElement targetElement = locateElement(targetLocator); |
||||
actions.dragAndDrop(sourceElement, targetElement).perform(); |
||||
actions.release(); |
||||
} |
||||
|
||||
public void moveToDragElement(By targetLocator, int x, int y) { |
||||
WebElement targetElement = locateElement(targetLocator); |
||||
actions.dragAndDropBy(targetElement, x, y).perform(); |
||||
actions.release(); |
||||
} |
||||
|
||||
/** |
||||
* Right mouse click on the element |
||||
* |
||||
* @param locator By |
||||
* @return actions |
||||
*/ |
||||
public void mouseRightClickElement(By locator) { |
||||
WebElement mouseRightClickElement = locateElement(locator); |
||||
actions.contextClick(mouseRightClickElement).perform(); |
||||
} |
||||
|
||||
/** |
||||
* The mouse moves from a position to a specified positionØ |
||||
* |
||||
* @param sourceLocator BY |
||||
* @param targetLocator BY |
||||
* @return actions |
||||
*/ |
||||
public void mouseMovePosition(By sourceLocator, By targetLocator) throws InterruptedException { |
||||
WebElement sourceElement = locateElement(sourceLocator); |
||||
WebElement targetElement = locateElement(targetLocator); |
||||
actions.dragAndDrop(sourceElement,targetElement).perform(); |
||||
actions.click(); |
||||
} |
||||
|
||||
/** |
||||
* jump page |
||||
* |
||||
* @param url url |
||||
*/ |
||||
public void jumpPage(String url) { |
||||
driver.get(url); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Find the next handle, recommended for two windows |
||||
* |
||||
* @return driver |
||||
*/ |
||||
public WebDriver switchNextHandle() { |
||||
// Current window handle
|
||||
String currentHandle = driver.getWindowHandle(); |
||||
// All window handle
|
||||
Set<String> allHandles = driver.getWindowHandles(); |
||||
// Finding the next handle
|
||||
for (String handle : allHandles) { |
||||
if (!handle.equals(currentHandle)) { |
||||
return driver.switchTo().window(handle); |
||||
} |
||||
} |
||||
return driver; |
||||
} |
||||
|
||||
/** |
||||
* select time |
||||
* |
||||
* @return WebElement |
||||
*/ |
||||
public WebElement selectDate(String js, By locator_time, String date) { |
||||
JavascriptExecutor removeAttribute = (JavascriptExecutor) driver; |
||||
removeAttribute.executeScript("var setDate=" + js + ";setDate.removeAttribute('readonly');"); |
||||
WebElement dateElement = locateElement(locator_time); |
||||
|
||||
//input date
|
||||
dateElement.clear(); |
||||
dateElement.sendKeys(Keys.HOME,Keys.chord(Keys.SHIFT,Keys.END)); |
||||
dateElement.sendKeys(date); |
||||
return dateElement; |
||||
} |
||||
|
||||
/** |
||||
* Multi-window switch handle, according to the handle number passed in |
||||
* |
||||
* @param num Number starts from 1 |
||||
* @return driver |
||||
*/ |
||||
public WebDriver switchHandle(int num) { |
||||
// current handle
|
||||
String currentHandle = driver.getWindowHandle(); |
||||
// all handle
|
||||
Set<String> allHandlesSet = driver.getWindowHandles(); |
||||
List<String> allHandlesList = new ArrayList<>(allHandlesSet); |
||||
// switch handle
|
||||
return driver.switchTo().window(allHandlesList.get(num - 1)); |
||||
} |
||||
|
||||
/** |
||||
* Switch frame structure |
||||
* |
||||
* @param locator frame |
||||
* @return driver |
||||
*/ |
||||
public WebDriver switchFrame(By locator) { |
||||
return driver.switchTo().frame(locateElement(locator)); |
||||
} |
||||
|
||||
/** |
||||
* Switch parent frame structure |
||||
* |
||||
* @return driver |
||||
*/ |
||||
public WebDriver switchParentFrame() { |
||||
return driver.switchTo().parentFrame(); |
||||
} |
||||
|
||||
/** |
||||
* Switch out of frame structure |
||||
* |
||||
* @return driver |
||||
*/ |
||||
public WebDriver switchOutOfFrame() { |
||||
return driver.switchTo().defaultContent(); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* execute JS Script |
||||
* |
||||
* @param script JS script |
||||
*/ |
||||
public void executeScript(String script) { |
||||
je.executeScript(script); |
||||
} |
||||
|
||||
/** |
||||
* execute JS Script |
||||
* |
||||
* @param script JS script |
||||
* @param args Object element array |
||||
*/ |
||||
public void executeScript(String script, Object... args) { |
||||
je.executeScript(script, args); |
||||
} |
||||
|
||||
/** |
||||
* Page slide to top |
||||
*/ |
||||
public void scrollToTop() { |
||||
executeScript("window.scrollTo(0, 0)"); |
||||
} |
||||
|
||||
/** |
||||
* Page slides to the bottom |
||||
*/ |
||||
public void scrollToBottom() { |
||||
executeScript("window.scrollTo(0, document.body.scrollHeight)"); |
||||
} |
||||
|
||||
public void scrollToElementBottom(By locator) { |
||||
WebElement webElement = locateElement(locator); |
||||
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", webElement); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Page swipe makes the top of the element align with the top of the page |
||||
* |
||||
* @param by Elements that need to be aligned with the top of the page |
||||
*/ |
||||
public void scrollElementTopToTop(By by) { |
||||
executeScript("arguments[0].scrollIntoView(true);", driver.findElement(by)); |
||||
} |
||||
|
||||
/** |
||||
* Page sliding makes the bottom of the element aligned with the bottom of the page |
||||
* |
||||
* @param by Elements that need to be aligned with the bottom of the page |
||||
*/ |
||||
public void scrollElementBottomToBottom(By by) { |
||||
executeScript("arguments[0].scrollIntoView(false);", driver.findElement(by)); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Determine if the current page title is the specified title |
||||
* |
||||
* @param title title |
||||
* @return boolean |
||||
*/ |
||||
|
||||
public boolean ifTitleIs(String title) { |
||||
return wait.until(ExpectedConditions.titleIs(title)); |
||||
} |
||||
|
||||
/** |
||||
* Determines whether the current page title contains the specified text |
||||
* |
||||
* @param text text |
||||
* @return boolean |
||||
*/ |
||||
public boolean ifTitleContains(String text) { |
||||
return wait.until(ExpectedConditions.titleContains(text)); |
||||
} |
||||
|
||||
/** |
||||
* Determines whether the text value of an element on the current page is the specified text |
||||
* |
||||
* @param locator By |
||||
* @param text text |
||||
* @return boolean |
||||
*/ |
||||
public boolean ifTextExists(By locator, String text) { |
||||
return wait.until(ExpectedConditions.textToBePresentInElementLocated(locator, text)); |
||||
} |
||||
|
||||
public void flushPage() { |
||||
driver.navigate().refresh(); |
||||
} |
||||
} |
@ -1,50 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.common; |
||||
|
||||
import org.apache.dolphinscheduler.util.RedisUtil; |
||||
import org.openqa.selenium.WebDriver; |
||||
import redis.clients.jedis.Jedis; |
||||
|
||||
|
||||
/** |
||||
* Encapsulate the operation methods that can be used for each module page |
||||
*/ |
||||
public class PageCommon extends BrowserCommon { |
||||
/** |
||||
* @param driver driver |
||||
*/ |
||||
public PageCommon(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* @param driver driver |
||||
* @param jedis jedis |
||||
*/ |
||||
public PageCommon(WebDriver driver, Jedis jedis) { |
||||
super(driver, jedis); |
||||
} |
||||
|
||||
/** |
||||
* @param driver driver |
||||
* @param redisUtil redisUtil |
||||
*/ |
||||
public PageCommon(WebDriver driver, RedisUtil redisUtil) { |
||||
super(driver, redisUtil); |
||||
} |
||||
} |
@ -1,40 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data; |
||||
|
||||
import org.apache.dolphinscheduler.util.PropertiesReader; |
||||
|
||||
/** |
||||
* Landing page object: data |
||||
*/ |
||||
|
||||
public class LoginData { |
||||
/** |
||||
* Login URL |
||||
*/ |
||||
public static final String URL = PropertiesReader.getKey("LOGIN_URL"); |
||||
|
||||
/** |
||||
* Login username |
||||
*/ |
||||
public static final String USER = PropertiesReader.getKey("USER_NAME"); |
||||
|
||||
/** |
||||
* Login password |
||||
*/ |
||||
public static final String PASSWORD = PropertiesReader.getKey("PASSWORD"); |
||||
} |
@ -1,26 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.project; |
||||
|
||||
public class CreateProjectData { |
||||
// create project name
|
||||
public static final String PROJECT_NAME = "selenium_project_1"; |
||||
// create project description
|
||||
public static final String DESCRIPTION = "test create project description"; |
||||
// project page title
|
||||
public static final String PROJECT_TITLE = "项目 - DolphinScheduler"; |
||||
} |
@ -1,77 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.project; |
||||
|
||||
public class CreateWorkflowData { |
||||
/** |
||||
* create workflow data |
||||
*/ |
||||
//input shell task name
|
||||
public static final String SHELL_TASK_NAME = "shell_task_selenium_1"; |
||||
|
||||
//input shell task description
|
||||
public static final String SHELL_TASK_DESCRIPTION = "shell task description test"; |
||||
|
||||
//input timeout
|
||||
public static final String INPUT_TIMEOUT = "60"; |
||||
|
||||
//input shell script
|
||||
public static final String SHELL_SCRIPT = "echo 1111111"; |
||||
|
||||
//input custom parameters
|
||||
public static final String INPUT_CUSTOM_PARAMETERS = "selenium_parameter"; |
||||
|
||||
//input custom parameters value
|
||||
public static final String INPUT_CUSTOM_PARAMETERS_VALUE = "selenium_parameter_123"; |
||||
|
||||
//input add custom parameters
|
||||
public static final String INPUT_ADD_CUSTOM_PARAMETERS = "selenium_parameter_delete"; |
||||
|
||||
//input add custom parameters value
|
||||
public static final String INPUT_ADD_CUSTOM_PARAMETERS_VALUE = "selenium_parameter_delete_456"; |
||||
|
||||
//workflow define title
|
||||
public static final String WORKFLOW_TITLE = "工作流定义 - DolphinScheduler"; |
||||
|
||||
//create workflow title
|
||||
public static final String CREATE_WORKFLOW_TITLE = "创建流程定义 - DolphinScheduler"; |
||||
|
||||
|
||||
/** |
||||
* save workflow data |
||||
*/ |
||||
//input workflow name
|
||||
public static final String INPUT_WORKFLOW_NAME = "selenium_shell_1"; |
||||
|
||||
//input workflow description
|
||||
public static final String INPUT_WORKFLOW_DESCRIPTION = "test selenium_shell_1 description"; |
||||
|
||||
//input workflow timeout
|
||||
public static final String INPUT_WORKFLOW_TIMEOUT = "30"; |
||||
|
||||
//input workflow global parameters
|
||||
public static final String INPUT_WORKFLOW_GLOBAL_PARAMETERS = "selenium_global_parameters_1"; |
||||
|
||||
//input workflow global parameters value
|
||||
public static final String INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES = "selenium_global_parameters_value_1"; |
||||
|
||||
//input to add workflow global parameters
|
||||
public static final String INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS = "selenium_global_parameters_2"; |
||||
|
||||
//input to add workflow global parameters value
|
||||
public static final String INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES = "selenium_global_parameters_value_2"; |
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.project; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class ProcessInstanceData { |
||||
public String getProcessInstanceData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String processInstanceData = ymlReader.getDataYml("testData/workflow_zh_cn", "processInstance", param); |
||||
return processInstanceData; |
||||
} |
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.project; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class ProjectData { |
||||
public String getProjectData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String projectData = ymlReader.getDataYml("testData/workflow_zh_cn", "projectManage", param); |
||||
return projectData; |
||||
} |
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.project; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class RunWorkflowData { |
||||
public String getRunWorkflowData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String runWorkflowData = ymlReader.getDataYml("testData/workflow_zh_cn", "runWorkflow", param); |
||||
return runWorkflowData; |
||||
} |
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.project; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class TimingData { |
||||
public String getTimingData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String timingData = ymlReader.getDataYml("testData/workflow_zh_cn", "timing", param); |
||||
return timingData; |
||||
} |
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.project; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class WorkflowDefineData { |
||||
public String getWorkflowDefineData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String workflowDefineData = ymlReader.getDataYml("testData/workflow_zh_cn", "workflowDefine", param); |
||||
return workflowDefineData; |
||||
} |
||||
} |
@ -1,28 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.security; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class AlertManageData { |
||||
public String getAlertData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String alertData = ymlReader.getDataYml("testData/security_zh_cn", "alertManage", param); |
||||
return alertData; |
||||
} |
||||
|
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.security; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class QueueManageData { |
||||
public String getQueueData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String queueData = ymlReader.getDataYml("testData/security_zh_cn", "queueManage", param); |
||||
return queueData; |
||||
} |
||||
} |
@ -1,31 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
/** |
||||
* Tenant page object: data |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.security; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class TenantManageData { |
||||
public String getTenantData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String tenantData = ymlReader.getDataYml("testData/security_zh_cn", "tenantManage", param); |
||||
return tenantData; |
||||
} |
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.security; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class TokenManageData { |
||||
public String getTokenData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String tokenData = ymlReader.getDataYml("testData/security_zh_cn", "tokenManage", param); |
||||
return tokenData; |
||||
} |
||||
} |
@ -1,27 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.data.security; |
||||
|
||||
import org.apache.dolphinscheduler.util.YmlReader; |
||||
|
||||
public class UserManageData { |
||||
public String getUserData(String param) { |
||||
YmlReader ymlReader = new YmlReader(); |
||||
String userData = ymlReader.getDataYml("testData/security_zh_cn", "userManage", param); |
||||
return userData; |
||||
} |
||||
} |
@ -1,33 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
/** |
||||
* Page object: element positioning |
||||
*/ |
||||
|
||||
public class LoginLocator { |
||||
public static final By LOGIN_INPUT_USER = By.xpath("//input[@class='input-element suffix']"); |
||||
|
||||
public static final By LOGIN_INPUT_PASSWORD = By.xpath("//input[@class='input-element suffix']"); |
||||
|
||||
public static final By LOGIN_BUTTON = By.xpath("//button"); |
||||
|
||||
public static final By LOGIN_BUTTON_MOVE = By.xpath("//button[contains(.,' Loading...')]"); |
||||
} |
@ -1,47 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.project; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class CreateProjectLocator { |
||||
//click project manage
|
||||
// public static final By PROJECT_MANAGE = By.xpath("//div[@class='clearfix list'][2]");
|
||||
public static final By PROJECT_MANAGE = By.xpath("//div[2]/div[2]/div/a/span"); |
||||
|
||||
// public static final By SECURITY_MANAGE = By.xpath("//div[@class='m-top']/div/div[2]/dev[@class='clearfix list'][6]");
|
||||
public static final By SECURITY_MANAGE = By.xpath("//div[2]/div[6]/div/a/span"); |
||||
|
||||
|
||||
//click create project button
|
||||
public static final By CREATE_PROJECT_BUTTON = By.xpath("//div[2]/div/div[1]/button/span"); |
||||
|
||||
//input project name
|
||||
public static final By PROJECT_NAME = By.xpath("//div[2]/div/div/div[2]/div/input"); |
||||
|
||||
//input project description
|
||||
public static final By PROJECT_DESCRIPTION = By.xpath("//textarea"); |
||||
|
||||
//submit button
|
||||
public static final By SUBMIT_BUTTON = By.xpath("//div[3]/button[2]/span"); |
||||
|
||||
//delete project button
|
||||
public static final By DELETE_PROJECT_BUTTON = By.xpath("//div[3]/div[1]/div/table/tr[2]/td[9]/span/button"); |
||||
|
||||
//confirm delete project button
|
||||
public static final By CONFIRM_DELETE_PROJECT_BUTTON = By.xpath("//div[2]/div/button[2]/span"); |
||||
} |
@ -1,183 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.locator.project; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class CreateWorkflowLocator { |
||||
|
||||
/** |
||||
* jump workflow define page |
||||
*/ |
||||
|
||||
// click project name
|
||||
public static final By CLICK_PROJECT_NAME = By.xpath("//span/a"); |
||||
|
||||
// click workflow define
|
||||
public static final By CLICK_WORKFLOW_DEFINE = By.xpath("//li/span"); |
||||
|
||||
/** |
||||
* create workflow |
||||
*/ |
||||
// click create workflow button
|
||||
public static final By CLICK_CREATE_WORKFLOW_BUTTON = By.xpath("//button/span"); |
||||
|
||||
//mouse down at shell
|
||||
public static final By MOUSE_DOWN_AT_SHELL = By.xpath("//div[@id='SHELL']/div/div"); |
||||
|
||||
//mouse down at spark
|
||||
public static final By MOUSE_DOWN_AT_SPARK = By.xpath("//div[5]/div/div"); |
||||
|
||||
//mouse move at DAG
|
||||
public static final By MOUSE_MOVE_SHELL_AT_DAG = By.xpath("//div[@id='canvas']"); |
||||
|
||||
//input shell task _name
|
||||
public static final By INPUT_SHELL_TASK_NAME = By.xpath("//input"); |
||||
|
||||
//click stop run type
|
||||
public static final By CLICK_STOP_RUN_TYPE = By.xpath("//label[2]/span/input"); |
||||
|
||||
//click normal run type
|
||||
public static final By CLICK_NORMAL_RUN_TYPE = By.xpath("//span/input"); |
||||
|
||||
//input shell task description
|
||||
public static final By INPUT_SHELL_TASK_DESCRIPTION = By.xpath("//label/div/textarea"); |
||||
|
||||
//click task priority
|
||||
public static final By CLICK_TASK_PRIORITY = By.xpath("//span/div/div/div/div/div"); |
||||
|
||||
//select task priority
|
||||
public static final By SELECT_TASK_PRIORITY = By.xpath("//li[2]/li/span"); |
||||
|
||||
//click work group
|
||||
public static final By CLICK_WORK_GROUP = By.xpath("//div/div/input"); |
||||
|
||||
//select work group
|
||||
public static final By SELECT_WORK_GROUP = By.xpath("//div[4]/div[2]/div/div[1]/div/input"); |
||||
|
||||
//select number of failed retries
|
||||
public static final By SELECT_FAIL_RETRIES_NUMBER = By.xpath("//div[5]/div[2]/div[1]/div[1]/div/input"); |
||||
|
||||
//select failed retry interval
|
||||
public static final By SELECT_FAIL_RETRIES_INTERVAL = By.xpath("//div[5]/div[2]/div[2]/div[1]/div/input"); |
||||
|
||||
//click timeout alarm
|
||||
public static final By CLICK_TIMEOUT_ALARM = By.xpath("//label/div/span/span"); |
||||
|
||||
//select timeout fail
|
||||
public static final By SELECT_TIMEOUT_FAIL = By.xpath("//div/div/label[2]/span/input"); |
||||
|
||||
//cancel timeout alarm
|
||||
public static final By CANCEL_TIMEOUT_ALARM = By.xpath("//div/div/label/span/input"); |
||||
|
||||
//select timeout alarm
|
||||
public static final By SELECT_TIMEOUT_ALARM = By.xpath("//div/div/label/span/input"); |
||||
|
||||
//input timeout
|
||||
public static final By SELECT_TIMEOUT = By.xpath("//div[3]/div[2]/label/div/input"); |
||||
|
||||
//click codeMirror
|
||||
public static final By CLICK_CODE_MIRROR = By.xpath("//div[5]/div/pre"); |
||||
|
||||
//input script
|
||||
public static final By INPUT_SCRIPT = By.xpath("//div[2]/div/div/div/div/div/textarea"); |
||||
|
||||
//click custom parameters
|
||||
public static final By CLICK_CUSTOM_PARAMETERS = By.xpath("//span/a/em"); |
||||
|
||||
//input custom parameters
|
||||
public static final By INPUT_CUSTOM_PARAMETERS = By.xpath("//div[2]/div/div/div/div/div/input"); |
||||
|
||||
//input custom parameters value
|
||||
public static final By INPUT_CUSTOM_PARAMETERS_VALUE = By.xpath("//div[2]/div/div/div/div[1]/div[2]/input"); |
||||
|
||||
//click to add custom parameters
|
||||
public static final By CLICK_ADD_CUSTOM_PARAMETERS = By.xpath("//div[2]/div/div/div/div/span[2]/a/em"); |
||||
|
||||
//input to add custom parameters
|
||||
public static final By INPUT_ADD_CUSTOM_PARAMETERS = By.xpath("//div[2]/div/div/div/div[2]/div[1]/input"); |
||||
|
||||
//input to add custom parameters value
|
||||
public static final By INPUT_ADD_CUSTOM_PARAMETERS_VALUE = By.xpath("//div[2]/div[2]/input"); |
||||
|
||||
//delete custom parameters
|
||||
public static final By CLICK_DELETE_CUSTOM_PARAMETERS = By.xpath("//div[2]/span/a/em"); |
||||
|
||||
//click submit button
|
||||
public static final By CLICK_SUBMIT_BUTTON = By.xpath("//button[2]/span"); |
||||
|
||||
|
||||
/** |
||||
* save workflow |
||||
*/ |
||||
//click save workflow button
|
||||
public static final By CLICK_SAVE_WORKFLOW_BUTTON = By.xpath("//button/span"); |
||||
|
||||
//input workflow name
|
||||
public static final By INPUT_WORKFLOW_NAME = By.xpath("//input"); |
||||
|
||||
//input workflow description
|
||||
public static final By INPUT_WORKFLOW_DESCRIPTION = By.xpath("//textarea"); |
||||
|
||||
//select tenant
|
||||
public static final By CLICK_TENANT = By.xpath("//div[4]/div/div/div/input"); |
||||
public static final By SELECT_TENANT = By.xpath("//div[2]/div/div/div/ul/li/span"); |
||||
|
||||
|
||||
//click workflow timeout alarm
|
||||
public static final By CLICK_WORKFLOW_TIMEOUT_ALARM = By.xpath("//span[2]/span/span"); |
||||
|
||||
//input workflow timeout
|
||||
public static final By INPUT_WORKFLOW_TIMEOUT = By.xpath("//span/div/input"); |
||||
|
||||
//click workflow global parameters
|
||||
public static final By CLICK_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//span/a/em"); |
||||
|
||||
//input workflow global parameters
|
||||
public static final By INPUT_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//div[8]/div/div/div/div/input"); |
||||
|
||||
//input workflow global parameters value
|
||||
public static final By INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES = By.xpath("//div[2]/input"); |
||||
|
||||
//click to add workflow global parameters
|
||||
public static final By CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//span[2]/a/em"); |
||||
|
||||
//input to add workflow global parameters
|
||||
public static final By INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//div[8]/div/div/div[2]/div/input"); |
||||
|
||||
//input to add workflow global parameters value
|
||||
public static final By INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES = By.xpath("//div[2]/div[2]/input"); |
||||
|
||||
//delete workflow global parameters value
|
||||
public static final By CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//div[2]/span/a/em"); |
||||
|
||||
//click add button
|
||||
public static final By CLICK_ADD_BUTTON = By.xpath("//button[2]/span"); |
||||
|
||||
//scroll to element bottom
|
||||
public static final By SCROLL_BOTTOM = By.xpath("//span/a/em"); |
||||
|
||||
/** |
||||
* delete workflow |
||||
*/ |
||||
//click delete workflow button
|
||||
public static final By DELETE_WORKFLOW_BOTTOM = By.xpath("//span/button/i"); |
||||
|
||||
//click confirm delete workflow button
|
||||
public static final By CONFIRM_DELETE_WORKFLOW_BOTTOM = By.xpath("//div[2]/div/button[2]/span"); |
||||
} |
@ -1,34 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.project; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class ProcessInstanceLocator { |
||||
// jump Process Instance page
|
||||
// process instance state is success
|
||||
public static final By PROCESS_INSTANCE_SUCCESS_STATE = By.xpath("//table/tr[2]/td[4]/span/em[@title['data-original-title']='成功']"); |
||||
|
||||
//click Process Instance name
|
||||
public static final By CLICK_PROCESS_INSTANCE_NAME = By.xpath("//div[4]/div/ul/li[2]"); |
||||
|
||||
// click rerun button
|
||||
public static final By CLICK_RERUN_BUTTON = By.xpath("//tr[2]/td[14]/div[1]/button[2]"); |
||||
|
||||
//assert rerun type
|
||||
public static final By RUNNING_TYPE = By.xpath("//tr[2]/td[5]/span"); |
||||
} |
@ -1,45 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.project; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class ProjectLocator { |
||||
//click project manage
|
||||
public static final By PROJECT_MANAGE = By.xpath("//div[2]/div[2]/div/a/span"); |
||||
|
||||
//click create project button
|
||||
public static final By CREATE_PROJECT_BUTTON = By.xpath("//button/span"); |
||||
|
||||
//input project name
|
||||
public static final By PROJECT_NAME = By.xpath("//div[2]/div/div/div[2]/div/input"); |
||||
|
||||
//input project description
|
||||
public static final By PROJECT_DESCRIPTION = By.xpath("//textarea"); |
||||
|
||||
//submit button
|
||||
public static final By SUBMIT_BUTTON = By.xpath("//div[3]/button[2]/span"); |
||||
|
||||
// project name
|
||||
public static final By LIST_PROJECT_NAME = By.xpath("//table/tr[2]/td[2]/span/a"); |
||||
|
||||
//delete project button
|
||||
public static final By DELETE_PROJECT_BUTTON = By.xpath("//div[3]/div[1]/div/table/tr[2]/td[9]/span/button"); |
||||
|
||||
//confirm delete project button
|
||||
public static final By CONFIRM_DELETE_PROJECT_BUTTON = By.xpath("//div[2]/div/button[2]/span"); |
||||
} |
@ -1,48 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.project; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class RunWorkflowLocator { |
||||
/** |
||||
* run workflow |
||||
*/ |
||||
// click run workflow button
|
||||
public static final By CLICK_RUN_WORKFLOW_BUTTON = By.xpath("//div[1]/div/table/tr[2]/td[10]/button[2]"); |
||||
|
||||
//set running parameters
|
||||
public static final By SELECT_FAILURE_STRATEGY_END = By.xpath("//div[5]/div/div[2]/div/div[3]/div[2]/div/label[2]/span[1]/input"); |
||||
public static final By SELECT_FAILURE_STRATEGY_CONTINUE = By.xpath("//div[3]/div[2]/div/label[1]/span[1]/input"); |
||||
|
||||
public static final By CLICK_NOTICE_STRATEGY = By.xpath("//div[4]/div[2]/div/div[1]/div/input"); |
||||
public static final By SELECT_NOTICE_STRATEGY = By.xpath("//div/ul/li[4]/span"); |
||||
|
||||
public static final By CLICK_PROCESS_PRIORITY = By.xpath("//div/div/div/div/div/span[2]"); |
||||
public static final By SELECT_PROCESS_PRIORITY_HIGHEST = By.xpath("//li[1]/li/span"); |
||||
|
||||
public static final By CLICK_WORKER_GROUP = By.xpath("//div[6]/div[2]/div/div[1]/div/input"); |
||||
public static final By SELECT_WORKER_GROUP = By.xpath("//div[5]/div/div[2]/div/div[6]/div[2]/div/div[2]/div/div/div/ul/li/span"); |
||||
|
||||
public static final By CLICK_NOTICE_GROUP = By.xpath("//div[7]/div[2]/div/div[1]/div/input"); |
||||
public static final By SELECT_NOTICE_GROUP = By.xpath("//div[5]/div/div[2]/div/div[7]/div[2]/div/div[2]/div/div/div/ul/li/span"); |
||||
|
||||
public static final By INPUT_RECIPIENT = By.xpath("//div[8]/div[2]/div/div/span/span/input"); |
||||
public static final By INPUT_Cc = By.xpath("//div[9]/div[2]/div/div/span/span/input"); |
||||
|
||||
public static final By CLICK_RUNNING_BUTTON = By.xpath("//div[11]/button[2]"); |
||||
} |
@ -1,67 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.project; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class TimingLocator { |
||||
// create timing button
|
||||
public static final By CLICK_TIMING_BUTTON = By.xpath("//button[3]"); |
||||
|
||||
public static final By CLICK_EXECUTION_TIMING_BUTTON = By.xpath("//div[3]/button/span"); |
||||
|
||||
public static final By SELECT_FAILURE_STRATEGY_END = By.xpath("//label[2]/span/input"); |
||||
public static final By SELECT_FAILURE_STRATEGY_CONTINUE = By.xpath("//div[2]/div/label/span[2]"); |
||||
|
||||
public static final By CLICK_NOTICE_STRATEGY = By.xpath("//div[6]/div[2]/div/div/div/input"); |
||||
public static final By SELECT_NOTICE_STRATEGY = By.xpath("//div[2]/div/div/div/ul/li[4]/span"); |
||||
|
||||
public static final By CLICK_PROCESS_PRIORITY = By.xpath("//div[7]/div[2]/div/div/div/div/div/span[2]"); |
||||
public static final By SELECT_PROCESS_PRIORITY = By.xpath("//li/li/span"); |
||||
|
||||
public static final By CLICK_WORKER_GROUP = By.xpath("//div[8]/div[2]/div/div/div/input"); |
||||
public static final By SELECT_WORKER_GROUP = By.xpath("//div[8]/div[2]/div/div[2]/div/div/div/ul/li/span"); |
||||
|
||||
public static final By CLICK_NOTICE_GROUP = By.xpath("//div[9]/div[2]/div/div/div/input"); |
||||
public static final By SELECT_NOTICE_GROUP = By.xpath("//div[9]/div[2]/div/div[2]/div/div/div/ul/li/span"); |
||||
|
||||
public static final By INPUT_RECIPIENT = By.xpath("//div[10]/div[2]/div/div/span/span/input"); |
||||
public static final By INPUT_Cc = By.xpath("//div[11]/div[2]/div/div/span/span/input"); |
||||
|
||||
public static final By CLICK_CREATE_BUTTON = By.xpath("//div[12]/button[2]/span"); |
||||
|
||||
//edit timing
|
||||
public static final By TIMING_STATE = By.xpath("//table/tr[2]/td[9]/span"); |
||||
|
||||
public static final By CLICK_TIMING_MANAGEMENT_BUTTON = By.xpath("//tr[2]/td[10]/button[6]"); |
||||
|
||||
public static final By WORKFLOW_NAME = By.xpath("//table/tr[2]/td[2]/span/a"); |
||||
|
||||
public static final By CLICK_EDIT_TIMING_BUTTON = By.xpath("//tr[2]/td[10]/button[1]/i"); |
||||
|
||||
//online timing
|
||||
public static final By TIMING_MANAGEMENT_TIMING_STATE = By.xpath("//table/tr[2]/td[7]/span"); |
||||
|
||||
public static final By CLICK_ONLINE_TIMING_BUTTON = By.xpath("//table/tr[2]/td[10]/button[@title['data-original-title']='上线']"); |
||||
|
||||
//offline timing
|
||||
public static final By CLICK_OFFLINE_TIMING_BUTTON = By.xpath("//table/tr[2]/td[10]/button[@title['data-original-title']='下线']"); |
||||
|
||||
//delete timing
|
||||
public static final By CLICK_DELETE_TIMING_BUTTON = By.xpath("//table/tr[2]/td[10]/span/button"); |
||||
public static final By CLICK_CONFIRM_DELETE_TIMING_BUTTON = By.xpath("//div[2]/div/button[2]/span"); |
||||
} |
@ -1,207 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.locator.project; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class WorkflowDefineLocator { |
||||
|
||||
/** |
||||
* jump workflow define page |
||||
*/ |
||||
// click project name
|
||||
public static final By CLICK_PROJECT_NAME = By.xpath("//span/a"); |
||||
|
||||
// click workflow define
|
||||
public static final By CLICK_WORKFLOW_DEFINE = By.xpath("//li/span"); |
||||
|
||||
/** |
||||
* create workflow |
||||
*/ |
||||
// click create workflow button
|
||||
public static final By CLICK_CREATE_WORKFLOW_BUTTON = By.xpath("//button/span"); |
||||
|
||||
//mouse down at shell
|
||||
public static final By MOUSE_DOWN_AT_SHELL = By.xpath("//div[@id='SHELL']/div/div"); |
||||
|
||||
//mouse down at spark
|
||||
public static final By MOUSE_DOWN_AT_SPARK = By.xpath("//div[5]/div/div"); |
||||
|
||||
//mouse move at DAG
|
||||
public static final By MOUSE_MOVE_SHELL_AT_DAG = By.xpath("//div[@id='canvas']"); |
||||
|
||||
//input shell task _name
|
||||
public static final By INPUT_SHELL_TASK_NAME = By.xpath("//input"); |
||||
|
||||
//click stop run type
|
||||
public static final By CLICK_STOP_RUN_TYPE = By.xpath("//label[2]/span[1]/input"); |
||||
|
||||
//click normal run type
|
||||
public static final By CLICK_NORMAL_RUN_TYPE = By.xpath("//label[1]/span[1]/input"); |
||||
|
||||
//input shell task description
|
||||
public static final By INPUT_SHELL_TASK_DESCRIPTION = By.xpath("//label/div/textarea"); |
||||
|
||||
//click task priority
|
||||
public static final By CLICK_TASK_PRIORITY = By.xpath("//span/div/div/div/div/div"); |
||||
|
||||
//select task priority
|
||||
public static final By SELECT_TASK_PRIORITY = By.xpath("//li[2]/li/span"); |
||||
|
||||
//click work group
|
||||
public static final By CLICK_WORK_GROUP = By.xpath("//div/div/input"); |
||||
|
||||
//select work group
|
||||
public static final By SELECT_WORK_GROUP = By.xpath("//div[4]/div[2]/div/div[1]/div/input"); |
||||
|
||||
//select number of failed retries
|
||||
public static final By SELECT_FAIL_RETRIES_NUMBER = By.xpath("//div[5]/div[2]/div[1]/div[1]/div/input"); |
||||
|
||||
//select failed retry interval
|
||||
public static final By SELECT_FAIL_RETRIES_INTERVAL = By.xpath("//div[5]/div[2]/div[2]/div[1]/div/input"); |
||||
|
||||
//click timeout alarm
|
||||
public static final By CLICK_TIMEOUT_ALARM = By.xpath("//label/div/span/span"); |
||||
|
||||
//select timeout fail
|
||||
public static final By SELECT_TIMEOUT_FAIL = By.xpath("//div/div/label[2]/span/input"); |
||||
|
||||
//cancel timeout alarm
|
||||
public static final By CANCEL_TIMEOUT_ALARM = By.xpath("//div/div/label/span/input"); |
||||
|
||||
//select timeout alarm
|
||||
public static final By SELECT_TIMEOUT_ALARM = By.xpath("//div/div/label/span/input"); |
||||
|
||||
//input timeout
|
||||
public static final By SELECT_TIMEOUT = By.xpath("//div[3]/div[2]/label/div/input"); |
||||
|
||||
//click codeMirror
|
||||
public static final By CLICK_CODE_MIRROR = By.xpath("//div[5]/div/pre"); |
||||
|
||||
//input script
|
||||
public static final By INPUT_SCRIPT = By.xpath("//div[2]/div/div/div/div/div/textarea"); |
||||
|
||||
//click custom parameters
|
||||
public static final By CLICK_CUSTOM_PARAMETERS = By.xpath("//span/a/em"); |
||||
|
||||
//input custom parameters
|
||||
public static final By INPUT_CUSTOM_PARAMETERS = By.xpath("//div[2]/div/div/div/div/div/input"); |
||||
|
||||
//input custom parameters value
|
||||
public static final By INPUT_CUSTOM_PARAMETERS_VALUE = By.xpath("//div[2]/div/div/div/div[1]/div[2]/input"); |
||||
|
||||
//click to add custom parameters
|
||||
public static final By CLICK_ADD_CUSTOM_PARAMETERS = By.xpath("//div[2]/div/div/div/div/span[2]/a/em"); |
||||
|
||||
//input to add custom parameters
|
||||
public static final By INPUT_ADD_CUSTOM_PARAMETERS = By.xpath("//div[2]/div/div/div/div[2]/div[1]/input"); |
||||
|
||||
//input to add custom parameters value
|
||||
public static final By INPUT_ADD_CUSTOM_PARAMETERS_VALUE = By.xpath("//div[2]/div[2]/input"); |
||||
|
||||
//delete custom parameters
|
||||
public static final By CLICK_DELETE_CUSTOM_PARAMETERS = By.xpath("//div[2]/span/a/em"); |
||||
|
||||
//click submit button
|
||||
public static final By CLICK_SUBMIT_BUTTON = By.xpath("//div[3]/div/button[2]/span"); |
||||
|
||||
//copy task
|
||||
public static final By MOUSE_RIGHT_CLICK = By.xpath("//div[2]/div[2]/div/div/div/div/div[2]"); |
||||
public static final By COPY_TASK = By.xpath("//a[3]/span"); |
||||
|
||||
//click line
|
||||
public static final By CLICK_LINE = By.xpath("//a[@id='line']/button/i"); |
||||
|
||||
public static final By LINE_SOURCES_TASK = By.xpath("//div[@id='canvas']/div[1]/div[2]"); |
||||
|
||||
public static final By LINE_TARGET_TASK = By.xpath("//div[@id='canvas']/div[2]/div[2]"); |
||||
|
||||
/** |
||||
* save workflow |
||||
*/ |
||||
//click save workflow button
|
||||
public static final By CLICK_SAVE_WORKFLOW_BUTTON = By.xpath("//div[2]/div[1]/div[2]/button[2]/span"); |
||||
|
||||
//input workflow name
|
||||
public static final By INPUT_WORKFLOW_NAME = By.xpath("//input"); |
||||
|
||||
//input workflow description
|
||||
public static final By INPUT_WORKFLOW_DESCRIPTION = By.xpath("//textarea"); |
||||
|
||||
//select tenant
|
||||
public static final By CLICK_TENANT = By.xpath("//div[4]/div/div/div/input"); |
||||
public static final By SELECT_TENANT = By.xpath("//div[4]/div/div[2]/div/div/div/ul/li[2]/span"); |
||||
|
||||
//click workflow timeout alarm
|
||||
public static final By CLICK_WORKFLOW_TIMEOUT_ALARM = By.xpath("//span[2]/span/span"); |
||||
|
||||
//input workflow timeout
|
||||
public static final By INPUT_WORKFLOW_TIMEOUT = By.xpath("//span/div/input"); |
||||
|
||||
//click workflow global parameters
|
||||
public static final By CLICK_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//span/a/em"); |
||||
|
||||
//input workflow global parameters
|
||||
public static final By INPUT_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//div[8]/div/div/div/div/input"); |
||||
|
||||
//input workflow global parameters value
|
||||
public static final By INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES = By.xpath("//div[2]/input"); |
||||
|
||||
//click to add workflow global parameters
|
||||
public static final By CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//span[2]/a/em"); |
||||
|
||||
//input to add workflow global parameters
|
||||
public static final By INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//div[8]/div/div/div[2]/div/input"); |
||||
|
||||
//input to add workflow global parameters value
|
||||
public static final By INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES = By.xpath("//div[2]/div[2]/input"); |
||||
|
||||
//delete workflow global parameters value
|
||||
public static final By CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS = By.xpath("//div[2]/span/a/em"); |
||||
|
||||
//click add button
|
||||
public static final By CLICK_ADD_BUTTON = By.xpath("//div[2]/div/button[2]/span"); |
||||
//scroll to element bottom
|
||||
public static final By SCROLL_BOTTOM = By.xpath("//span/a/em"); |
||||
|
||||
public static final By WORKFLOW_NAME = By.xpath("//table/tr[2]/td[3]/span/a"); |
||||
|
||||
/** |
||||
* online workflow |
||||
*/ |
||||
public static final By WORKFLOW_STATE = By.xpath("//table/tr[2]/td[4]/span"); |
||||
|
||||
|
||||
// click online workflow button
|
||||
public static final By CLICK_ONLINE_WORKFLOW_BUTTON = By.xpath("//button[@title['data-original-title']='上线']"); |
||||
|
||||
/** |
||||
* offline workflow |
||||
*/ |
||||
// click offline workflow button
|
||||
public static final By CLICK_OFFLINE_WORKFLOW_BUTTON = By.xpath("//button[@title['data-original-title']='下线']"); |
||||
|
||||
/** |
||||
* delete workflow |
||||
*/ |
||||
//click delete workflow button
|
||||
public static final By DELETE_WORKFLOW_BOTTOM = By.xpath("//table/tr[2]/td[10]/span/button"); |
||||
|
||||
//click confirm delete workflow button
|
||||
public static final By CONFIRM_DELETE_WORKFLOW_BOTTOM = By.xpath("//div[2]/div/button[2]/span"); |
||||
} |
@ -1,36 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.security; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class AlertManageLocator { |
||||
//create alert locator
|
||||
public static final By CLICK_ALERT_MANAGE = By.xpath("//div[4]/div/a/div/a/span"); |
||||
public static final By CLICK_CREATE_ALERT = By.xpath("//div[1]/div[2]/div/div[2]/div[2]/div/div[1]/button/span"); |
||||
public static final By INPUT_ALERT_NAME = By.xpath("//div[2]/div/div[1]/div[2]/div/input"); |
||||
public static final By CLICK_ALERT_TYPE = By.xpath("//div[2]/div/div[2]/div/div[2]/div[2]/div/div[1]/div/input"); |
||||
public static final By SELECT_ALERT_EMAIL = By.xpath("//div[2]/div/div[2]/div/div[2]/div[2]/div/div[2]/div/div/div/ul/li[1]/span"); |
||||
public static final By INPUT_ALERT_DESCRIPTION = By.xpath("//textarea"); |
||||
public static final By SUBMIT_ALERT = By.xpath("//div[3]/button[2]/span"); |
||||
|
||||
public static final By ALERT_NAME = By.xpath("//table/tr[2]/td[2]/span"); |
||||
|
||||
//delete alert locator
|
||||
public static final By DELETE_ALERT_BUTTON = By.xpath("//span/button"); |
||||
public static final By CONFIRM_DELETE_ALERT_BUTTON = By.xpath("//div[2]/div/button[2]/span"); |
||||
} |
@ -1,33 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.security; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class QueueManageLocator { |
||||
//create queue locator
|
||||
public static final By CLICK_QUEUE_MANAGE = By.xpath("//div[6]/div/a/div/a/span"); |
||||
public static final By CLICK_CREATE_QUEUE = By.xpath("//button/span"); |
||||
public static final By INPUT_QUEUE_NAME = By.xpath("//div[2]/div/div/div[2]/div/input"); |
||||
public static final By INPUT_QUEUE_VALUE = By.xpath("//div[2]/div[2]/div/input"); |
||||
public static final By SUBMIT_QUEUE = By.xpath("//button[2]/span"); |
||||
|
||||
public static final By LIST_QUEUE_NAME = By.xpath("//table/tr[2]/td[2]/span"); |
||||
|
||||
//edit queue locator
|
||||
public static final By CLICK_EDIT_QUEUE = By.xpath("//td[6]/button/i"); |
||||
} |
@ -1,41 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.security; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class TenantManageLocator{ |
||||
public static final By SECURITY_CENTER = By.xpath("//div[2]/div[6]/div/a/span/em"); |
||||
|
||||
public static final By TENANT_MANAGE = By.xpath("//div[2]/div/a/div/a/span"); |
||||
|
||||
public static final By CREATE_TENANT_BUTTON = By.xpath("//button/span"); |
||||
|
||||
public static final By TENANT_INPUT_CODE = By.xpath("//div[2]/div/div/div[2]/div/input"); |
||||
|
||||
public static final By QUEUE = By.xpath("//textarea"); |
||||
|
||||
public static final By DESCRIPTION = By.xpath("//textarea"); |
||||
|
||||
public static final By SUBMIT_BUTTON = By.xpath("//div[3]/button[2]/span"); |
||||
|
||||
public static final By DELETE_TENANT_BUTTON = By.xpath("//div[3]/div[1]/div/table/tr[2]/td[7]/span/button"); |
||||
|
||||
public static final By CONFIRM_DELETE_TENANT_BUTTON = By.xpath("//div[2]/div/button[2]/span"); |
||||
|
||||
public static final By TENANT_CODE_FIRST = By.xpath("//table/tr[2]/td[2]/span"); |
||||
} |
@ -1,45 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.security; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class TokenManageLocator { |
||||
//create token
|
||||
public static final By CLICK_TOKEN_MANAGE = By.xpath("/html/body/div[1]/div[2]/div/div[1]/div[7]/div/a/div/a/span"); |
||||
|
||||
public static final By CLICK_CREATE_TOKEN = By.xpath("//div[2]/div/div[2]/div[2]/div/div[1]/button/span"); |
||||
|
||||
public static final By CREATE_TOKEN_POPUP = By.xpath("//div[5]/div/div[2]/div/div[1]/span"); |
||||
|
||||
public static final By SELECT_USER = By.xpath("//div[2]/div[2]/div/div/div/span/i"); |
||||
|
||||
public static final By CLICK_GENERATE_TOKEN_BUTTON = By.xpath("//div[3]/div[2]/button/span"); |
||||
|
||||
public static final By CLICK_SUBMIT_BUTTON = By.xpath("//div[3]/button[2]/span"); |
||||
|
||||
//edit token
|
||||
public static final By TOKEN = By.xpath("//table/tr[2]/td[1]/span"); |
||||
public static final By EDIT_TOKEN_BUTTON = By.xpath("//table/tr[2]/td[7]/button"); |
||||
|
||||
|
||||
//delete token
|
||||
public static final By CLICK_DELETE_BUTTON = By.xpath("//div[3]/div[1]/div/table/tr[2]/td[7]/span/button"); |
||||
|
||||
public static final By CLICK_CONFIRM_DELETE_BUTTON = By.xpath("//div[2]/div/button[2]/span"); |
||||
|
||||
} |
@ -1,68 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.locator.security; |
||||
|
||||
import org.openqa.selenium.By; |
||||
|
||||
public class UserManageLocator { |
||||
|
||||
/** |
||||
* create user |
||||
*/ |
||||
public static final By CLICK_USER_MANAGE = By.xpath("//div[3]/div/a/div/a/span"); |
||||
|
||||
public static final By CLICK_CREATE_USER_BUTTON = By.xpath("//span[contains(.,'创建用户')]"); |
||||
|
||||
public static final By INPUT_USERNAME = By.xpath("//div[2]/div/div/div[2]/div/input"); |
||||
|
||||
public static final By INPUT_PASSWORD = By.xpath("//div[2]/div[2]/div/input"); |
||||
|
||||
public static final By CLICK_TENANT = By.xpath("//div[3]/div[2]/div/div/div/input"); |
||||
|
||||
public static final By SELECT_TENANT = By.xpath("//div[3]/div[2]/div/div[2]/div/div/div/ul/li/span"); |
||||
|
||||
public static final By CLICK_QUEUE = By.xpath("//div[4]/div[2]/div/div/div/input"); |
||||
|
||||
public static final By SELECT_QUEUE = By.xpath("//div[4]/div[2]/div/div[2]/div/div/div/ul/li/span"); |
||||
|
||||
public static final By INPUT_EMAIL = By.xpath("//div[5]/div[2]/div/input"); |
||||
|
||||
public static final By INPUT_PHONE = By.xpath("//div[6]/div[2]/div/input"); |
||||
|
||||
public static final By SELECT_STOP_STATE = By.xpath("//div[7]/div[2]/div/label[2]/span/input"); |
||||
|
||||
public static final By SELECT_ENABLE_STATE = By.xpath("//div[7]/div[2]/div/label[1]/span/input"); |
||||
|
||||
public static final By SUBMIT = By.xpath("//div[3]/button[2]/span"); |
||||
|
||||
public static final By USERNAME = By.xpath("//table/tr[2]/td[2]/span"); |
||||
|
||||
/** |
||||
* edit user |
||||
*/ |
||||
public static final By USER_NAME = By.xpath("//table/tr[2]/td[2]/span"); |
||||
|
||||
public static final By EDIT_GENERAL_USER_BUTTON = By.xpath("//div[3]/div[1]/div/table/tr[2]/td[11]/button"); |
||||
|
||||
public static final By EDIT_ADMIN_USER_BUTTON = By.xpath("//div[3]/div[1]/div/table/tr[3]/td[11]/button"); |
||||
/** |
||||
* delete user |
||||
*/ |
||||
public static final By DELETE_USER_BUTTON = By.xpath("//table/tr[3]/td[11]/span[2]/button"); |
||||
|
||||
public static final By CONFIRM_DELETE_USER_BUTTON = By.xpath("//tr[3]/td[11]/span[2]/div/div[2]/div/button[2]/span"); |
||||
} |
@ -1,70 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.LoginData; |
||||
import org.apache.dolphinscheduler.data.security.TenantManageData; |
||||
import org.apache.dolphinscheduler.locator.LoginLocator; |
||||
import org.openqa.selenium.Cookie; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class LoginPage extends PageCommon { |
||||
TenantManageData tenantManageData = new TenantManageData(); |
||||
|
||||
/** |
||||
* Unique constructor |
||||
* @param driver driver |
||||
*/ |
||||
public LoginPage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* jump page |
||||
*/ |
||||
public void jumpPageEnlish() { |
||||
System.out.println("jump to English login page"); |
||||
super.jumpPage(LoginData.URL); |
||||
Cookie cookie = new Cookie("language", "en_US", "/", null); |
||||
driver.manage().addCookie(cookie); |
||||
} |
||||
|
||||
public void jumpPageChinese() { |
||||
super.jumpPage(LoginData.URL); |
||||
Cookie cookie = new Cookie("language", "zh_CN", "/", null); |
||||
driver.manage().addCookie(cookie); |
||||
} |
||||
/** |
||||
* login |
||||
* |
||||
* @return Whether to enter the specified page after searching |
||||
*/ |
||||
public boolean login() throws InterruptedException { |
||||
// login data
|
||||
sendInput(LoginLocator.LOGIN_INPUT_USER, LoginData.USER); |
||||
sendInput(LoginLocator.LOGIN_INPUT_PASSWORD, LoginData.PASSWORD); |
||||
|
||||
// click login button
|
||||
clickButton(LoginLocator.LOGIN_BUTTON); |
||||
|
||||
moveToElement(LoginLocator.LOGIN_BUTTON_MOVE); |
||||
|
||||
// Whether to enter the specified page after login
|
||||
return ifTitleContains(tenantManageData.getTenantData("tenantTitle")); |
||||
} |
||||
} |
@ -1,74 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.project; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.constant.TestConstant; |
||||
import org.apache.dolphinscheduler.data.project.CreateProjectData; |
||||
import org.apache.dolphinscheduler.locator.project.CreateProjectLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class CreateProjectPage extends PageCommon { |
||||
public CreateProjectPage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* jump to ProjectManagePage |
||||
*/ |
||||
public boolean jumpProjectManagePage() throws InterruptedException { |
||||
Thread.sleep(TestConstant.THREE_THOUSAND); |
||||
clickTopElement(CreateProjectLocator.PROJECT_MANAGE); |
||||
Thread.sleep(TestConstant.ONE_THOUSAND); |
||||
return ifTitleContains(CreateProjectData.PROJECT_TITLE); |
||||
} |
||||
|
||||
/** |
||||
* create project |
||||
* |
||||
* @return Whether to enter the specified page after create project |
||||
*/ |
||||
public boolean createProject() throws InterruptedException { |
||||
clickElement(CreateProjectLocator.CREATE_PROJECT_BUTTON); |
||||
|
||||
// input create project data
|
||||
sendInput(CreateProjectLocator.PROJECT_NAME, CreateProjectData.PROJECT_NAME); |
||||
sendInput(CreateProjectLocator.PROJECT_DESCRIPTION, CreateProjectData.DESCRIPTION); |
||||
|
||||
// click submit button
|
||||
clickButton(CreateProjectLocator.SUBMIT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(CreateProjectData.PROJECT_TITLE); |
||||
} |
||||
|
||||
/** |
||||
* delete project |
||||
* |
||||
* @return Whether to enter the specified page after delete project |
||||
*/ |
||||
public boolean deleteProject() throws InterruptedException { |
||||
//click delete project
|
||||
clickElement(CreateProjectLocator.DELETE_PROJECT_BUTTON); |
||||
|
||||
//click confirm delete project
|
||||
clickElement(CreateProjectLocator.CONFIRM_DELETE_PROJECT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(CreateProjectData.PROJECT_TITLE); |
||||
} |
||||
} |
@ -1,201 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.project; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.constant.TestConstant; |
||||
import org.apache.dolphinscheduler.data.project.CreateWorkflowData; |
||||
import org.apache.dolphinscheduler.locator.project.CreateWorkflowLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class CreateWorkflowPage extends PageCommon { |
||||
public CreateWorkflowPage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* jump create workflow page |
||||
*/ |
||||
|
||||
public boolean jumpWorkflowPage() throws InterruptedException { |
||||
// click project name
|
||||
clickElement(CreateWorkflowLocator.CLICK_PROJECT_NAME); |
||||
Thread.sleep(TestConstant.ONE_THOUSAND); |
||||
|
||||
System.out.println("Click on workflow define to jump to workflow define page"); |
||||
// click workflow define
|
||||
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_DEFINE); |
||||
|
||||
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE); |
||||
} |
||||
|
||||
public boolean createWorkflow() throws InterruptedException { |
||||
System.out.println("Click create workflow button"); |
||||
// click create workflow button
|
||||
clickElement(CreateWorkflowLocator.CLICK_CREATE_WORKFLOW_BUTTON); |
||||
|
||||
System.out.println("drag shell task"); |
||||
//drag shell_task
|
||||
dragAndDrop(CreateWorkflowLocator.MOUSE_DOWN_AT_SHELL,CreateWorkflowLocator.MOUSE_MOVE_SHELL_AT_DAG); |
||||
|
||||
//input shell task _name
|
||||
sendInput(CreateWorkflowLocator.INPUT_SHELL_TASK_NAME , CreateWorkflowData.SHELL_TASK_NAME); |
||||
|
||||
//click stop run type
|
||||
clickElement(CreateWorkflowLocator.CLICK_STOP_RUN_TYPE); |
||||
|
||||
//click normal run type
|
||||
clickElement(CreateWorkflowLocator.CLICK_NORMAL_RUN_TYPE); |
||||
|
||||
//input shell task description
|
||||
sendInput(CreateWorkflowLocator.INPUT_SHELL_TASK_DESCRIPTION , CreateWorkflowData.SHELL_TASK_DESCRIPTION); |
||||
|
||||
//select task priority
|
||||
clickElement(CreateWorkflowLocator.CLICK_TASK_PRIORITY); |
||||
clickElement(CreateWorkflowLocator.SELECT_TASK_PRIORITY); |
||||
|
||||
//select work group
|
||||
clickElement(CreateWorkflowLocator.CLICK_WORK_GROUP); |
||||
clickElement(CreateWorkflowLocator.SELECT_WORK_GROUP); |
||||
|
||||
//select number of failed retries
|
||||
clickElement(CreateWorkflowLocator.SELECT_FAIL_RETRIES_NUMBER); |
||||
|
||||
//select failed retry interval
|
||||
clickElement(CreateWorkflowLocator.SELECT_FAIL_RETRIES_INTERVAL); |
||||
|
||||
//click timeout alarm
|
||||
clickElement(CreateWorkflowLocator.CLICK_TIMEOUT_ALARM); |
||||
|
||||
//select timeout fail
|
||||
clickElement(CreateWorkflowLocator.SELECT_TIMEOUT_FAIL); |
||||
|
||||
//cancel timeout alarm
|
||||
clickElement(CreateWorkflowLocator.CANCEL_TIMEOUT_ALARM); |
||||
|
||||
//select timeout alarm
|
||||
clickElement(CreateWorkflowLocator.SELECT_TIMEOUT_ALARM); |
||||
|
||||
//clear timeout
|
||||
clearInput(CreateWorkflowLocator.SELECT_TIMEOUT); |
||||
clearInput(CreateWorkflowLocator.SELECT_TIMEOUT); |
||||
|
||||
//input timeout
|
||||
sendInput(CreateWorkflowLocator.SELECT_TIMEOUT, CreateWorkflowData.INPUT_TIMEOUT); |
||||
|
||||
//click codeMirror and input script
|
||||
inputCodeMirror(CreateWorkflowLocator.CLICK_CODE_MIRROR, CreateWorkflowLocator.INPUT_SCRIPT, CreateWorkflowData.SHELL_SCRIPT); |
||||
scrollToElementBottom(CreateWorkflowLocator.SCROLL_BOTTOM); |
||||
|
||||
//click custom parameters
|
||||
clickElement(CreateWorkflowLocator.CLICK_CUSTOM_PARAMETERS); |
||||
|
||||
//input custom parameters
|
||||
sendInput(CreateWorkflowLocator.INPUT_CUSTOM_PARAMETERS, CreateWorkflowData.INPUT_CUSTOM_PARAMETERS); |
||||
|
||||
//input custom parameters value
|
||||
sendInput(CreateWorkflowLocator.INPUT_CUSTOM_PARAMETERS_VALUE, CreateWorkflowData.INPUT_CUSTOM_PARAMETERS_VALUE); |
||||
|
||||
//click add custom parameters
|
||||
clickElement(CreateWorkflowLocator.CLICK_ADD_CUSTOM_PARAMETERS); |
||||
|
||||
scrollToElementBottom(CreateWorkflowLocator.SCROLL_BOTTOM); |
||||
|
||||
//input add custom parameters
|
||||
sendInput(CreateWorkflowLocator.INPUT_ADD_CUSTOM_PARAMETERS, CreateWorkflowData.INPUT_ADD_CUSTOM_PARAMETERS); |
||||
|
||||
//input add custom parameters value
|
||||
sendInput(CreateWorkflowLocator.INPUT_ADD_CUSTOM_PARAMETERS_VALUE, CreateWorkflowData.INPUT_ADD_CUSTOM_PARAMETERS_VALUE); |
||||
|
||||
//click delete custom parameters
|
||||
clickElement(CreateWorkflowLocator.CLICK_DELETE_CUSTOM_PARAMETERS); |
||||
|
||||
//click submit button
|
||||
clickElement(CreateWorkflowLocator.CLICK_SUBMIT_BUTTON); |
||||
Thread.sleep(TestConstant.ONE_THOUSAND); |
||||
System.out.println("Task node set up successfully"); |
||||
System.out.println("move to Dag Element "); |
||||
moveToDragElement(CreateWorkflowLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100); |
||||
|
||||
return ifTitleContains(CreateWorkflowData.CREATE_WORKFLOW_TITLE); |
||||
} |
||||
|
||||
/** |
||||
* save workflow |
||||
*/ |
||||
public boolean saveWorkflow() throws InterruptedException { |
||||
System.out.println("start to save workflow "); |
||||
|
||||
//click save workflow button
|
||||
clickElement(CreateWorkflowLocator.CLICK_SAVE_WORKFLOW_BUTTON); |
||||
|
||||
//input workflow name
|
||||
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_NAME, CreateWorkflowData.INPUT_WORKFLOW_NAME); |
||||
|
||||
//input workflow description
|
||||
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_DESCRIPTION, CreateWorkflowData.INPUT_WORKFLOW_DESCRIPTION); |
||||
|
||||
//select tenant
|
||||
clickElement(CreateWorkflowLocator.CLICK_TENANT); |
||||
clickElement(CreateWorkflowLocator.SELECT_TENANT); |
||||
|
||||
//click workflow timeout alarm
|
||||
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_TIMEOUT_ALARM); |
||||
clearInput(CreateWorkflowLocator.INPUT_WORKFLOW_TIMEOUT); |
||||
|
||||
//input workflow timeout
|
||||
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_TIMEOUT, CreateWorkflowData.INPUT_WORKFLOW_TIMEOUT); |
||||
|
||||
//click workflow global parameters
|
||||
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_GLOBAL_PARAMETERS); |
||||
|
||||
//input workflow global parameters
|
||||
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS, CreateWorkflowData.INPUT_WORKFLOW_GLOBAL_PARAMETERS); |
||||
|
||||
//input workflow global parameters value
|
||||
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES, CreateWorkflowData.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES); |
||||
|
||||
//click to add workflow global parameters
|
||||
clickElement(CreateWorkflowLocator.CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS); |
||||
|
||||
//input to add workflow global parameters
|
||||
sendInput(CreateWorkflowLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS, CreateWorkflowData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS); |
||||
|
||||
//input to add workflow global parameters value
|
||||
sendInput(CreateWorkflowLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES, CreateWorkflowData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES); |
||||
|
||||
//delete workflow global parameters value
|
||||
clickElement(CreateWorkflowLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS); |
||||
Thread.sleep(TestConstant.ONE_THOUSAND); |
||||
|
||||
//click add button
|
||||
clickButton(CreateWorkflowLocator.CLICK_ADD_BUTTON); |
||||
System.out.println("submit workflow"); |
||||
return ifTitleContains(CreateWorkflowData.CREATE_WORKFLOW_TITLE); |
||||
} |
||||
|
||||
public boolean deleteWorkflow() throws InterruptedException { |
||||
//click delete project
|
||||
clickButton(CreateWorkflowLocator.DELETE_WORKFLOW_BOTTOM); |
||||
|
||||
//click confirm delete project
|
||||
clickButton(CreateWorkflowLocator.CONFIRM_DELETE_WORKFLOW_BOTTOM); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE); |
||||
} |
||||
} |
@ -1,44 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.project; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.locator.project.ProcessInstanceLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
import org.apache.dolphinscheduler.data.project.ProcessInstanceData; |
||||
|
||||
|
||||
public class ProcessInstancePage extends PageCommon { |
||||
ProcessInstanceData processInstanceData = new ProcessInstanceData(); |
||||
|
||||
public ProcessInstancePage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* rerun workflow page |
||||
*/ |
||||
public boolean rerunWorkflowPage() throws InterruptedException { |
||||
Thread.sleep(2000); |
||||
clickTopElement(ProcessInstanceLocator.CLICK_PROCESS_INSTANCE_NAME); |
||||
locateElement(ProcessInstanceLocator.PROCESS_INSTANCE_SUCCESS_STATE); |
||||
clickTopElement(ProcessInstanceLocator.CLICK_RERUN_BUTTON); |
||||
return ifTitleContains(processInstanceData.getProcessInstanceData("processInstanceTitle")); |
||||
} |
||||
|
||||
} |
@ -1,74 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.project; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.project.ProjectData; |
||||
import org.apache.dolphinscheduler.locator.project.ProjectLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class ProjectPage extends PageCommon { |
||||
ProjectData projectData = new ProjectData(); |
||||
|
||||
public ProjectPage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* jump to ProjectManagePage |
||||
*/ |
||||
public boolean jumpProjectManagePage() throws InterruptedException { |
||||
clickTopElement(ProjectLocator.PROJECT_MANAGE); |
||||
return ifTitleContains(projectData.getProjectData("projectTitle")); |
||||
} |
||||
|
||||
/** |
||||
* create project |
||||
* |
||||
* @return Whether to enter the specified page after create project |
||||
*/ |
||||
public boolean createProject() throws InterruptedException { |
||||
ifTextExists(ProjectLocator.CREATE_PROJECT_BUTTON, projectData.getProjectData("createProjectButton")); |
||||
clickElement(ProjectLocator.CREATE_PROJECT_BUTTON); |
||||
|
||||
// input create project data
|
||||
sendInput(ProjectLocator.PROJECT_NAME, projectData.getProjectData("projectName")); |
||||
sendInput(ProjectLocator.PROJECT_DESCRIPTION, projectData.getProjectData("description")); |
||||
|
||||
// click submit button
|
||||
clickButton(ProjectLocator.SUBMIT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTextExists(ProjectLocator.LIST_PROJECT_NAME, projectData.getProjectData("projectName")); |
||||
} |
||||
|
||||
/** |
||||
* delete project |
||||
* |
||||
* @return Whether to enter the specified page after delete project |
||||
*/ |
||||
public boolean deleteProject() throws InterruptedException { |
||||
//click delete project
|
||||
clickElement(ProjectLocator.DELETE_PROJECT_BUTTON); |
||||
|
||||
//click confirm delete project
|
||||
clickElement(ProjectLocator.CONFIRM_DELETE_PROJECT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(projectData.getProjectData("projectTitle")); |
||||
} |
||||
} |
@ -1,58 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.project; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.project.RunWorkflowData; |
||||
import org.apache.dolphinscheduler.data.project.WorkflowDefineData; |
||||
import org.apache.dolphinscheduler.locator.project.RunWorkflowLocator; |
||||
import org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class RunWorkflowPage extends PageCommon { |
||||
RunWorkflowData runWorkflowData = new RunWorkflowData(); |
||||
WorkflowDefineData workflowDefineData = new WorkflowDefineData(); |
||||
|
||||
public RunWorkflowPage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
public boolean runWorkflow() throws InterruptedException { |
||||
// Determine whether the workflow status is online
|
||||
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE, runWorkflowData.getRunWorkflowData("online")); |
||||
|
||||
// click run workflow button
|
||||
System.out.println("Click run workflow button"); |
||||
clickButton(RunWorkflowLocator.CLICK_RUN_WORKFLOW_BUTTON); |
||||
|
||||
clickElement(RunWorkflowLocator.SELECT_FAILURE_STRATEGY_END); |
||||
clickElement(RunWorkflowLocator.SELECT_FAILURE_STRATEGY_CONTINUE); |
||||
clickElement(RunWorkflowLocator.CLICK_NOTICE_STRATEGY); |
||||
clickElement(RunWorkflowLocator.SELECT_NOTICE_STRATEGY); |
||||
clickElement(RunWorkflowLocator.CLICK_PROCESS_PRIORITY); |
||||
clickElement(RunWorkflowLocator.SELECT_PROCESS_PRIORITY_HIGHEST); |
||||
clickElement(RunWorkflowLocator.CLICK_WORKER_GROUP); |
||||
clickElement(RunWorkflowLocator.SELECT_WORKER_GROUP); |
||||
clickElement(RunWorkflowLocator.CLICK_NOTICE_GROUP); |
||||
clickElement(RunWorkflowLocator.SELECT_NOTICE_GROUP); |
||||
sendInput(RunWorkflowLocator.INPUT_RECIPIENT, runWorkflowData.getRunWorkflowData("recipient")); |
||||
sendInput(RunWorkflowLocator.INPUT_Cc, runWorkflowData.getRunWorkflowData("Cc")); |
||||
clickButton(RunWorkflowLocator.CLICK_RUNNING_BUTTON); |
||||
|
||||
return ifTitleContains(workflowDefineData.getWorkflowDefineData("workflowDefineTitle")); |
||||
} |
||||
} |
@ -1,144 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.project; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.project.TimingData; |
||||
import org.apache.dolphinscheduler.locator.project.TimingLocator; |
||||
import org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class TimingPage extends PageCommon { |
||||
TimingData timingData = new TimingData(); |
||||
|
||||
public TimingPage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* create timing |
||||
*/ |
||||
public boolean createTiming() throws InterruptedException { |
||||
flushPage(); |
||||
// Determine whether the workflow status is online
|
||||
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE, timingData.getTimingData("online")); |
||||
|
||||
// click timing button
|
||||
System.out.println("Click timing button"); |
||||
clickButton(TimingLocator.CLICK_TIMING_BUTTON); |
||||
System.out.println("Click execution timing button"); |
||||
clickButton(TimingLocator.CLICK_EXECUTION_TIMING_BUTTON); |
||||
|
||||
clickElement(TimingLocator.SELECT_FAILURE_STRATEGY_END); |
||||
clickElement(TimingLocator.SELECT_FAILURE_STRATEGY_CONTINUE); |
||||
clickElement(TimingLocator.CLICK_NOTICE_STRATEGY); |
||||
clickElement(TimingLocator.SELECT_NOTICE_STRATEGY); |
||||
clickElement(TimingLocator.CLICK_PROCESS_PRIORITY); |
||||
clickElement(TimingLocator.SELECT_PROCESS_PRIORITY); |
||||
clickElement(TimingLocator.CLICK_WORKER_GROUP); |
||||
clickElement(TimingLocator.SELECT_WORKER_GROUP); |
||||
clickElement(TimingLocator.CLICK_NOTICE_GROUP); |
||||
clickElement(TimingLocator.SELECT_NOTICE_GROUP); |
||||
sendInput(TimingLocator.INPUT_RECIPIENT, timingData.getTimingData("recipient")); |
||||
sendInput(TimingLocator.INPUT_Cc, timingData.getTimingData("Cc")); |
||||
clickButton(TimingLocator.CLICK_CREATE_BUTTON); |
||||
|
||||
return ifTextExists(TimingLocator.TIMING_STATE, timingData.getTimingData("offline")); |
||||
} |
||||
|
||||
/** |
||||
* edit timing |
||||
*/ |
||||
public boolean editTiming() throws InterruptedException { |
||||
// click timing button
|
||||
System.out.println("Click timing management button"); |
||||
clickButton(TimingLocator.CLICK_TIMING_MANAGEMENT_BUTTON); |
||||
|
||||
// Determine whether the workflow name exists
|
||||
ifTextExists(TimingLocator.WORKFLOW_NAME, timingData.getTimingData("offline")); |
||||
|
||||
System.out.println("Click edit timing button"); |
||||
clickButton(TimingLocator.CLICK_EDIT_TIMING_BUTTON); |
||||
System.out.println("Click execution timing button"); |
||||
clickButton(TimingLocator.CLICK_EXECUTION_TIMING_BUTTON); |
||||
|
||||
clickElement(TimingLocator.SELECT_FAILURE_STRATEGY_END); |
||||
clickElement(TimingLocator.SELECT_FAILURE_STRATEGY_CONTINUE); |
||||
clickElement(TimingLocator.CLICK_NOTICE_STRATEGY); |
||||
clickElement(TimingLocator.SELECT_NOTICE_STRATEGY); |
||||
clickElement(TimingLocator.CLICK_PROCESS_PRIORITY); |
||||
clickElement(TimingLocator.SELECT_PROCESS_PRIORITY); |
||||
clickElement(TimingLocator.CLICK_WORKER_GROUP); |
||||
clickElement(TimingLocator.SELECT_WORKER_GROUP); |
||||
clickElement(TimingLocator.CLICK_NOTICE_GROUP); |
||||
clickElement(TimingLocator.SELECT_NOTICE_GROUP); |
||||
sendInput(TimingLocator.INPUT_RECIPIENT, timingData.getTimingData("editRecipient")); |
||||
sendInput(TimingLocator.INPUT_Cc, timingData.getTimingData("editCc")); |
||||
clickButton(TimingLocator.CLICK_CREATE_BUTTON); |
||||
|
||||
return ifTitleContains(timingData.getTimingData("timingTitle")); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* online timing |
||||
*/ |
||||
public boolean onlineTiming() throws InterruptedException { |
||||
flushPage(); |
||||
// Determine whether the timing is offline
|
||||
ifTextExists(TimingLocator.TIMING_MANAGEMENT_TIMING_STATE, timingData.getTimingData("offline")); |
||||
|
||||
// click online timing button
|
||||
System.out.println("Click online timing button"); |
||||
clickElement(TimingLocator.CLICK_ONLINE_TIMING_BUTTON); |
||||
|
||||
return ifTextExists(TimingLocator.TIMING_MANAGEMENT_TIMING_STATE, timingData.getTimingData("online")); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* offline timing |
||||
*/ |
||||
public boolean offlineTiming() throws InterruptedException { |
||||
flushPage(); |
||||
// Determine whether the timing is online
|
||||
ifTextExists(TimingLocator.TIMING_MANAGEMENT_TIMING_STATE, timingData.getTimingData("online")); |
||||
|
||||
// click offline timing button
|
||||
System.out.println("Click offline timing button"); |
||||
clickElement(TimingLocator.CLICK_OFFLINE_TIMING_BUTTON); |
||||
|
||||
return ifTextExists(TimingLocator.TIMING_MANAGEMENT_TIMING_STATE, timingData.getTimingData("offline")); |
||||
} |
||||
|
||||
|
||||
|
||||
/** |
||||
* delete timing |
||||
*/ |
||||
public boolean deleteTiming() throws InterruptedException { |
||||
// Determine whether the timing is offline
|
||||
ifTextExists(TimingLocator.TIMING_MANAGEMENT_TIMING_STATE, timingData.getTimingData("offline")); |
||||
|
||||
// click offline timing button
|
||||
System.out.println("Click delete timing button"); |
||||
clickButton(TimingLocator.CLICK_DELETE_TIMING_BUTTON); |
||||
clickButton(TimingLocator.CLICK_CONFIRM_DELETE_TIMING_BUTTON); |
||||
|
||||
return ifTextExists(TimingLocator.TIMING_STATE, "-"); |
||||
} |
||||
} |
@ -1,243 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.project; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.project.ProjectData; |
||||
import org.apache.dolphinscheduler.data.project.WorkflowDefineData; |
||||
import org.apache.dolphinscheduler.locator.project.ProjectLocator; |
||||
import org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class WorkflowDefinePage extends PageCommon { |
||||
WorkflowDefineData workflowDefineData = new WorkflowDefineData(); |
||||
ProjectData projectData = new ProjectData(); |
||||
|
||||
public WorkflowDefinePage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* jump create workflow page |
||||
*/ |
||||
|
||||
public boolean jumpWorkflowPage() throws InterruptedException { |
||||
ifTextExists(ProjectLocator.LIST_PROJECT_NAME, projectData.getProjectData("projectName")); |
||||
|
||||
// click project name
|
||||
clickElement(WorkflowDefineLocator.CLICK_PROJECT_NAME); |
||||
|
||||
ifTextExists(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE,workflowDefineData.getWorkflowDefineData("workflowDefine")); |
||||
|
||||
System.out.println("Click on workflow define to jump to workflow define page"); |
||||
// click workflow define
|
||||
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
||||
|
||||
return ifTitleContains(workflowDefineData.getWorkflowDefineData("workflowDefineTitle")); |
||||
} |
||||
|
||||
public boolean createWorkflow() throws InterruptedException { |
||||
System.out.println("Click create workflow button"); |
||||
// click create workflow button
|
||||
clickElement(WorkflowDefineLocator.CLICK_CREATE_WORKFLOW_BUTTON); |
||||
|
||||
System.out.println("drag shell task"); |
||||
//drag shell_task
|
||||
dragAndDrop(WorkflowDefineLocator.MOUSE_DOWN_AT_SHELL, WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG); |
||||
|
||||
//input shell task _name
|
||||
sendInput(WorkflowDefineLocator.INPUT_SHELL_TASK_NAME, workflowDefineData.getWorkflowDefineData("shellTaskName")); |
||||
//click stop run type
|
||||
clickElement(WorkflowDefineLocator.CLICK_STOP_RUN_TYPE); |
||||
|
||||
//click normal run type
|
||||
clickElement(WorkflowDefineLocator.CLICK_NORMAL_RUN_TYPE); |
||||
|
||||
//input shell task description
|
||||
sendInput(WorkflowDefineLocator.INPUT_SHELL_TASK_DESCRIPTION, workflowDefineData.getWorkflowDefineData("shellTaskDescription")); |
||||
|
||||
//select task priority
|
||||
clickElement(WorkflowDefineLocator.CLICK_TASK_PRIORITY); |
||||
clickElement(WorkflowDefineLocator.SELECT_TASK_PRIORITY); |
||||
|
||||
//select work group
|
||||
clickElement(WorkflowDefineLocator.CLICK_WORK_GROUP); |
||||
clickElement(WorkflowDefineLocator.SELECT_WORK_GROUP); |
||||
|
||||
//select number of failed retries
|
||||
clickElement(WorkflowDefineLocator.SELECT_FAIL_RETRIES_NUMBER); |
||||
|
||||
//select failed retry interval
|
||||
clickElement(WorkflowDefineLocator.SELECT_FAIL_RETRIES_INTERVAL); |
||||
|
||||
//click timeout alarm
|
||||
clickElement(WorkflowDefineLocator.CLICK_TIMEOUT_ALARM); |
||||
|
||||
//select timeout fail
|
||||
clickElement(WorkflowDefineLocator.SELECT_TIMEOUT_FAIL); |
||||
|
||||
//cancel timeout alarm
|
||||
clickElement(WorkflowDefineLocator.CANCEL_TIMEOUT_ALARM); |
||||
|
||||
//select timeout alarm
|
||||
clickElement(WorkflowDefineLocator.SELECT_TIMEOUT_ALARM); |
||||
|
||||
//clear timeout
|
||||
clearInput(WorkflowDefineLocator.SELECT_TIMEOUT); |
||||
clearInput(WorkflowDefineLocator.SELECT_TIMEOUT); |
||||
|
||||
//input timeout
|
||||
sendInput(WorkflowDefineLocator.SELECT_TIMEOUT, workflowDefineData.getWorkflowDefineData("taskTimeout")); |
||||
|
||||
//click codeMirror and input script
|
||||
inputCodeMirror(WorkflowDefineLocator.CLICK_CODE_MIRROR, WorkflowDefineLocator.INPUT_SCRIPT, workflowDefineData.getWorkflowDefineData("shellScript")); |
||||
scrollToElementBottom(WorkflowDefineLocator.SCROLL_BOTTOM); |
||||
|
||||
//click custom parameters
|
||||
clickElement(WorkflowDefineLocator.CLICK_CUSTOM_PARAMETERS); |
||||
|
||||
//input custom parameters
|
||||
sendInput(WorkflowDefineLocator.INPUT_CUSTOM_PARAMETERS, workflowDefineData.getWorkflowDefineData("customParameter1")); |
||||
|
||||
//input custom parameters value
|
||||
sendInput(WorkflowDefineLocator.INPUT_CUSTOM_PARAMETERS_VALUE, workflowDefineData.getWorkflowDefineData("customParameterValue1")); |
||||
|
||||
//click add custom parameters
|
||||
clickElement(WorkflowDefineLocator.CLICK_ADD_CUSTOM_PARAMETERS); |
||||
|
||||
scrollToElementBottom(WorkflowDefineLocator.SCROLL_BOTTOM); |
||||
|
||||
//input add custom parameters
|
||||
sendInput(WorkflowDefineLocator.INPUT_ADD_CUSTOM_PARAMETERS, workflowDefineData.getWorkflowDefineData("customParameter2")); |
||||
|
||||
//input add custom parameters value
|
||||
sendInput(WorkflowDefineLocator.INPUT_ADD_CUSTOM_PARAMETERS_VALUE, workflowDefineData.getWorkflowDefineData("customParameterValue2")); |
||||
|
||||
//click delete custom parameters
|
||||
clickElement(WorkflowDefineLocator.CLICK_DELETE_CUSTOM_PARAMETERS); |
||||
|
||||
//click submit button
|
||||
clickElement(WorkflowDefineLocator.CLICK_SUBMIT_BUTTON); |
||||
System.out.println("Task node set up successfully"); |
||||
System.out.println("move to Dag Element "); |
||||
moveToDragElement(WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100); |
||||
|
||||
System.out.println("copy task"); |
||||
mouseRightClickElement(WorkflowDefineLocator.MOUSE_RIGHT_CLICK); |
||||
clickButton(WorkflowDefineLocator.COPY_TASK); |
||||
clickButton(WorkflowDefineLocator.CLICK_LINE); |
||||
mouseMovePosition(WorkflowDefineLocator.LINE_SOURCES_TASK,WorkflowDefineLocator.LINE_TARGET_TASK); |
||||
return ifTitleContains(workflowDefineData.getWorkflowDefineData("createWorkflowTitle")); |
||||
} |
||||
|
||||
/** |
||||
* save workflow |
||||
*/ |
||||
public boolean saveWorkflow() throws InterruptedException { |
||||
System.out.println("start to save workflow "); |
||||
|
||||
//click save workflow button
|
||||
clickElement(WorkflowDefineLocator.CLICK_SAVE_WORKFLOW_BUTTON); |
||||
|
||||
//input workflow name
|
||||
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_NAME, workflowDefineData.getWorkflowDefineData("workflowName")); |
||||
|
||||
//input workflow description
|
||||
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_DESCRIPTION, workflowDefineData.getWorkflowDefineData("workflowDescription")); |
||||
|
||||
//select tenant
|
||||
clickElement(WorkflowDefineLocator.CLICK_TENANT); |
||||
clickElement(WorkflowDefineLocator.SELECT_TENANT); |
||||
|
||||
//click workflow timeout alarm
|
||||
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_TIMEOUT_ALARM); |
||||
clearInput(WorkflowDefineLocator.INPUT_WORKFLOW_TIMEOUT); |
||||
|
||||
//input workflow timeout
|
||||
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_TIMEOUT, workflowDefineData.getWorkflowDefineData("workflowTimeout")); |
||||
|
||||
//click workflow global parameters
|
||||
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_GLOBAL_PARAMETERS); |
||||
|
||||
//input workflow global parameters
|
||||
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS, workflowDefineData.getWorkflowDefineData("globalParameter1")); |
||||
|
||||
//input workflow global parameters value
|
||||
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES, workflowDefineData.getWorkflowDefineData("globalParameterValue1")); |
||||
|
||||
//click to add workflow global parameters
|
||||
clickElement(WorkflowDefineLocator.CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS); |
||||
|
||||
//input to add workflow global parameters
|
||||
sendInput(WorkflowDefineLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS, workflowDefineData.getWorkflowDefineData("globalParameter2")); |
||||
|
||||
//input to add workflow global parameters value
|
||||
sendInput(WorkflowDefineLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES, workflowDefineData.getWorkflowDefineData("globalParameterValue2")); |
||||
|
||||
//delete workflow global parameters value
|
||||
clickElement(WorkflowDefineLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS); |
||||
|
||||
//click add button
|
||||
System.out.println("submit workflow"); |
||||
clickButton(WorkflowDefineLocator.CLICK_ADD_BUTTON); |
||||
|
||||
return ifTitleContains(workflowDefineData.getWorkflowDefineData("createWorkflowTitle")); |
||||
} |
||||
|
||||
public boolean onlineWorkflow() throws InterruptedException { |
||||
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
||||
|
||||
// Determine whether the workflow status is offline
|
||||
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE, workflowDefineData.getWorkflowDefineData("offline")); |
||||
|
||||
// click online button
|
||||
System.out.println("Click online workflow button"); |
||||
clickButton(WorkflowDefineLocator.CLICK_ONLINE_WORKFLOW_BUTTON); |
||||
|
||||
return ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE, workflowDefineData.getWorkflowDefineData("online")); |
||||
} |
||||
|
||||
public boolean offlineWorkflow() throws InterruptedException { |
||||
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
||||
|
||||
// Determine whether the workflow status is online
|
||||
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE, workflowDefineData.getWorkflowDefineData("online")); |
||||
|
||||
// click offline button
|
||||
System.out.println("offline workflow"); |
||||
clickButton(WorkflowDefineLocator.CLICK_OFFLINE_WORKFLOW_BUTTON); |
||||
|
||||
return ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE, workflowDefineData.getWorkflowDefineData("offline")); |
||||
} |
||||
|
||||
|
||||
public boolean deleteWorkflow() throws InterruptedException { |
||||
//click delete workflow
|
||||
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE); |
||||
|
||||
// Determine whether the workflow status is offline
|
||||
ifTextExists(WorkflowDefineLocator.WORKFLOW_STATE, workflowDefineData.getWorkflowDefineData("offline")); |
||||
|
||||
clickButton(WorkflowDefineLocator.DELETE_WORKFLOW_BOTTOM); |
||||
|
||||
//click confirm delete project
|
||||
clickButton(WorkflowDefineLocator.CONFIRM_DELETE_WORKFLOW_BOTTOM); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(workflowDefineData.getWorkflowDefineData("workflowDefineTitle")); |
||||
} |
||||
} |
@ -1,84 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.security; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.security.AlertManageData; |
||||
import org.apache.dolphinscheduler.locator.security.AlertManageLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class AlertManagePage extends PageCommon { |
||||
AlertManageData alertManageData = new AlertManageData(); |
||||
|
||||
/** |
||||
* Unique constructor |
||||
* @param driver driver |
||||
*/ |
||||
public AlertManagePage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* create alert |
||||
* |
||||
* @return Whether to enter the specified page after create tenant |
||||
*/ |
||||
public boolean createAlert() throws InterruptedException { |
||||
// click alert manage
|
||||
System.out.println("start click alert manage button"); |
||||
clickElement(AlertManageLocator.CLICK_ALERT_MANAGE); |
||||
|
||||
//determine whether the create alert button exists
|
||||
ifTextExists(AlertManageLocator.CLICK_CREATE_ALERT,alertManageData.getAlertData("createAlert")); |
||||
|
||||
// click create alert button
|
||||
System.out.println("start click create alert button"); |
||||
clickElement(AlertManageLocator.CLICK_CREATE_ALERT); |
||||
// input alert data
|
||||
System.out.println("start input alert "); |
||||
sendInput(AlertManageLocator.INPUT_ALERT_NAME, alertManageData.getAlertData("alertName")); |
||||
|
||||
clickElement(AlertManageLocator.CLICK_ALERT_TYPE); |
||||
|
||||
clickElement(AlertManageLocator.SELECT_ALERT_EMAIL); |
||||
|
||||
sendInput(AlertManageLocator.INPUT_ALERT_DESCRIPTION, alertManageData.getAlertData("description")); |
||||
|
||||
// click button
|
||||
clickButton(AlertManageLocator.SUBMIT_ALERT); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTextExists(AlertManageLocator.ALERT_NAME, alertManageData.getAlertData("alertName")); |
||||
} |
||||
|
||||
public boolean deleteAlert() throws InterruptedException { |
||||
|
||||
// click alert manage
|
||||
clickElement(AlertManageLocator.CLICK_ALERT_MANAGE); |
||||
|
||||
ifTextExists(AlertManageLocator.ALERT_NAME, alertManageData.getAlertData("alertName")); |
||||
|
||||
// click delete alert button
|
||||
clickButton(AlertManageLocator.DELETE_ALERT_BUTTON); |
||||
|
||||
// click confirm delete button
|
||||
clickButton(AlertManageLocator.CONFIRM_DELETE_ALERT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(alertManageData.getAlertData("alertTitle")); |
||||
} |
||||
} |
@ -1,90 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.security; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.security.QueueManageData; |
||||
import org.apache.dolphinscheduler.locator.security.QueueManageLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class QueueManagePage extends PageCommon { |
||||
QueueManageData queueManageData = new QueueManageData(); |
||||
|
||||
/** |
||||
* Unique constructor |
||||
* @param driver driver |
||||
*/ |
||||
public QueueManagePage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* create queue |
||||
* |
||||
* @return Whether to enter the specified page after create queue |
||||
*/ |
||||
public boolean createQueue() throws InterruptedException { |
||||
// click queue manage
|
||||
System.out.println("start click queue manage button"); |
||||
clickElement(QueueManageLocator.CLICK_QUEUE_MANAGE); |
||||
|
||||
//determine whether the create queue button exists
|
||||
ifTextExists(QueueManageLocator.CLICK_CREATE_QUEUE, queueManageData.getQueueData("createQueueButton")); |
||||
|
||||
// click create queue button
|
||||
System.out.println("start click create queue button"); |
||||
clickButton(QueueManageLocator.CLICK_CREATE_QUEUE); |
||||
|
||||
// input queue data
|
||||
System.out.println("start input queue"); |
||||
sendInput(QueueManageLocator.INPUT_QUEUE_NAME, queueManageData.getQueueData("queueName")); |
||||
|
||||
sendInput(QueueManageLocator.INPUT_QUEUE_VALUE, queueManageData.getQueueData("queueValue")); |
||||
|
||||
// click button
|
||||
clickButton(QueueManageLocator.SUBMIT_QUEUE); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTextExists(QueueManageLocator.LIST_QUEUE_NAME, queueManageData.getQueueData("queueName")); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* edit queue |
||||
* |
||||
* @return Whether to enter the specified page after create queue |
||||
*/ |
||||
public boolean editQueue() throws InterruptedException { |
||||
// click queue manage
|
||||
clickElement(QueueManageLocator.CLICK_QUEUE_MANAGE); |
||||
|
||||
ifTextExists(QueueManageLocator.LIST_QUEUE_NAME, queueManageData.getQueueData("queueName")); |
||||
|
||||
// click edit queue button
|
||||
clickButton(QueueManageLocator.CLICK_EDIT_QUEUE); |
||||
|
||||
// input queue data
|
||||
clearSendInput(QueueManageLocator.INPUT_QUEUE_NAME, queueManageData.getQueueData("editQueueName")); |
||||
clearSendInput(QueueManageLocator.INPUT_QUEUE_VALUE, queueManageData.getQueueData("editQueueValue")); |
||||
|
||||
// click button
|
||||
clickButton(QueueManageLocator.SUBMIT_QUEUE); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTextExists(QueueManageLocator.LIST_QUEUE_NAME, queueManageData.getQueueData("editQueueName")); |
||||
} |
||||
} |
@ -1,80 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.security; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.security.TenantManageData; |
||||
import org.apache.dolphinscheduler.locator.security.TenantManageLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class TenantManagePage extends PageCommon { |
||||
TenantManageData tenantManageData = new TenantManageData(); |
||||
|
||||
/** |
||||
* Unique constructor |
||||
* @param driver driver |
||||
*/ |
||||
public TenantManagePage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* jump security page |
||||
* |
||||
* @return Whether to enter the specified page after create tenant |
||||
*/ |
||||
public boolean jumpSecurity() throws InterruptedException { |
||||
clickTopElement(TenantManageLocator.SECURITY_CENTER); |
||||
return ifTitleContains(tenantManageData.getTenantData("tenantTitle")); |
||||
} |
||||
|
||||
/** |
||||
* createTenant |
||||
* |
||||
* @return Whether to enter the specified page after create tenant |
||||
*/ |
||||
public boolean createTenant() throws InterruptedException { |
||||
clickButton(TenantManageLocator.TENANT_MANAGE); |
||||
|
||||
//create tenant
|
||||
clickButton(TenantManageLocator.CREATE_TENANT_BUTTON); |
||||
|
||||
// tenant data
|
||||
sendInput(TenantManageLocator.TENANT_INPUT_CODE, tenantManageData.getTenantData("tenantCode")); |
||||
sendInput(TenantManageLocator.QUEUE, tenantManageData.getTenantData("queue")); |
||||
sendInput(TenantManageLocator.DESCRIPTION, tenantManageData.getTenantData("description")); |
||||
|
||||
// click button
|
||||
clickButton(TenantManageLocator.SUBMIT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTextExists(TenantManageLocator.TENANT_CODE_FIRST, tenantManageData.getTenantData("tenantCode")); |
||||
} |
||||
|
||||
public boolean deleteTenant() throws InterruptedException { |
||||
clickElement(TenantManageLocator.TENANT_MANAGE); |
||||
|
||||
// click delete button
|
||||
clickButton(TenantManageLocator.DELETE_TENANT_BUTTON); |
||||
|
||||
//click confirm delete button
|
||||
clickButton(TenantManageLocator.CONFIRM_DELETE_TENANT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(tenantManageData.getTenantData("tenantTitle")); |
||||
} |
||||
} |
@ -1,99 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.security; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.security.TokenManageData; |
||||
import org.apache.dolphinscheduler.locator.security.TokenManageLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class TokenManagePage extends PageCommon { |
||||
TokenManageData tokenManageData = new TokenManageData(); |
||||
|
||||
public TokenManagePage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* create token |
||||
* |
||||
* @return Whether to enter the specified page after create tenant |
||||
*/ |
||||
public boolean createToken() throws InterruptedException { |
||||
//create token
|
||||
clickElement(TokenManageLocator.CLICK_TOKEN_MANAGE); |
||||
|
||||
//determine whether the create token button exists
|
||||
ifTextExists(TokenManageLocator.CLICK_CREATE_TOKEN, tokenManageData.getTokenData("createTokenText")); |
||||
|
||||
// click create token button
|
||||
clickButton(TokenManageLocator.CLICK_CREATE_TOKEN); |
||||
|
||||
ifTextExists(TokenManageLocator.CREATE_TOKEN_POPUP,tokenManageData.getTokenData("createTokenText")); |
||||
|
||||
clickButton(TokenManageLocator.SELECT_USER); |
||||
|
||||
clickButton(TokenManageLocator.CLICK_GENERATE_TOKEN_BUTTON); |
||||
Thread.sleep(2000); |
||||
|
||||
// click button
|
||||
clickButton(TokenManageLocator.CLICK_SUBMIT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(tokenManageData.getTokenData("tokenTitle")); |
||||
} |
||||
|
||||
/** |
||||
* edit token |
||||
* |
||||
* @return Whether to enter the specified page after edit tenant |
||||
*/ |
||||
public boolean editToken() throws InterruptedException { |
||||
// edit token
|
||||
ifTextExists(TokenManageLocator.TOKEN, "1"); |
||||
|
||||
// determine the existence of the editing token
|
||||
locateElement(TokenManageLocator.EDIT_TOKEN_BUTTON); |
||||
|
||||
// click edit token button
|
||||
clickButton(TokenManageLocator.EDIT_TOKEN_BUTTON); |
||||
|
||||
clickButton(TokenManageLocator.SELECT_USER); |
||||
|
||||
clickButton(TokenManageLocator.CLICK_GENERATE_TOKEN_BUTTON); |
||||
Thread.sleep(2000); |
||||
|
||||
// click button
|
||||
clickButton(TokenManageLocator.CLICK_SUBMIT_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(tokenManageData.getTokenData("tokenTitle")); |
||||
} |
||||
|
||||
|
||||
//delete token
|
||||
public boolean deleteToken() throws InterruptedException { |
||||
// click token manage
|
||||
clickElement(TokenManageLocator.CLICK_TOKEN_MANAGE); |
||||
|
||||
clickButton(TokenManageLocator.CLICK_DELETE_BUTTON); |
||||
clickButton(TokenManageLocator.CLICK_CONFIRM_DELETE_BUTTON); |
||||
|
||||
return ifTitleContains(tokenManageData.getTokenData("tokenTitle")); |
||||
} |
||||
|
||||
} |
@ -1,150 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.page.security; |
||||
|
||||
import org.apache.dolphinscheduler.common.PageCommon; |
||||
import org.apache.dolphinscheduler.data.security.UserManageData; |
||||
import org.apache.dolphinscheduler.locator.security.UserManageLocator; |
||||
import org.openqa.selenium.WebDriver; |
||||
|
||||
public class UserManagePage extends PageCommon { |
||||
UserManageData userManageData = new UserManageData(); |
||||
|
||||
public UserManagePage(WebDriver driver) { |
||||
super(driver); |
||||
} |
||||
|
||||
/** |
||||
* create user |
||||
* |
||||
* @return Whether to enter the specified page after create tenant |
||||
*/ |
||||
public boolean createUser() throws InterruptedException { |
||||
// click user manage
|
||||
clickElement(UserManageLocator.CLICK_USER_MANAGE); |
||||
//determine whether the create user button exists
|
||||
ifTextExists(UserManageLocator.CLICK_CREATE_USER_BUTTON, userManageData.getUserData("createUserButton")); |
||||
|
||||
// click create user button
|
||||
clickButton(UserManageLocator.CLICK_CREATE_USER_BUTTON); |
||||
|
||||
// input user data
|
||||
sendInput(UserManageLocator.INPUT_USERNAME, userManageData.getUserData("userName")); |
||||
sendInput(UserManageLocator.INPUT_PASSWORD, userManageData.getUserData("password")); |
||||
clickButton(UserManageLocator.CLICK_TENANT); |
||||
clickButton(UserManageLocator.SELECT_TENANT); |
||||
clickButton(UserManageLocator.CLICK_QUEUE); |
||||
clickButton(UserManageLocator.SELECT_QUEUE); |
||||
sendInput(UserManageLocator.INPUT_EMAIL, userManageData.getUserData("email")); |
||||
sendInput(UserManageLocator.INPUT_PHONE, userManageData.getUserData("phone")); |
||||
clickElement(UserManageLocator.SELECT_STOP_STATE); |
||||
clickElement(UserManageLocator.SELECT_ENABLE_STATE); |
||||
|
||||
// click button
|
||||
clickButton(UserManageLocator.SUBMIT); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTextExists(UserManageLocator.USERNAME, userManageData.getUserData("userName")); |
||||
} |
||||
|
||||
/** |
||||
* edit general user |
||||
*/ |
||||
public boolean editGeneralUser() throws InterruptedException { |
||||
//edit general user
|
||||
// click user manage
|
||||
System.out.println("start edit general user"); |
||||
clickElement(UserManageLocator.CLICK_USER_MANAGE); |
||||
|
||||
//determine whether the general user exists
|
||||
ifTextExists(UserManageLocator.USERNAME, userManageData.getUserData("userName")); |
||||
|
||||
// click edit user button
|
||||
clickButton(UserManageLocator.EDIT_GENERAL_USER_BUTTON ); |
||||
|
||||
// input user data
|
||||
clearSendInput(UserManageLocator.INPUT_USERNAME, userManageData.getUserData("editUserName")); |
||||
clearSendInput(UserManageLocator.INPUT_PASSWORD, userManageData.getUserData("editPassword")); |
||||
|
||||
clickButton(UserManageLocator.CLICK_TENANT); |
||||
clickButton(UserManageLocator.SELECT_TENANT); |
||||
|
||||
clickButton(UserManageLocator.CLICK_QUEUE); |
||||
clickButton(UserManageLocator.SELECT_QUEUE); |
||||
|
||||
clearSendInput(UserManageLocator.INPUT_EMAIL, userManageData.getUserData("editEmail")); |
||||
clearSendInput(UserManageLocator.INPUT_PHONE, userManageData.getUserData("editPhone")); |
||||
|
||||
clickElement(UserManageLocator.SELECT_STOP_STATE); |
||||
clickElement(UserManageLocator.SELECT_ENABLE_STATE); |
||||
|
||||
// click button
|
||||
clickButton(UserManageLocator.SUBMIT); |
||||
System.out.println("end edit general user"); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(userManageData.getUserData("userTitle")); |
||||
} |
||||
|
||||
/** |
||||
* edit admin user |
||||
*/ |
||||
public boolean editAdminUser() throws InterruptedException { |
||||
//edit admin user
|
||||
// click user manage
|
||||
System.out.println("start edit admin user"); |
||||
clickElement(UserManageLocator.CLICK_USER_MANAGE); |
||||
|
||||
//determine whether the general user edit success
|
||||
ifTextExists(UserManageLocator.USER_NAME,userManageData.getUserData("editUserName")); |
||||
|
||||
// click edit user button
|
||||
clickButton(UserManageLocator.EDIT_ADMIN_USER_BUTTON ); |
||||
|
||||
// select tenant
|
||||
clickButton(UserManageLocator.CLICK_TENANT); |
||||
|
||||
clickButton(UserManageLocator.SELECT_TENANT); |
||||
|
||||
// click button
|
||||
clickButton(UserManageLocator.SUBMIT); |
||||
System.out.println("end edit admin user"); |
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(userManageData.getUserData("userTitle")); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* delete user |
||||
*/ |
||||
public boolean deleteUser() throws InterruptedException { |
||||
System.out.println("jump to user manage"); |
||||
// click user manage
|
||||
clickElement(UserManageLocator.CLICK_USER_MANAGE); |
||||
|
||||
// click delete user button
|
||||
System.out.println("click delete user"); |
||||
clickButton(UserManageLocator.DELETE_USER_BUTTON ); |
||||
|
||||
// click confirm delete button
|
||||
System.out.println("click confirm delete user"); |
||||
clickButton(UserManageLocator.CONFIRM_DELETE_USER_BUTTON); |
||||
|
||||
// Whether to enter the specified page after submit
|
||||
return ifTitleContains(userManageData.getUserData("userTitle")); |
||||
} |
||||
} |
@ -1,41 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase; |
||||
|
||||
import org.apache.dolphinscheduler.page.LoginPage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
import static org.apache.dolphinscheduler.base.BaseTest.driver; |
||||
|
||||
@Test(groups={"functionTests","login"}) |
||||
public class TestLogin { |
||||
private LoginPage loginPage; |
||||
|
||||
@Test(description = "TestLogin") |
||||
public void testLogin() throws InterruptedException { |
||||
loginPage = new LoginPage(driver); |
||||
System.out.println("==================================="); |
||||
System.out.println("jump to Chinese login page"); |
||||
loginPage.jumpPageChinese(); |
||||
|
||||
System.out.println("start login"); |
||||
assert loginPage.login(); |
||||
System.out.println("end login"); |
||||
System.out.println("==================================="); |
||||
|
||||
} |
||||
} |
@ -1,39 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.deleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.CreateProjectPage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class DeleteProjectTest extends BaseTest { |
||||
private CreateProjectPage createProjectPage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","project"},description = "DeleteProjectTest",priority=7) |
||||
public void testDeleteProject() throws InterruptedException { |
||||
createProjectPage = new CreateProjectPage(driver); |
||||
//jump to project manage page
|
||||
System.out.println("jump to the project manage page to delete project"); |
||||
createProjectPage.jumpProjectManagePage(); |
||||
|
||||
//assert tenant manage page
|
||||
System.out.println("start delete project"); |
||||
assert createProjectPage.deleteProject(); |
||||
System.out.println("end delete project"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,38 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.deleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.TenantManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class DeleteTenantTest extends BaseTest { |
||||
private TenantManagePage tenantManagePage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","createTenant"},description = "DeleteTenantTest",priority=9) |
||||
public void testDeleteTenant() throws InterruptedException { |
||||
tenantManagePage = new TenantManagePage(driver); |
||||
//assert tenant manage page
|
||||
System.out.println("jump to security to delete tenant"); |
||||
tenantManagePage.jumpSecurity(); |
||||
|
||||
System.out.println("start delete tenant"); |
||||
assert tenantManagePage.deleteTenant(); |
||||
System.out.println("end delete tenant"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,42 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.deleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.TenantManagePage; |
||||
import org.apache.dolphinscheduler.page.security.UserManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class DeleteUserTest extends BaseTest { |
||||
private UserManagePage userManagePage; |
||||
private TenantManagePage tenantManagePage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","user" },description = "DeleteUserTest",priority=8) |
||||
public void testDeleteUser() throws InterruptedException { |
||||
tenantManagePage = new TenantManagePage(driver); |
||||
System.out.println("jump to security to delete user"); |
||||
tenantManagePage.jumpSecurity(); |
||||
|
||||
userManagePage = new UserManagePage(driver); |
||||
//assert user manage page
|
||||
System.out.println("start delete user"); |
||||
assert userManagePage.deleteUser(); |
||||
System.out.println("end delete user"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
||||
|
@ -1,43 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.deleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.CreateProjectPage; |
||||
import org.apache.dolphinscheduler.page.project.CreateWorkflowPage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class DeleteWorkflowTest extends BaseTest { |
||||
private CreateWorkflowPage createWorkflowPage; |
||||
private CreateProjectPage createProjectPage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "DeleteWorkflowTest",priority=6) |
||||
public void testDeleteWorkflow() throws InterruptedException { |
||||
createProjectPage = new CreateProjectPage(driver); |
||||
//jump to project manage page
|
||||
System.out.println("jump to the project manage page to delete workflow"); |
||||
createProjectPage.jumpProjectManagePage(); |
||||
|
||||
createWorkflowPage = new CreateWorkflowPage(driver); |
||||
createWorkflowPage.jumpWorkflowPage(); |
||||
//assert tenant manage page
|
||||
System.out.println("start delete workflow"); |
||||
assert createWorkflowPage.deleteWorkflow(); |
||||
System.out.println("end delete workflow"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,42 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testDeleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.AlertManagePage; |
||||
import org.apache.dolphinscheduler.page.security.TenantManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestDeleteAlert extends BaseTest { |
||||
private AlertManagePage alertManagePage; |
||||
private TenantManagePage tenantManagePage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","alert" },description = "TestDeleteAlert",priority=8) |
||||
public void testDeleteAlert() throws InterruptedException { |
||||
tenantManagePage = new TenantManagePage(driver); |
||||
System.out.println("jump to testSecurity to delete alert"); |
||||
tenantManagePage.jumpSecurity(); |
||||
|
||||
alertManagePage = new AlertManagePage(driver); |
||||
|
||||
//assert alert manage page
|
||||
System.out.println("start delete alert"); |
||||
assert alertManagePage.deleteAlert(); |
||||
System.out.println("end delete alert"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,39 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testDeleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.ProjectPage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestDeleteProject extends BaseTest { |
||||
private ProjectPage createProjectPage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","project"},description = "TestDeleteProject") |
||||
public void testDeleteProject() throws InterruptedException { |
||||
createProjectPage = new ProjectPage(driver); |
||||
//jump to project manage page
|
||||
System.out.println("jump to the project manage page to delete project"); |
||||
createProjectPage.jumpProjectManagePage(); |
||||
|
||||
//assert tenant manage page
|
||||
System.out.println("start delete project"); |
||||
assert createProjectPage.deleteProject(); |
||||
System.out.println("end delete project"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,38 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testDeleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.TenantManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestDeleteTenant extends BaseTest { |
||||
private TenantManagePage tenantManagePage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","createTenant"},description = "TestDeleteTenant") |
||||
public void testDeleteTenant() throws InterruptedException { |
||||
tenantManagePage = new TenantManagePage(driver); |
||||
//assert tenant manage page
|
||||
System.out.println("jump to security to delete tenant"); |
||||
tenantManagePage.jumpSecurity(); |
||||
|
||||
System.out.println("start delete tenant"); |
||||
assert tenantManagePage.deleteTenant(); |
||||
System.out.println("end delete tenant"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,42 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testDeleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.TenantManagePage; |
||||
import org.apache.dolphinscheduler.page.security.TokenManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestDeleteToken extends BaseTest { |
||||
private TokenManagePage tokenManagePage; |
||||
private TenantManagePage tenantManagePage; |
||||
|
||||
|
||||
@Test(groups = {"functionTests"}, dependsOnGroups = {"login", "token"}, description = "TestDeleteToken") |
||||
public void testUserManage() throws InterruptedException { |
||||
tenantManagePage = new TenantManagePage(driver); |
||||
System.out.println("jump to security to delete token"); |
||||
tenantManagePage.jumpSecurity(); |
||||
|
||||
tokenManagePage = new TokenManagePage(driver); |
||||
//delete token
|
||||
System.out.println("start delete token"); |
||||
assert tokenManagePage.deleteToken(); |
||||
System.out.println("end delete token"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,42 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testDeleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.TenantManagePage; |
||||
import org.apache.dolphinscheduler.page.security.UserManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestDeleteUser extends BaseTest { |
||||
private UserManagePage userManagePage; |
||||
private TenantManagePage tenantManagePage; |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","user" },description = "TestDeleteUser") |
||||
public void testDeleteUser() throws InterruptedException { |
||||
tenantManagePage = new TenantManagePage(driver); |
||||
System.out.println("jump to security to delete user"); |
||||
tenantManagePage.jumpSecurity(); |
||||
|
||||
userManagePage = new UserManagePage(driver); |
||||
//assert user manage page
|
||||
System.out.println("start delete user"); |
||||
assert userManagePage.deleteUser(); |
||||
System.out.println("end delete user"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
||||
|
@ -1,48 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testDeleteData; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.ProjectPage; |
||||
import org.apache.dolphinscheduler.page.project.WorkflowDefinePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestDeleteWorkflow extends BaseTest { |
||||
private WorkflowDefinePage createWorkflowPage; |
||||
private ProjectPage createProjectPage; |
||||
|
||||
/** |
||||
* offline workflow |
||||
* @throws InterruptedException |
||||
*/ |
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "TestDeleteWorkflow") |
||||
public void testOfflineWorkflow() throws InterruptedException { |
||||
createWorkflowPage = new WorkflowDefinePage(driver); |
||||
System.out.println("start offline workflow"); |
||||
assert createWorkflowPage.offlineWorkflow(); |
||||
System.out.println("end offline workflow"); |
||||
System.out.println("==================================="); |
||||
} |
||||
|
||||
@Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "TestDeleteWorkflow") |
||||
public void testDeleteWorkflow() throws InterruptedException { |
||||
System.out.println("start delete workflow"); |
||||
assert createWorkflowPage.deleteWorkflow(); |
||||
System.out.println("end delete workflow"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,35 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testProject; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.ProcessInstancePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestProcessInstance extends BaseTest { |
||||
private ProcessInstancePage processInstancePage; |
||||
|
||||
@Test(groups={"functionTests","processInstance"},dependsOnGroups = { "login","workflow" },description = "testRerun") |
||||
public void testRerun() throws InterruptedException { |
||||
processInstancePage = new ProcessInstancePage(driver); |
||||
//rerun workflow
|
||||
System.out.println("start rerun workflow"); |
||||
processInstancePage.rerunWorkflowPage(); |
||||
System.out.println("end rerun workflow"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,40 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testProject; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.ProjectPage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestProject extends BaseTest { |
||||
private ProjectPage projectPage; |
||||
|
||||
@Test(groups={"functionTests","project"},dependsOnGroups = { "login" },description = "CreateProjectTest") |
||||
public void testCreateProject() throws InterruptedException { |
||||
projectPage = new ProjectPage(driver); |
||||
// enter user manage page
|
||||
System.out.println("jump to the projectManage page to create project "); |
||||
projectPage.jumpProjectManagePage(); |
||||
//assert user manage page
|
||||
System.out.println("start create project"); |
||||
assert projectPage.createProject(); |
||||
System.out.println("end create project"); |
||||
System.out.println("==================================="); |
||||
} |
||||
|
||||
} |
||||
|
@ -1,41 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testProject; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.ProjectPage; |
||||
import org.apache.dolphinscheduler.page.project.WorkflowDefinePage; |
||||
import org.apache.dolphinscheduler.page.project.RunWorkflowPage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestRunWorkflow extends BaseTest { |
||||
private WorkflowDefinePage createWorkflowPage; |
||||
private ProjectPage projectPage; |
||||
private RunWorkflowPage runWorkflowPage; |
||||
|
||||
|
||||
@Test(groups={"functionTests","runWorkflow"},dependsOnGroups = { "login","workflow" },description = "TestRunWorkflow") |
||||
public void testRunWorkflow() throws InterruptedException { |
||||
runWorkflowPage = new RunWorkflowPage(driver); |
||||
|
||||
projectPage = new ProjectPage(driver); |
||||
System.out.println("start run workflow"); |
||||
assert runWorkflowPage.runWorkflow(); |
||||
System.out.println("end run workflow"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,75 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testProject; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.TimingPage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestTiming extends BaseTest { |
||||
private TimingPage timingPage; |
||||
|
||||
@Test(groups={"functionTests","createTiming"},dependsOnGroups = { "login","workflow"},description = "TestCreateTiming") |
||||
public void testCreateTiming() throws InterruptedException { |
||||
timingPage = new TimingPage(driver); |
||||
|
||||
System.out.println("start create timing"); |
||||
assert timingPage.createTiming(); |
||||
System.out.println("end create timing"); |
||||
System.out.println("==================================="); |
||||
|
||||
} |
||||
@Test(groups={"functionTests","timing"},dependsOnGroups = { "login","workflow"},description = "TestEditTiming") |
||||
public void testEditTiming() throws InterruptedException { |
||||
timingPage = new TimingPage(driver); |
||||
|
||||
System.out.println("start edit timing"); |
||||
assert timingPage.editTiming(); |
||||
System.out.println("end edit timing"); |
||||
System.out.println("==================================="); |
||||
} |
||||
|
||||
@Test(groups={"functionTests","timing"},dependsOnGroups = { "login","workflow" },description = "TestOnlineTiming") |
||||
public void testOnlineTiming() throws InterruptedException { |
||||
timingPage = new TimingPage(driver); |
||||
|
||||
System.out.println("start online timing"); |
||||
assert timingPage.onlineTiming(); |
||||
System.out.println("end online timing"); |
||||
System.out.println("==================================="); |
||||
} |
||||
|
||||
@Test(groups={"functionTests","timing"},dependsOnGroups = { "login","workflow"},description = "TestOfflineTiming") |
||||
public void testOfflineTiming() throws InterruptedException { |
||||
timingPage = new TimingPage(driver); |
||||
|
||||
System.out.println("start offline timing"); |
||||
assert timingPage.offlineTiming(); |
||||
System.out.println("end offline timing"); |
||||
System.out.println("==================================="); |
||||
} |
||||
|
||||
@Test(groups={"functionTests","timing"},dependsOnGroups = { "login","workflow"},description = "TestDeleteTiming") |
||||
public void testDeleteTiming() throws InterruptedException { |
||||
timingPage = new TimingPage(driver); |
||||
|
||||
System.out.println("start delete timing"); |
||||
assert timingPage.deleteTiming(); |
||||
System.out.println("end delete timing"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,57 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testProject; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.project.ProjectPage; |
||||
import org.apache.dolphinscheduler.page.project.WorkflowDefinePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestWorkflowDefine extends BaseTest { |
||||
private WorkflowDefinePage workflowDefinePage; |
||||
private ProjectPage projectPage; |
||||
|
||||
/** |
||||
* test Create WorkflowDefine |
||||
* @throws InterruptedException |
||||
*/ |
||||
@Test(groups={"functionTests","workflow"},dependsOnGroups = { "login" },description = "TestWorkflowDefine") |
||||
public void testCreateWorkflow() throws InterruptedException { |
||||
projectPage = new ProjectPage(driver); |
||||
System.out.println("jump to the projectManage page to create workflow"); |
||||
projectPage.jumpProjectManagePage(); |
||||
|
||||
workflowDefinePage = new WorkflowDefinePage(driver); |
||||
System.out.println("Click on the project name to jump to the project homepage"); |
||||
workflowDefinePage.jumpWorkflowPage(); |
||||
|
||||
System.out.println("start create workflow"); |
||||
assert workflowDefinePage.createWorkflow(); |
||||
assert workflowDefinePage.saveWorkflow(); |
||||
System.out.println("end create workflow"); |
||||
System.out.println("==================================="); |
||||
} |
||||
|
||||
@Test(groups={"functionTests","workflow"},dependsOnGroups = { "login" },description = "TestOnlineWorkflow") |
||||
public void testOnlineWorkflow() throws InterruptedException { |
||||
workflowDefinePage = new WorkflowDefinePage(driver); |
||||
System.out.println("start online workflow"); |
||||
assert workflowDefinePage.onlineWorkflow(); |
||||
System.out.println("end online workflow"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,36 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testSecurity; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.AlertManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestAlertManage extends BaseTest { |
||||
private AlertManagePage alertManagePage; |
||||
|
||||
@Test(groups={"functionTests","alert"},dependsOnGroups = { "login" },description = "AlertManagePage") |
||||
public void testAlertManage() throws InterruptedException { |
||||
alertManagePage = new AlertManagePage(driver); |
||||
//assert alert manage page
|
||||
System.out.println("start create alert"); |
||||
assert alertManagePage.createAlert(); |
||||
System.out.println("end create alert"); |
||||
System.out.println("==================================="); |
||||
|
||||
} |
||||
} |
@ -1,42 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testSecurity; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.QueueManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
|
||||
public class TestQueueManage extends BaseTest { |
||||
private QueueManagePage queueManagePage; |
||||
|
||||
@Test(groups={"functionTests","queue"},dependsOnGroups = { "login" },description = "TestQueueManage") |
||||
public void testTenantManage() throws InterruptedException { |
||||
queueManagePage = new QueueManagePage(driver); |
||||
//create queue
|
||||
System.out.println("start create queue"); |
||||
assert queueManagePage.createQueue(); |
||||
System.out.println("end create queue"); |
||||
System.out.println("==================================="); |
||||
|
||||
//edit queue
|
||||
System.out.println("start edit queue"); |
||||
assert queueManagePage.editQueue(); |
||||
System.out.println("end edit queue"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,36 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testSecurity; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.TenantManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
|
||||
public class TestTenantManage extends BaseTest { |
||||
private TenantManagePage tenantManagePage; |
||||
|
||||
@Test(groups={"functionTests","createTenant"},dependsOnGroups = { "login" },description = "TestTenantManage") |
||||
public void testTenantManage() throws InterruptedException { |
||||
tenantManagePage = new TenantManagePage(driver); |
||||
//assert tenant manage page
|
||||
System.out.println("start create tenant"); |
||||
assert tenantManagePage.createTenant(); |
||||
System.out.println("end create tenant"); |
||||
System.out.println("==================================="); |
||||
} |
||||
} |
@ -1,43 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testSecurity; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.TokenManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestTokenManage extends BaseTest { |
||||
private TokenManagePage tokenManagePage; |
||||
|
||||
@Test(groups={"functionTests","token"},dependsOnGroups = { "login" },description = "TestTokenManage") |
||||
public void testTokenManage() throws InterruptedException { |
||||
tokenManagePage = new TokenManagePage(driver); |
||||
//generate token
|
||||
System.out.println("start create token"); |
||||
assert tokenManagePage.createToken(); |
||||
System.out.println("end create token"); |
||||
System.out.println("==================================="); |
||||
|
||||
|
||||
//edit token
|
||||
System.out.println("start edit token"); |
||||
assert tokenManagePage.editToken(); |
||||
System.out.println("end edit token"); |
||||
System.out.println("==================================="); |
||||
|
||||
} |
||||
} |
@ -1,48 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package org.apache.dolphinscheduler.testcase.testSecurity; |
||||
|
||||
import org.apache.dolphinscheduler.base.BaseTest; |
||||
import org.apache.dolphinscheduler.page.security.UserManagePage; |
||||
import org.testng.annotations.Test; |
||||
|
||||
public class TestUserManage extends BaseTest { |
||||
private UserManagePage userManagePage; |
||||
|
||||
@Test(groups={"functionTests","user"},dependsOnGroups = { "login" },description = "TestCreateUser") |
||||
public void testCreateUser() throws InterruptedException { |
||||
userManagePage = new UserManagePage(driver); |
||||
//create user
|
||||
System.out.println("start create user"); |
||||
assert userManagePage.createUser(); |
||||
System.out.println("end create user"); |
||||
System.out.println("==================================="); |
||||
} |
||||
|
||||
@Test(groups={"functionTests","user"},dependsOnGroups = { "login" },description = "TestEditUser") |
||||
public void testEditUser() throws InterruptedException { |
||||
userManagePage = new UserManagePage(driver); |
||||
//edit user
|
||||
System.out.println("start edit user"); |
||||
assert userManagePage.editGeneralUser(); |
||||
assert userManagePage.editAdminUser(); |
||||
|
||||
System.out.println("end edit user"); |
||||
System.out.println("==================================="); |
||||
|
||||
} |
||||
} |
@ -1,58 +0,0 @@
|
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
|
||||
############### project ############## |
||||
# login url |
||||
LOGIN_URL=http://127.0.0.1:12345/dolphinscheduler/ |
||||
#login username |
||||
USER_NAME=admin |
||||
#login password |
||||
PASSWORD=dolphinscheduler123 |
||||
|
||||
############### web driver ############## |
||||
# driver path |
||||
driver.chromeDriver=/usr/local/bin/chromedriver |
||||
# implicitly wait(s) |
||||
driver.timeouts.implicitlyWait=30 |
||||
# show wait(s) |
||||
driver.timeouts.webDriverWait=30 |
||||
# page load timeout(s) |
||||
driver.timeouts.pageLoadTimeout=30 |
||||
# JS wait timeouts(s) |
||||
driver.timeouts.setScriptTimeout=30 |
||||
|
||||
|
||||
############### redis ############## |
||||
# redis ip |
||||
redis.ip=127.0.0.1 |
||||
# redis port |
||||
redis.port=6379 |
||||
# redis password |
||||
redis.pwd= |
||||
############### redis pool ############## |
||||
# jedis expireTime(s) |
||||
jedis.expireTime=3600 |
||||
# jedis maxTotal |
||||
jedis.pool.maxTotal=3000 |
||||
# jedis maxIdle |
||||
jedis.pool.maxIdle=1000 |
||||
# jedis maxWaitMillis |
||||
jedis.pool.maxWaitMillis=10000 |
||||
# jedis Whether to perform a valid check when calling the borrowObject method |
||||
jedis.pool.testOnBorrow=true |
||||
# jedis Whether to perform a valid check when calling the returnObject method |
||||
jedis.pool.testOnReturn=true |
@ -1,54 +0,0 @@
|
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
|
||||
userManage: |
||||
userName: selenium_user_11111 |
||||
password: 123456qwe |
||||
email: 123456789@qq.com |
||||
phone: '15811112222' |
||||
createUserButton: 创建用户 |
||||
editUserName: selenium_user_edit |
||||
editPassword: 123456qwe@asd |
||||
editEmail: 123456_edit@qq.com |
||||
editPhone: '15800001111' |
||||
userTitle: 用户管理 - DolphinScheduler |
||||
|
||||
tenantManage: |
||||
tenantCode: selenium_tenant_code_1 |
||||
queue: default |
||||
description: create tenant test |
||||
tenantTitle: 租户管理 - DolphinScheduler |
||||
|
||||
alertManage: |
||||
alertName: selenium_alert_Name |
||||
createAlert: 创建告警组 |
||||
alertType: 邮件 |
||||
description: create alert test |
||||
alertTitle: 告警组管理 - DolphinScheduler |
||||
|
||||
queueManage: |
||||
queueName: selenium_queue_name |
||||
queueValue: selenium_queue_value |
||||
createQueueButton: 创建队列 |
||||
editQueueName: selenium_queue_value_edit |
||||
editQueueValue: selenium_queue_value_edit |
||||
queueTitle: 队列管理 - DolphinScheduler |
||||
|
||||
tokenManage: |
||||
tokenTitle: 令牌管理 - DolphinScheduler |
||||
createTokenText: 创建令牌 |
||||
userName: admin |
@ -1,63 +0,0 @@
|
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
|
||||
projectManage: |
||||
createProjectButton: 创建项目 |
||||
projectName: selenium_project_1 |
||||
description: test create project description |
||||
projectTitle: 项目 - DolphinScheduler |
||||
|
||||
workflowDefine: |
||||
workflowDefine: 工作流定义 |
||||
shellTaskName: shell_task_selenium_1 |
||||
shellTaskDescription: shell task description test |
||||
taskTimeout: '60' |
||||
shellScript: echo "shell task test" |
||||
customParameter1: selenium_parameter |
||||
customParameterValue1: selenium_parameter_123 |
||||
customParameter2: selenium_parameter_delete |
||||
customParameterValue2: selenium_parameter_delete_456 |
||||
workflowDefineTitle: 工作流定义 - DolphinScheduler |
||||
createWorkflowTitle: 创建流程定义 - DolphinScheduler |
||||
workflowName: selenium_shell_1 |
||||
workflowDescription: test selenium_shell_1 description |
||||
workflowTimeout: '30' |
||||
globalParameter1: selenium_global_parameters_1 |
||||
globalParameterValue1: selenium_global_parameters_value_1 |
||||
globalParameter2: selenium_global_parameters_2 |
||||
globalParameterValue2: selenium_global_parameters_value_2 |
||||
online: 上线 |
||||
offline: 下线 |
||||
|
||||
runWorkflow: |
||||
recipient: 123456789@qq.com |
||||
Cc: qwe12312sds@qq.com |
||||
online: 上线 |
||||
offline: 下线 |
||||
|
||||
timing: |
||||
recipient: test123456@qq.com |
||||
Cc: test.123qwe@qq.com |
||||
editRecipient: test.edit123456@qq.com |
||||
editCc: test.edit123qwe@qq.com |
||||
timingTitle: 定时任务列表 - DolphinScheduler |
||||
online: 上线 |
||||
offline: 下线 |
||||
|
||||
processInstance: |
||||
processInstanceTitle: 工作流实例 - DolphinScheduler |
||||
rerun: 重跑 |
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<!-- |
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more |
||||
~ contributor license agreements. See the NOTICE file distributed with |
||||
~ this work for additional information regarding copyright ownership. |
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
~ (the "License"); you may not use this file except in compliance with |
||||
~ the License. You may obtain a copy of the License at |
||||
~ |
||||
~ http://www.apache.org/licenses/LICENSE-2.0 |
||||
~ |
||||
~ Unless required by applicable law or agreed to in writing, software |
||||
~ distributed under the License is distributed on an "AS IS" BASIS, |
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
~ See the License for the specific language governing permissions and |
||||
~ limitations under the License. |
||||
--> |
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > |
||||
<suite name="dolphinscheduler_e2e" verbose="1"> |
||||
<test name="dolphinscheduler_test" preserve-order="true"> |
||||
<!-- <groups> |
||||
<run> |
||||
<include name="functionTests"/> |
||||
</run> |
||||
</groups> |
||||
<classes> |
||||
<class name="org.apache.dolphinscheduler.testcase.TestLogin"></class> |
||||
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestTenantManage"></class> |
||||
|
||||
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestAlertManage"></class> |
||||
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestQueueManage"></class> |
||||
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestTokenManage"></class> |
||||
|
||||
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestUserManage"> |
||||
<methods> |
||||
<include name="testCreateUser" /> |
||||
<include name="testEditUser" /> |
||||
</methods> |
||||
</class> |
||||
|
||||
<class name="org.apache.dolphinscheduler.testcase.testProject.TestProject"> |
||||
<methods> |
||||
<include name="createProject" /> |
||||
</methods> |
||||
</class> |
||||
|
||||
<class name="org.apache.dolphinscheduler.testcase.testProject.TestWorkflowDefine"> |
||||
<methods> |
||||
<include name="testCreateWorkflow" /> |
||||
<include name="testOnlineWorkflow" /> |
||||
</methods> |
||||
</class> |
||||
|
||||
<class name="org.apache.dolphinscheduler.testcase.testProject.TestRunWorkflow"></class> --> |
||||
|
||||
<!--<class name="org.apache.dolphinscheduler.testcase.testProject.TestTiming">--> |
||||
<!--<methods>--> |
||||
<!--<include name="testCreateTiming" />--> |
||||
<!--<include name="testEditTiming" />--> |
||||
<!--<include name="testOnlineTiming" />--> |
||||
<!--<include name="testOfflineTiming" />--> |
||||
<!--<include name="testDeleteTiming" />--> |
||||
<!--</methods>--> |
||||
<!--</class>--> |
||||
<!--<class name="org.apache.dolphinscheduler.testcase.testProject.TestProcessInstance">--> |
||||
<!--<methods>--> |
||||
<!--<include name="testRerun" />--> |
||||
<!--</methods>--> |
||||
<!--</class>--> |
||||
|
||||
<!-- <class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteWorkflow"> |
||||
<methods> |
||||
<include name="testOfflineWorkflow" /> |
||||
<include name="testDeleteWorkflow" /> |
||||
</methods> |
||||
</class> |
||||
|
||||
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteProject"></class> |
||||
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteAlert"></class> |
||||
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteToken"></class> |
||||
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteUser"></class> |
||||
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteTenant"></class> |
||||
</classes> --> |
||||
</test> |
||||
|
||||
<listeners> |
||||
<listener class-name="org.uncommons.reportng.HTMLReporter" /> |
||||
<listener class-name="org.uncommons.reportng.JUnitXMLReporter" /> |
||||
</listeners> |
||||
</suite> |
Loading…
Reference in new issue