Skip to content

Commit

Permalink
fix tests execution - run them with the old UI until adapted
Browse files Browse the repository at this point in the history
Signed-off-by: Iliyan Velichkov <velichkov.iliyan@gmail.com>
  • Loading branch information
iliyan-velichkov committed Jan 31, 2025
1 parent 8495df2 commit a4575e9
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 9 deletions.
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 @@ -37,11 +38,14 @@
public class CsvimIT extends UserInterfaceIntegrationTest {

private static final Logger LOGGER = LoggerFactory.getLogger(CsvimIT.class);

private static final String UNDEFINIED_TABLE_NAME = "TEST_TABLE_READERS2";
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;

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;

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 All @@ -34,7 +35,6 @@ class BPMStarterTemplateIT extends UserInterfaceIntegrationTest {
private static final String TRIGGER_PROCESS_FORM_FILENAME = "trigger-new-process.form";
private static final String TRIGGER_PROCESS_FORM_PATH =
"/services/web/" + TEST_PROJECT + "/gen/trigger-new-process/forms/trigger-new-process/index.html";

private static final String PARAM_1_ID = "param1Id";
private static final String PARAM_2_ID = "param2Id";
private static final String PARAM_1_VALUE = "string-param-value";
Expand All @@ -43,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 @@ -9,10 +9,15 @@
*/
package org.eclipse.dirigible.integration.tests.ui.tests;

import org.eclipse.dirigible.commons.config.Configuration;
import org.junit.jupiter.api.Test;

class CreateNewProjectIT extends UserInterfaceIntegrationTest {

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

@Test
void testCreateNewBlankProject() {
ide.createNewBlankProject("create-project-ui-test");
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 All @@ -24,13 +25,15 @@ class CustomSecurityIT extends UserInterfaceIntegrationTest {

private static final String EMPLOYEE_ROLE = "employee";
private static final String EMPLOYEE_USERNAME = "test-employee";

private static final String EMPLOYEE_MANAGER_ROLE = "employee-manager";
private static final String EMPLOYEE_MANAGER_USERNAME = "test-employee-manager";

private static final String PROTECTED_PAGE_PATH = "/services/web/dirigible-test-project/security/protected_page.html";
private static final String PROTECTED_PAGE_HEADER = "This is a protected page";

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

@Autowired
private TestProject testProject;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
*/
package org.eclipse.dirigible.integration.tests.ui.tests;

import org.eclipse.dirigible.commons.config.Configuration;
import org.eclipse.dirigible.tests.framework.HtmlElementType;
import org.junit.jupiter.api.Test;

class DirigibleHomepageIT extends UserInterfaceIntegrationTest {

private static final String ECLIPSE_DIRIGIBLE_HEADER = "Eclipse Dirigible";

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

@Test
void testOpenHomepage() {
ide.openHomePage();
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,23 @@

class MultitenancyIT extends UserInterfaceIntegrationTest {

@BeforeAll
public static void setUp() {
Configuration.set(DirigibleConfig.MULTI_TENANT_MODE_ENABLED.getKey(), "true");
static {
Configuration.set("DIRIGIBLE_HOME_URL", "services/web/ide/");
}

@Autowired
private TestProject testProject;

@Autowired
@DefaultTenant
private Tenant defTenant;

@Autowired
private BrowserFactory browserFactory;

@BeforeAll
public static void setUp() {
Configuration.set(DirigibleConfig.MULTI_TENANT_MODE_ENABLED.getKey(), "true");
}

@Test
void testOpenNotRegisteredTenant() {
Browser browser = browserFactory.createBySubdomain("unregistered-tenant");
Expand Down

0 comments on commit a4575e9

Please sign in to comment.