Unverified Commit 87d03798 authored by xingchun-chen's avatar xingchun-chen Committed by GitHub
Browse files

e2e add queue testcase (#2949)



* add LoginTest license

* Delete useless packages

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* e2e add project and workflow case

* Update worker_group_id to worker_group in init.sql

* Update worker_group_id to worker_group in init.sql

* Update worker_group_id to worker_group

* Increase dataX environment variable, sslTrust default value

* modify dataX environment variable

* update e2e chrome version

* add alert manage testcase and Optimize test case execution order

* add e2e to create and to  edit  queue

* update e2e chrome version

* add e2e token testcase

* add e2e token testcase

Co-authored-by: default avatarchenxingchun <438044805@qq.com>
parent a7fd0a52
Loading
Loading
Loading
Loading
+25 −9
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ 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;
@@ -115,6 +115,7 @@ public class BrowserCommon {

    /**
     * Click button element
     *
     * @param locator By
     * @return clickButton
     */
@@ -128,6 +129,7 @@ public class BrowserCommon {

    /**
     * Click Navigation Bar element
     *
     * @param locator By
     * @return clickButton
     */
@@ -164,6 +166,7 @@ public class BrowserCommon {
        inputElement.sendKeys(content);
        return inputElement;
    }

    /**
     * clear element
     *
@@ -182,7 +185,6 @@ public class BrowserCommon {
     *
     * @param codeMirrorLocator By codeMirror
     * @param codeMirrorLineLocator By codeMirrorLine

     */
    public void inputCodeMirror(By codeMirrorLocator, By codeMirrorLineLocator, String content) {
        WebElement codeMirrorElement = locateElement(codeMirrorLocator);
@@ -193,6 +195,7 @@ public class BrowserCommon {

    /**
     * move to element
     *
     * @param locator BY
     * @return actions
     */
@@ -249,9 +252,22 @@ public class BrowserCommon {
        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
+42 −0
Original line number Diff line number Diff line
/*
 * 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";

}
+24 −0
Original line number Diff line number Diff line
/*
 * 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";


}
+31 −0
Original line number Diff line number Diff line
/*
 * 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");
}
+41 −0
Original line number Diff line number Diff line
/*
 * 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");

}
Loading