|
|
@ -28,12 +28,14 @@ import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage; |
|
|
|
import org.openqa.selenium.By; |
|
|
|
import org.openqa.selenium.By; |
|
|
|
import org.openqa.selenium.JavascriptExecutor; |
|
|
|
import org.openqa.selenium.JavascriptExecutor; |
|
|
|
import org.openqa.selenium.Keys; |
|
|
|
import org.openqa.selenium.Keys; |
|
|
|
|
|
|
|
import org.openqa.selenium.WebDriver; |
|
|
|
import org.openqa.selenium.WebElement; |
|
|
|
import org.openqa.selenium.WebElement; |
|
|
|
import org.openqa.selenium.remote.LocalFileDetector; |
|
|
|
import org.openqa.selenium.remote.LocalFileDetector; |
|
|
|
import org.openqa.selenium.remote.RemoteWebDriver; |
|
|
|
import org.openqa.selenium.remote.RemoteWebDriver; |
|
|
|
import org.openqa.selenium.support.FindBy; |
|
|
|
import org.openqa.selenium.support.FindBy; |
|
|
|
import org.openqa.selenium.support.FindBys; |
|
|
|
import org.openqa.selenium.support.FindBys; |
|
|
|
import org.openqa.selenium.support.PageFactory; |
|
|
|
import org.openqa.selenium.support.PageFactory; |
|
|
|
|
|
|
|
import org.openqa.selenium.support.ui.ExpectedCondition; |
|
|
|
import org.openqa.selenium.support.ui.ExpectedConditions; |
|
|
|
import org.openqa.selenium.support.ui.ExpectedConditions; |
|
|
|
import org.openqa.selenium.support.ui.WebDriverWait; |
|
|
|
import org.openqa.selenium.support.ui.WebDriverWait; |
|
|
|
|
|
|
|
|
|
|
@ -71,6 +73,12 @@ public class FileManagePage extends NavBarPage implements ResourcePage.Tab { |
|
|
|
}) |
|
|
|
}) |
|
|
|
private WebElement buttonConfirm; |
|
|
|
private WebElement buttonConfirm; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@FindBys({ |
|
|
|
|
|
|
|
@FindBy(className = "monaco-editor"), |
|
|
|
|
|
|
|
@FindBy(className = "view-line"), |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
private WebElement editor; |
|
|
|
|
|
|
|
|
|
|
|
public FileManagePage(RemoteWebDriver driver) { |
|
|
|
public FileManagePage(RemoteWebDriver driver) { |
|
|
|
super(driver); |
|
|
|
super(driver); |
|
|
|
|
|
|
|
|
|
|
@ -178,6 +186,8 @@ public class FileManagePage extends NavBarPage implements ResourcePage.Tab { |
|
|
|
|
|
|
|
|
|
|
|
new WebDriverWait(driver, 5).until(ExpectedConditions.urlContains("/edit")); |
|
|
|
new WebDriverWait(driver, 5).until(ExpectedConditions.urlContains("/edit")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new WebDriverWait(driver, 5).until((ExpectedCondition<Object>) webDriver -> editor.getText().length() > 0); |
|
|
|
|
|
|
|
|
|
|
|
editFileBox().codeEditor().content(scripts); |
|
|
|
editFileBox().codeEditor().content(scripts); |
|
|
|
editFileBox().buttonSubmit().click(); |
|
|
|
editFileBox().buttonSubmit().click(); |
|
|
|
|
|
|
|
|
|
|
|