Simon
5 years ago
committed by
GitHub
38 changed files with 1566 additions and 449 deletions
@ -0,0 +1,41 @@ |
|||||||
|
/* |
||||||
|
* 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.enums; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue; |
||||||
|
|
||||||
|
public enum SqoopJobType { |
||||||
|
CUSTOM(0, "CUSTOM"), |
||||||
|
TEMPLATE(1, "TEMPLATE"); |
||||||
|
|
||||||
|
SqoopJobType(int code, String descp){ |
||||||
|
this.code = code; |
||||||
|
this.descp = descp; |
||||||
|
} |
||||||
|
|
||||||
|
@EnumValue |
||||||
|
private final int code; |
||||||
|
private final String descp; |
||||||
|
|
||||||
|
public int getCode() { |
||||||
|
return code; |
||||||
|
} |
||||||
|
|
||||||
|
public String getDescp() { |
||||||
|
return descp; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
/* |
||||||
|
* 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; |
||||||
|
|
||||||
|
public class AlertManageData { |
||||||
|
/** |
||||||
|
* Alert Name |
||||||
|
*/ |
||||||
|
public static final String ALERT_NAME = "selenium_alert_Name"; |
||||||
|
/** |
||||||
|
* Alert Type |
||||||
|
*/ |
||||||
|
public static final String ALERT_TYPE = "邮件"; |
||||||
|
|
||||||
|
/** |
||||||
|
* Alert Description |
||||||
|
*/ |
||||||
|
public static final String DESCRIPTION = "create alert test"; |
||||||
|
|
||||||
|
public static final String ALERT_MANAGE = "告警组管理 - DolphinScheduler"; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
/* |
||||||
|
* 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; |
||||||
|
|
||||||
|
public class QueueManageData { |
||||||
|
/** |
||||||
|
* Create Queue Name |
||||||
|
*/ |
||||||
|
public static final String QUEUE_NAME = "selenium_queue_name"; |
||||||
|
|
||||||
|
/** |
||||||
|
* Create Queue Value |
||||||
|
*/ |
||||||
|
public static final String QUEUE_VALUE = "selenium_queue_value"; |
||||||
|
|
||||||
|
/** |
||||||
|
* Edit Queue Name |
||||||
|
*/ |
||||||
|
public static final String EDIT_QUEUE_NAME = "_edit"; |
||||||
|
|
||||||
|
/** |
||||||
|
* Edit Queue Value |
||||||
|
*/ |
||||||
|
public static final String EDIT_QUEUE_VALUE = "_edit"; |
||||||
|
|
||||||
|
public static final String QUEUE_MANAGE = "队列管理 - DolphinScheduler"; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
/* |
||||||
|
* 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; |
||||||
|
|
||||||
|
public class TokenManageData { |
||||||
|
public static final String TOKEN_MANAGE = "令牌管理 - DolphinScheduler"; |
||||||
|
public static final String DATE = "2038-06-10 00:00:00"; |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
/* |
||||||
|
* 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"); |
||||||
|
|
||||||
|
//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"); |
||||||
|
} |
||||||
|
|
@ -0,0 +1,31 @@ |
|||||||
|
/* |
||||||
|
* 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"); |
||||||
|
|
||||||
|
//edit queue locator
|
||||||
|
public static final By CLICK_EDIT_QUEUE = By.xpath("//td[6]/button/i"); |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
/* |
||||||
|
* 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("//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 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 CLICK_EDIT_BUTTON = By.xpath("//div[3]/div[1]/div/table/tr[2]/td[7]/button/i"); |
||||||
|
|
||||||
|
//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"); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,77 @@ |
|||||||
|
/* |
||||||
|
* 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 { |
||||||
|
/** |
||||||
|
* Unique constructor |
||||||
|
* @param driver driver |
||||||
|
*/ |
||||||
|
public AlertManagePage(WebDriver driver) { |
||||||
|
super(driver); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* createTenant |
||||||
|
* |
||||||
|
* @return Whether to enter the specified page after create tenant |
||||||
|
*/ |
||||||
|
public boolean createAlert() throws InterruptedException { |
||||||
|
// click alert manage
|
||||||
|
clickElement(AlertManageLocator.CLICK_ALERT_MANAGE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// click create alert button
|
||||||
|
clickElement(AlertManageLocator.CLICK_CREATE_ALERT); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// input alert data
|
||||||
|
sendInput(AlertManageLocator.INPUT_ALERT_NAME, AlertManageData.ALERT_NAME); |
||||||
|
|
||||||
|
clickElement(AlertManageLocator.CLICK_ALERT_TYPE); |
||||||
|
|
||||||
|
clickElement(AlertManageLocator.SELECT_ALERT_EMAIL); |
||||||
|
|
||||||
|
sendInput(AlertManageLocator.INPUT_ALERT_DESCRIPTION, AlertManageData.DESCRIPTION); |
||||||
|
|
||||||
|
// click button
|
||||||
|
clickButton(AlertManageLocator.SUBMIT_ALERT); |
||||||
|
|
||||||
|
// Whether to enter the specified page after submit
|
||||||
|
return ifTitleContains(AlertManageData.ALERT_MANAGE); |
||||||
|
} |
||||||
|
|
||||||
|
public boolean deleteAlert() throws InterruptedException { |
||||||
|
|
||||||
|
// click user manage
|
||||||
|
clickElement(AlertManageLocator.CLICK_ALERT_MANAGE); |
||||||
|
|
||||||
|
// click delete user 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.ALERT_MANAGE); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,85 @@ |
|||||||
|
/* |
||||||
|
* 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 { |
||||||
|
/** |
||||||
|
* 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
|
||||||
|
clickElement(QueueManageLocator.CLICK_QUEUE_MANAGE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// click create queue button
|
||||||
|
clickElement(QueueManageLocator.CLICK_CREATE_QUEUE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// input queue data
|
||||||
|
sendInput(QueueManageLocator.INPUT_QUEUE_NAME, QueueManageData.QUEUE_NAME); |
||||||
|
|
||||||
|
sendInput(QueueManageLocator.INPUT_QUEUE_VALUE, QueueManageData.QUEUE_VALUE); |
||||||
|
|
||||||
|
// click button
|
||||||
|
clickButton(QueueManageLocator.SUBMIT_QUEUE); |
||||||
|
|
||||||
|
// Whether to enter the specified page after submit
|
||||||
|
return ifTitleContains(QueueManageData.QUEUE_MANAGE); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* edit queue |
||||||
|
* |
||||||
|
* @return Whether to enter the specified page after create queue |
||||||
|
*/ |
||||||
|
public boolean editQueue() throws InterruptedException { |
||||||
|
// click queue manage
|
||||||
|
Thread.sleep(1000); |
||||||
|
clickElement(QueueManageLocator.CLICK_QUEUE_MANAGE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// click edit queue button
|
||||||
|
clickElement(QueueManageLocator.CLICK_EDIT_QUEUE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// input queue data
|
||||||
|
sendInput(QueueManageLocator.INPUT_QUEUE_NAME, QueueManageData.EDIT_QUEUE_NAME); |
||||||
|
sendInput(QueueManageLocator.INPUT_QUEUE_VALUE, QueueManageData.EDIT_QUEUE_VALUE); |
||||||
|
|
||||||
|
// click button
|
||||||
|
clickButton(QueueManageLocator.SUBMIT_QUEUE); |
||||||
|
|
||||||
|
// Whether to enter the specified page after submit
|
||||||
|
return ifTitleContains(QueueManageData.QUEUE_MANAGE); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,94 @@ |
|||||||
|
/* |
||||||
|
* 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 { |
||||||
|
public TokenManagePage(WebDriver driver) { |
||||||
|
super(driver); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* createTenant |
||||||
|
* |
||||||
|
* @return Whether to enter the specified page after creat tenant |
||||||
|
*/ |
||||||
|
public boolean createToken() throws InterruptedException { |
||||||
|
//create token
|
||||||
|
Thread.sleep(1000); |
||||||
|
clickElement(TokenManageLocator.CLICK_TOKEN_MANAGE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// click create token button
|
||||||
|
clickButton(TokenManageLocator.CLICK_CREATE_TOKEN); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
//selectDate(TokenManageLocator.js, TokenManageLocator.CLICK_TIME, TokenManageData.DATE);
|
||||||
|
|
||||||
|
clickButton(TokenManageLocator.SELECT_USER); |
||||||
|
|
||||||
|
clickButton(TokenManageLocator.CLICK_GENERATE_TOKEN_BUTTON); |
||||||
|
Thread.sleep(2500); |
||||||
|
|
||||||
|
// click button
|
||||||
|
clickButton(TokenManageLocator.CLICK_SUBMIT_BUTTON); |
||||||
|
|
||||||
|
// Whether to enter the specified page after submit
|
||||||
|
return ifTitleContains(TokenManageData.TOKEN_MANAGE); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
//edit token
|
||||||
|
public boolean editToken() throws InterruptedException { |
||||||
|
// click token manage
|
||||||
|
clickElement(TokenManageLocator.CLICK_TOKEN_MANAGE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
// click create token button
|
||||||
|
clickButton(TokenManageLocator.CLICK_EDIT_BUTTON); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
clickButton(TokenManageLocator.SELECT_USER); |
||||||
|
|
||||||
|
clickButton(TokenManageLocator.CLICK_GENERATE_TOKEN_BUTTON); |
||||||
|
Thread.sleep(2500); |
||||||
|
|
||||||
|
// click button
|
||||||
|
clickButton(TokenManageLocator.CLICK_SUBMIT_BUTTON); |
||||||
|
|
||||||
|
// Whether to enter the specified page after submit
|
||||||
|
return ifTitleContains(TokenManageData.TOKEN_MANAGE); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
//delete token
|
||||||
|
public boolean deleteToken() throws InterruptedException { |
||||||
|
// click token manage
|
||||||
|
clickElement(TokenManageLocator.CLICK_TOKEN_MANAGE); |
||||||
|
Thread.sleep(1000); |
||||||
|
|
||||||
|
clickButton(TokenManageLocator.CLICK_DELETE_BUTTON); |
||||||
|
clickButton(TokenManageLocator.CLICK_CONFIRM_DELETE_BUTTON); |
||||||
|
|
||||||
|
return ifTitleContains(TokenManageData.TOKEN_MANAGE); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
/* |
||||||
|
* 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("==================================="); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
/* |
||||||
|
* 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("==================================="); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
/* |
||||||
|
* 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("==================================="); |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
/* |
||||||
|
* 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("==================================="); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,43 @@ |
|||||||
|
/* |
||||||
|
* 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 testUserManage() 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("==================================="); |
||||||
|
|
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue