Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New fix/create new project it #4652

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
25de08d
add dummy change
iliyan-velichkov Jan 31, 2025
c5d4af8
enable new UI by default
iliyan-velichkov Jan 31, 2025
d82a705
fix tests execution - run them with the old UI until adapted
iliyan-velichkov Jan 31, 2025
b7ff865
fix:fixing finding workbench + finding new project button
bob4o-afk Feb 4, 2025
502bc53
add dummy change
iliyan-velichkov Jan 31, 2025
4790dc9
enable new UI by default
iliyan-velichkov Jan 31, 2025
0421fc0
fix tests execution - run them with the old UI until adapted
iliyan-velichkov Jan 31, 2025
49ae306
Changed DirigibleHomepageIT test to work with new UI (#4617)
alt-plus-f4 Feb 5, 2025
209b16b
add generic solution to reload config after test classes
iliyan-velichkov Feb 5, 2025
d05563d
fix: fixing asserts
bob4o-afk Feb 6, 2025
0a8fd72
Merge branch 'new-ui' into fix/CreateNewProjectIT
bob4o-afk Feb 10, 2025
21ded1a
add dummy change
iliyan-velichkov Jan 31, 2025
5fb4278
enable new UI by default
iliyan-velichkov Jan 31, 2025
4219c3c
fix tests execution - run them with the old UI until adapted
iliyan-velichkov Jan 31, 2025
1056004
Changed DirigibleHomepageIT test to work with new UI (#4617)
alt-plus-f4 Feb 5, 2025
c3ea831
add generic solution to reload config after test classes
iliyan-velichkov Feb 5, 2025
f5baa69
Merge branch 'master' into fix/CreateNewProjectIT
bob4o-afk Feb 13, 2025
1ed6648
Merge branch 'eclipse-dirigible:new-ui' into new-ui
bob4o-afk Feb 13, 2025
150dccf
Merge branch 'fix/CreateNewProjectIT' into new-ui
bob4o-afk Feb 13, 2025
b30cc50
add dummy change
iliyan-velichkov Jan 31, 2025
e1aa695
enable new UI by default
iliyan-velichkov Jan 31, 2025
ba362a0
fix tests execution - run them with the old UI until adapted
iliyan-velichkov Jan 31, 2025
9c120f4
Changed DirigibleHomepageIT test to work with new UI (#4617)
alt-plus-f4 Feb 5, 2025
2d6f8d3
add generic solution to reload config after test classes
iliyan-velichkov Feb 5, 2025
649cc5b
make openWorkbench to work with the new and the old UI
iliyan-velichkov Feb 14, 2025
37ef64c
format the code
iliyan-velichkov Feb 14, 2025
1f4f6fa
improve failure messages and elements search
iliyan-velichkov Feb 14, 2025
480922d
Merge remote-tracking branch 'eclipse-dirigible/new-ui' into new-ui
bob4o-afk Feb 14, 2025
9075e7b
fix: fixed test
bob4o-afk Feb 16, 2025
888a396
fix: fixing other tests
bob4o-afk Feb 17, 2025
c4ecd82
don't let the logs to affect the matching, increase search time
iliyan-velichkov Feb 17, 2025
311b6a0
Merge branch 'new-ui' into new-fix/CreateNewProjectIT
iliyan-velichkov Feb 17, 2025
8ba3ab3
add dummy change
iliyan-velichkov Jan 31, 2025
7ab3d52
enable new UI by default
iliyan-velichkov Jan 31, 2025
e52d52e
fix tests execution - run them with the old UI until adapted
iliyan-velichkov Jan 31, 2025
63b1186
Changed DirigibleHomepageIT test to work with new UI (#4617)
alt-plus-f4 Feb 5, 2025
92a06d4
add generic solution to reload config after test classes
iliyan-velichkov Feb 5, 2025
81d7d95
make openWorkbench to work with the new and the old UI
iliyan-velichkov Feb 14, 2025
e5523a4
format the code
iliyan-velichkov Feb 14, 2025
dc5a190
improve failure messages and elements search
iliyan-velichkov Feb 14, 2025
eb7a380
don't let the logs to affect the matching, increase search time
iliyan-velichkov Feb 17, 2025
04c6a44
switch tests to the new UI (#4657)
iliyan-velichkov Feb 17, 2025
821417e
reduce ELEMENT_SEARCH_IN_FRAME_MILLIS (#4663)
iliyan-velichkov Feb 17, 2025
167da28
Merge branch 'new-ui' into new-fix/CreateNewProjectIT
bob4o-afk Feb 18, 2025
7d2ba0d
Merge branch 'new-ui' into new-fix/CreateNewProjectIT
bob4o-afk Feb 18, 2025
4c3b721
Merge remote-tracking branch 'eclipse-dirigible/new-ui' into new-ui
bob4o-afk Feb 18, 2025
a1f0b1a
Merge remote-tracking branch 'origin/new-ui' into new-fix/CreateNewPr…
bob4o-afk Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<useManifestOnlyJar>true</useManifestOnlyJar>
</configuration>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,24 @@ public void assertPublishingProjectMessage(String projectName) {
}

public void assertStatusBarMessage(String expectedMessage) {
browser.assertElementExistsByTypeAndText(HtmlElementType.SPAN, expectedMessage);
String homeValue = Configuration.get("DIRIGIBLE_HOME_URL");
if (null != homeValue && homeValue.contains("services/web/ide")) {
browser.assertElementExistsByTypeAndText(HtmlElementType.SPAN, expectedMessage);
} else {
browser.assertElementExistsByTypeAndText(HtmlElementType.STATUS_MESSAGE, expectedMessage);

}
}

public void assertPublishedProjectMessage(String projectName) {
String publishedMessage = "Published '/" + projectName + "'";
assertStatusBarMessage(publishedMessage);
String homeValue = Configuration.get("DIRIGIBLE_HOME_URL");
if (null != homeValue && homeValue.contains("services/web/ide")) {
String publishedMessage = "Published '/" + projectName + "'";
assertStatusBarMessage(publishedMessage);
} else {
String publishedMessage = "Published '/workspace/" + projectName + "'";
assertStatusBarMessage(publishedMessage);
}
}

public void assertJSHttpResponse(String projectName, String fileRelativePath, int expectedStatusCode, String expectedBody) {
Expand Down Expand Up @@ -149,7 +161,8 @@ public void createNewBlankProject(String projectName) {

workbench.createNewProject(projectName);

assertCreatedProject(projectName);
// assertCreatedProject(projectName);
assertPublishedProjectMessage(projectName);
}

public void assertCreatedProject(String projectName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Component
public class Workbench {

public static final String PROJECTS_VIEW_ID = "dgProjects";
public static final String PROJECTS_VIEW_ID = "pvtree";
public static final String PROJECT_NAME_INPUT_ID = "pgfi1";
private static final String PROJECTS_CONTEXT_MENU_NEW_PROJECT = "New Project";
private static final String CREATE_PROJECT_BUTTON_TEXT = "Create";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public enum HtmlElementType {
SPAN("span"), //
DIV("div"), //
LI("li"), //
FD_MESSAGE_PAGE_TITLE("bk-message-page-title");
FD_MESSAGE_PAGE_TITLE("bk-message-page-title"), STATUS_MESSAGE(".statusbar-message"),;



private final String type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
import org.eclipse.dirigible.tests.framework.HtmlElementType;
import org.eclipse.dirigible.tests.util.SleepUtil;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Actions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -44,7 +46,8 @@ class BrowserImpl implements Browser {
private static final long SELENIDE_TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(15);
private static final String PATH_SEPARATOR = "/";
private static final int TOTAL_ELEMENT_SEARCH_TIMEOUT = 60 * 1000;
private static final long ELEMENT_SEARCH_IN_FRAME_MILLIS = 100;
private static final long ELEMENT_SEARCH_IN_FRAME_MILLIS = 200;


static {
Configuration.timeout = SELENIDE_TIMEOUT_MILLIS;
Expand Down Expand Up @@ -244,7 +247,10 @@ private Optional<SelenideElement> findSingleElement(By by, WebElementCondition..
}

try {
foundElements.shouldHave(CollectionCondition.size(1), Duration.ofMillis(ELEMENT_SEARCH_IN_FRAME_MILLIS));
// foundElements.shouldHave(CollectionCondition.size(1),
// Duration.ofMillis(ELEMENT_SEARCH_IN_FRAME_MILLIS));
foundElements.shouldHave(CollectionCondition.sizeGreaterThan(0), Duration.ofMillis(ELEMENT_SEARCH_IN_FRAME_MILLIS));

return Optional.of(foundElements.first());
} catch (ListSizeMismatch ex) {
LOGGER.debug(
Expand Down Expand Up @@ -336,7 +342,13 @@ private SelenideElement getElementByAttributeAndContainsText(String elementType,
}

private By constructCssSelectorByType(String elementType) {
return Selectors.byTagName(elementType);
String homeValue = org.eclipse.dirigible.commons.config.Configuration.get("DIRIGIBLE_HOME_URL");
if (null != homeValue && homeValue.contains("services/web/ide")) {
return Selectors.byTagName(elementType);
} else {
return By.cssSelector(elementType);
}

}

private SelenideElement getElementByAttributeAndText(String elementType, String text) {
Expand Down
2 changes: 1 addition & 1 deletion tests/tests-integrations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
<skipTests>false</skipTests>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
package org.eclipse.dirigible.integration.tests.api.java;

import org.eclipse.dirigible.commons.config.Configuration;
import org.eclipse.dirigible.components.data.sources.manager.DataSourcesManager;
import org.eclipse.dirigible.components.database.DirigibleDataSource;
import org.eclipse.dirigible.database.sql.DataType;
Expand Down Expand Up @@ -41,6 +42,10 @@ public class CsvimIT extends UserInterfaceIntegrationTest {
private static final String TEST_PROJECT_FOLDER_PATH = "CsvimIT/csvim-test-project";
private static final List<Reader> CSV_READERS = List.of(new Reader(1, "Ivan", "Ivanov"), new Reader(2, "Maria", "Petrova"));

static {
Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
}

@Autowired
private DataSourcesManager dataSourcesManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.eclipse.dirigible.integration.tests.services.integrations;

import ch.qos.logback.classic.Level;
import org.eclipse.dirigible.commons.config.Configuration;
import org.eclipse.dirigible.integration.tests.ui.tests.UserInterfaceIntegrationTest;
import org.eclipse.dirigible.tests.logging.LogsAsserter;
import org.eclipse.dirigible.tests.restassured.RestAssuredExecutor;
Expand All @@ -25,6 +26,10 @@

class CamelDirigibleJavaScriptComponentIT extends UserInterfaceIntegrationTest {

static {
Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
}

@Autowired
private RestAssuredExecutor restAssuredExecutor;
private LogsAsserter logsAsserter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.eclipse.dirigible.integration.tests.services.integrations;

import ch.qos.logback.classic.Level;
import org.eclipse.dirigible.commons.config.Configuration;
import org.eclipse.dirigible.integration.tests.ui.tests.UserInterfaceIntegrationTest;
import org.eclipse.dirigible.tests.logging.LogsAsserter;
import org.eclipse.dirigible.tests.restassured.RestAssuredExecutor;
Expand All @@ -25,6 +26,10 @@

class CamelDirigibleTwoStepsJSInvokerIT extends UserInterfaceIntegrationTest {

static {
Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
}

@Autowired
private RestAssuredExecutor restAssuredExecutor;
private LogsAsserter logsAsserter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
package org.eclipse.dirigible.integration.tests.ui.tests;

import ch.qos.logback.classic.Level;
import org.eclipse.dirigible.commons.config.Configuration;
import org.eclipse.dirigible.components.api.bpm.BpmFacade;
import org.eclipse.dirigible.tests.FormView;
import org.eclipse.dirigible.tests.WelcomeView;
Expand Down Expand Up @@ -42,6 +43,10 @@ class BPMStarterTemplateIT extends UserInterfaceIntegrationTest {
"Hello World! Process variables: {param1=" + PARAM_1_VALUE + ", param2=" + PARAM_2_VALUE + ".0}";
private static final String TRIGGER_BUTTON_TEXT = "Trigger";

static {
Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
}

private LogsAsserter consoleLogAsserter;

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

class CreateNewProjectIT extends UserInterfaceIntegrationTest {

static {
Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
}
// static {
// Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
// }

@Test
void testCreateNewBlankProject() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
package org.eclipse.dirigible.integration.tests.ui.tests;

import org.eclipse.dirigible.commons.config.Configuration;
import org.eclipse.dirigible.integration.tests.ui.TestProject;
import org.eclipse.dirigible.tests.IDE;
import org.eclipse.dirigible.tests.IDEFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class MailIT extends UserInterfaceIntegrationTest {
private static final String PASSWORD = "password";
private static final int PORT = PortUtil.getFreeRandomPort();

static {
Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
}

static {
Configuration.set("DIRIGIBLE_MAIL_USERNAME", USER);
Configuration.set("DIRIGIBLE_MAIL_PASSWORD", PASSWORD);
Expand Down