You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by jo...@apache.org on 2017/07/06 01:11:11 UTC

zeppelin git commit: [ZEPPELIN-2661]Test: personalized mode action

Repository: zeppelin
Updated Branches:
  refs/heads/master 0443b001f -> fdbfff209


[ZEPPELIN-2661]Test: personalized mode action

### What is this PR for?
Adding to personalized mode action case on Selenium test.
Here is for checking scenario.
#### 1. Simple action test :
```
1. (admin) login, create a new note, run a paragraph with 'Before' text, turn on personalized mode, logout.
           > checkpoint : result of paragraph is 'Before'.

2. (user1) login, make sure it is on personalized mode and 'Before' in result of paragraph, logout.
           > checkpoint 1 : enabling personalized mode
           > checkpoint 2 : result of paragraph is 'Before'.

3. (admin) login, run after changing paragraph contents to 'After', check result of paragraph, logout.
           > checkpoint : changed from 'Before' to 'After' in paragraph result.

4. (user1) login, check whether result of paragraph is 'Before' or not.
           > checkpoint : result of paragraph is 'Before', 'After' means test fail.
```

#### 2. Graph action test :
```
1. (admin) login, create a new note, run a paragraph with data of spark tutorial, change active graph to 'Bar Chart', turn on personalized mode, logout.
           > checkpoint 1: result string of paragraph contains import 'org.apache.commons.io.IOUtils'.
           > checkpoint 2 : check active graph is 'Bar Chart'

2. (user1) make sure it is on personalized mode and graph mode is on 'Bar Chart', try to change active graph to 'Table' and then check result
           > checkpoint 1 : enabling personalized mode
           > checkpoint 2 : final result of active graph is 'Bar Chart', 'Table' means test fail.
```

#### 3. Dynamic form action test :
```
1. (admin) login, create a new note, run a paragraph with data of spark tutorial, logout.
           > checkpoint 1: result string of paragraph contains import 'org.apache.commons.io.IOUtils'.
           > checkpoint 2 : check a dynamic form value is '30'

2. (user1) make sure it is on personalized mode and  dynamic form value is '30', try to change dynamic form value to '10' and then check result
           > checkpoint 1 : enabling personalized mode
           > checkpoint 2 : final result of dynamic form value is '30', '10' means test fail.
```

### What type of PR is it?
[ Test ]

### What is the Jira issue?
* [ZEPPELIN-2661](https://issues.apache.org/jira/browse/ZEPPELIN-2661)

### How should this be tested?
- build zeppelin with `mvn clean package -DskipTests'

 -  1. execute for Simple text test : `TEST_SELENIUM="true" mvn test -pl 'zeppelin-server' --am -DfailIfNoTests=false -Dtest=PersonalizeActionsIT#testSimpleAction`

 - 2. execute for Graph test : `TEST_SELENIUM="true" mvn test -pl 'zeppelin-server' --am -DfailIfNoTests=false -Dtest=PersonalizeActionsIT#testGraphAction`

 - 3. execute for Graph test : `TEST_SELENIUM="true" mvn test -pl 'zeppelin-server' --am -DfailIfNoTests=false -Dtest=PersonalizeActionsIT#testDynamicFormAction`

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: soralee <so...@zepl.com>

Closes #2415 from soralee/personalize_mode_test and squashes the following commits:

f2d14d9b [soralee] missing endToEndTestEnabled method
573a3105 [soralee] fix: remove annotation
0d55b765 [soralee] fix: reuse code in AuthenticationIT login and logout
a322427f [soralee] fix: null exception in Travis
970f6b2b [soralee] fix: Travis fail this line because of null
a2b3c288 [soralee] fix: flaky test in login section on Travis
1844159e [soralee] fix: remove unnecessary code
90cb1982 [soralee] fix: improve simple code in paragraph of graph and dynamicform test case
84ec218d [soralee] fix: passing overall test and flaky test in login section
d347fd1d [soralee] Test&Fix: adding dynamic form action & code improvement
dd7cb246 [soralee] test&fix: adding graph action test & remove duplicated code
2581af1a [soralee] Fix: remove unnecessary newline and annotation
043e8387 [soralee] fix: using minimum 'sleep' method
ecac3c36 [soralee] style: modify method name
cb281a89 [soralee] style: [minor] modify annotation
8e13fad0 [soralee] style: added new line
49a339a8 [soralee] test: add to check point about being turned on personalized mode in user1
ad77924a [soralee] personalize mode integration test


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/fdbfff20
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/fdbfff20
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/fdbfff20

Branch: refs/heads/master
Commit: fdbfff2090accb032949551348ff4ca29e8de73b
Parents: 0443b00
Author: soralee <so...@zepl.com>
Authored: Thu Jun 29 17:30:06 2017 +0900
Committer: Jongyoul Lee <jo...@apache.org>
Committed: Thu Jul 6 10:11:07 2017 +0900

----------------------------------------------------------------------
 .../zeppelin/integration/AuthenticationIT.java  |   4 +-
 .../integration/PersonalizeActionsIT.java       | 354 +++++++++++++++++++
 2 files changed, 356 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/fdbfff20/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
index 9abbe28..523b8f8 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
@@ -118,7 +118,7 @@ public class AuthenticationIT extends AbstractZeppelinIT {
     driver.quit();
   }
 
-  private void authenticationUser(String userName, String password) {
+  public void authenticationUser(String userName, String password) {
     pollingWait(By.xpath(
         "//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
         MAX_BROWSER_TIMEOUT_SEC).click();
@@ -147,7 +147,7 @@ public class AuthenticationIT extends AbstractZeppelinIT {
     }
   }
 
-  private void logoutUser(String userName) throws URISyntaxException {
+  public void logoutUser(String userName) throws URISyntaxException {
     ZeppelinITUtils.sleep(500, false);
     driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
         userName + "')]")).click();

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/fdbfff20/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
new file mode 100644
index 0000000..b813ea9
--- /dev/null
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
@@ -0,0 +1,354 @@
+/*
+ * 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.zeppelin.integration;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.integration.AuthenticationIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.apache.zeppelin.ZeppelinITUtils;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.hamcrest.CoreMatchers;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.WebDriverWait;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.TimeoutException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.commons.io.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import static org.junit.Assert.assertTrue;
+
+public class PersonalizeActionsIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(PersonalizeActionsIT.class);
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+  static String shiroPath;
+  static String authShiro = "[users]\n" +
+      "admin = password1, admin\n" +
+      "user1 = password2, user\n" +
+      "[main]\n" +
+      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+      "securityManager.sessionManager = $sessionManager\n" +
+      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+      "shiro.loginUrl = /api/login\n" +
+      "[roles]\n" +
+      "admin = *\n" +
+      "user = *\n" +
+      "[urls]\n" +
+      "/api/version = anon\n" +
+      "/** = authc";
+
+  static String originalShiro = "";
+
+  @BeforeClass
+  public static void startUp() {
+    if (!endToEndTestEnabled()) {
+      return;
+    }
+    try {
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), "../");
+      ZeppelinConfiguration conf = ZeppelinConfiguration.create();
+      shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
+      File file = new File(shiroPath);
+      if (file.exists()) {
+        originalShiro = StringUtils.join(FileUtils.readLines(file, "UTF-8"), "\n");
+      }
+      FileUtils.write(file, authShiro, "UTF-8");
+    } catch (IOException e) {
+      LOG.error("Error in PersonalizeActionsIT startUp::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver = WebDriverManager.getWebDriver();
+  }
+
+  @AfterClass
+  public static void tearDown() {
+    if (!endToEndTestEnabled()) {
+      return;
+    }
+    try {
+      if (!StringUtils.isBlank(shiroPath)) {
+        File file = new File(shiroPath);
+        if (StringUtils.isBlank(originalShiro)) {
+          FileUtils.deleteQuietly(file);
+        } else {
+          FileUtils.write(file, originalShiro, "UTF-8");
+        }
+      }
+    } catch (IOException e) {
+      LOG.error("Error in PersonalizeActionsIT tearDown::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver.quit();
+  }
+
+  private void setParagraphText(String text) {
+    setTextOfParagraph(1, "%md\\n # " + text);
+    runParagraph(1);
+    waitForParagraph(1, "FINISHED");
+  }
+
+  @Test
+  public void testSimpleAction() throws Exception {
+    if (!endToEndTestEnabled()) {
+      return;
+    }
+    try {
+      // step 1 : (admin) create a new note, run a paragraph and turn on personalized mode
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      PersonalizeActionsIT personalizeActionsIT = new PersonalizeActionsIT();
+      authenticationIT.authenticationUser("admin", "password1");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      waitForParagraph(1, "READY");
+      personalizeActionsIT.setParagraphText("Before");
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("Before"));
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      authenticationIT.logoutUser("admin");
+
+      // step 2 : (user1) make sure it is on personalized mode and 'Before' in result of paragraph
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
+          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
+      waitForParagraph(1, "READY");
+      runParagraph(1);
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("Before"));
+      authenticationIT.logoutUser("user1");
+
+      // step 3 : (admin) change paragraph contents to 'After' and check result of paragraph
+      authenticationIT.authenticationUser("admin", "password1");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      waitForParagraph(1, "FINISHED");
+      personalizeActionsIT.setParagraphText("After");
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("After"));
+      authenticationIT.logoutUser("admin");
+
+      // step 4 : (user1) check whether result is 'Before' or not
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("Before"));
+      authenticationIT.logoutUser("user1");
+    } catch (Exception e) {
+      handleException("Exception in PersonalizeActionsIT while testSimpleAction ", e);
+    }
+  }
+
+  @Test
+  public void testGraphAction() throws Exception {
+    if (!endToEndTestEnabled()) {
+      return;
+    }
+    try {
+      // step 1 : (admin) create a new note, run a paragraph, change active graph to 'Bar chart', turn on personalized mode
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      authenticationIT.authenticationUser("admin", "password1");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      setTextOfParagraph(1, "print(s\"\"\"%table\\n" +
+          "name\\tsize\\n" +
+          "sun\\t100\\n" +
+          "moon\\t10\"\"\")");
+
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in PersonalizeActionsIT while testGraphAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//button[contains(@uib-tooltip, 'Bar Chart')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
+          CoreMatchers.equalTo("fa fa-bar-chart"));
+
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      authenticationIT.logoutUser("admin");
+
+      // step 2 : (user1) make sure it is on personalized mode and active graph is 'Bar chart',
+      // try to change active graph to 'Table' and then check result
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
+          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
+
+      collector.checkThat("Make sure the output of graph mode is",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
+          CoreMatchers.equalTo("fa fa-bar-chart"));
+
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//button[contains(@uib-tooltip, 'Table')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      collector.checkThat("The output of graph mode is not changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
+          CoreMatchers.equalTo("fa fa-bar-chart"));
+      authenticationIT.logoutUser("user1");
+
+    } catch (Exception e) {
+      handleException("Exception in PersonalizeActionsIT while testGraphAction ", e);
+    }
+  }
+
+  @Test
+  public void testDynamicFormAction() throws Exception {
+    if (!endToEndTestEnabled()) {
+      return;
+    }
+    try {
+      // step 1 : (admin) login, create a new note, run a paragraph with data of spark tutorial, logout.
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      authenticationIT.authenticationUser("admin", "password1");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      setTextOfParagraph(1, "%spark println(\"Status: \"+z.textbox(\"name\", \"Before\")) ");
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) +
+              "//input[contains(@name, 'name')]")).getAttribute("value"),
+          CoreMatchers.equalTo("Before"));
+
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      authenticationIT.logoutUser("admin");
+
+      // step 2 : (user1) make sure it is on personalized mode and  dynamic form value is 'Before',
+      // try to change dynamic form value to 'After' and then check result
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
+          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
+
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) +
+              "//input[contains(@name, 'name')]")).getAttribute("value"),
+          CoreMatchers.equalTo("Before"));
+
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).clear();
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("After");
+
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Status: Before"));
+      authenticationIT.logoutUser("user1");
+
+    } catch (Exception e) {
+      handleException("Exception in PersonalizeActionsIT while testGraphAction ", e);
+    }
+  }
+}