You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by GitBox <gi...@apache.org> on 2020/02/28 01:26:16 UTC

[GitHub] [submarine] kevin85421 opened a new pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

kevin85421 opened a new pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195
 
 
   
   
   ### What is this PR for?
   Implement the home page in the workbench with Angular.
   
   
   ### What type of PR is it?
   [Feature]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/SUBMARINE-389
   
   ### How should this be tested?
   https://travis-ci.org/kevin85421/hadoop-submarine?utm_medium=notification&utm_source=github_status
   
   ### Screenshots (if appropriate)
   case1: >= 1600px
   ![截圖 2020-02-28 上午9 12 24(2)](https://user-images.githubusercontent.com/20109646/75501792-f5035d80-5a0b-11ea-8064-afef25d9e49f.png)
   case2: < 1600px
   ![截圖 2020-02-28 上午9 24 57](https://user-images.githubusercontent.com/20109646/75501896-372c9f00-5a0c-11ea-9193-46be6709a4f2.png)
   
   
   ### Questions:
   * Does the licenses files need an update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org


[GitHub] [submarine] kevin85421 commented on a change in pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
kevin85421 commented on a change in pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195#discussion_r385534189
 
 

 ##########
 File path: submarine-test/e2e/src/test/java/org/apache/submarine/integration/homeIT.java
 ##########
 @@ -0,0 +1,81 @@
+/*
+ * 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.submarine.integration;
+
+import org.apache.submarine.AbstractSubmarineIT;
+import org.apache.submarine.WebDriverManager;
+import org.apache.submarine.SubmarineITUtils;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.By;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import org.testng.Assert;
+import java.util.List;
+
+public class homeIT extends AbstractSubmarineIT {
+
+  public final static Logger LOG = LoggerFactory.getLogger(homeIT.class);
+
+  @BeforeClass
+  public static void startUp(){
+    driver =  WebDriverManager.getWebDriver();
+  }
+
+  @AfterClass
+  public static void tearDown(){
+    driver.quit();
+  }
+
+  @Test
+  public void homePagination() throws Exception {
+    // Login
+    LOG.info("Login");
+    pollingWait(By.cssSelector("input[ng-reflect-name='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("admin");
+    pollingWait(By.cssSelector("input[ng-reflect-name='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("admin");
+    clickAndWait(By.cssSelector("button[class='login-form-button ant-btn ant-btn-primary']"));
+    pollingWait(By.cssSelector("a[routerlink='/workbench/dashboard']"), MAX_BROWSER_TIMEOUT_SEC);
+
+    LOG.info("Pagination");
+    List<WebElement> changePageIndexButtons = driver.findElements(By.cssSelector("a[class='ant-pagination-item-link ng-star-inserted']"));
+    // 0: open recent: previous page
+    // 1: open recent: next page
+    // 2: news: previous page
+    // 3: news: next page
+    changePageIndexButtons.get(1).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project2\")]")).size(), 6);
+    changePageIndexButtons.get(1).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project3\")]")).size(), 6);
+    changePageIndexButtons.get(0).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project2\")]")).size(), 6);
+    changePageIndexButtons.get(0).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project1\")]")).size(), 6);
+    changePageIndexButtons.get(3).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x 123\")]")).size(), 5);
+    changePageIndexButtons.get(3).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x 456\")]")).size(), 5);
+    changePageIndexButtons.get(2).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x 123\")]")).size(), 5);
+    changePageIndexButtons.get(2).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x\")]")).size(), 5);
+  }
+}
 
 Review comment:
   @jasoonn Thank you for your review. I have fixed the problem.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org


[GitHub] [submarine] liuxunorg commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
liuxunorg commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195#issuecomment-592842745
 
 
   Will merge if no more comments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org


[GitHub] [submarine] jasoonn commented on a change in pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
jasoonn commented on a change in pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195#discussion_r385472059
 
 

 ##########
 File path: submarine-test/e2e/src/test/java/org/apache/submarine/integration/homeIT.java
 ##########
 @@ -0,0 +1,81 @@
+/*
+ * 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.submarine.integration;
+
+import org.apache.submarine.AbstractSubmarineIT;
+import org.apache.submarine.WebDriverManager;
+import org.apache.submarine.SubmarineITUtils;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.By;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import org.testng.Assert;
+import java.util.List;
+
+public class homeIT extends AbstractSubmarineIT {
+
+  public final static Logger LOG = LoggerFactory.getLogger(homeIT.class);
+
+  @BeforeClass
+  public static void startUp(){
+    driver =  WebDriverManager.getWebDriver();
+  }
+
+  @AfterClass
+  public static void tearDown(){
+    driver.quit();
+  }
+
+  @Test
+  public void homePagination() throws Exception {
+    // Login
+    LOG.info("Login");
+    pollingWait(By.cssSelector("input[ng-reflect-name='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("admin");
+    pollingWait(By.cssSelector("input[ng-reflect-name='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("admin");
+    clickAndWait(By.cssSelector("button[class='login-form-button ant-btn ant-btn-primary']"));
+    pollingWait(By.cssSelector("a[routerlink='/workbench/dashboard']"), MAX_BROWSER_TIMEOUT_SEC);
+
+    LOG.info("Pagination");
+    List<WebElement> changePageIndexButtons = driver.findElements(By.cssSelector("a[class='ant-pagination-item-link ng-star-inserted']"));
+    // 0: open recent: previous page
+    // 1: open recent: next page
+    // 2: news: previous page
+    // 3: news: next page
+    changePageIndexButtons.get(1).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project2\")]")).size(), 6);
+    changePageIndexButtons.get(1).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project3\")]")).size(), 6);
+    changePageIndexButtons.get(0).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project2\")]")).size(), 6);
+    changePageIndexButtons.get(0).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Project1\")]")).size(), 6);
+    changePageIndexButtons.get(3).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x 123\")]")).size(), 5);
+    changePageIndexButtons.get(3).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x 456\")]")).size(), 5);
+    changePageIndexButtons.get(2).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x 123\")]")).size(), 5);
+    changePageIndexButtons.get(2).click();
+    Assert.assertEquals( driver.findElements(By.xpath("//div[contains(text(), \"Submarine supports yarn 2.7.x\")]")).size(), 5);
+  }
+}
 
 Review comment:
   @kevin85421 Thank for you contribution.
   No newline at the end of the file.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org


[GitHub] [submarine] kevin85421 commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
kevin85421 commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195#issuecomment-592611149
 
 
   @liuxunorg Thank you for your review!
   @jasoonn I have updated the pull request, and some changes are related to the workspace component. Can you help me review the new changes? Thanks a lot!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org


[GitHub] [submarine] jasoonn commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
jasoonn commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195#issuecomment-592830977
 
 
   @kevin85421 Thank you for contribution.
   They are great!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org


[GitHub] [submarine] kevin85421 commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
kevin85421 commented on issue #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195#issuecomment-592264704
 
 
   @jasoonn @liuxunorg Can you help me review the pull request? Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org


[GitHub] [submarine] asfgit closed pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #195: SUBMARINE-389. [WEB]Implement the home page in workbench with Angular
URL: https://github.com/apache/submarine/pull/195
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org