Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 50e8402e authored by rui rodrigues's avatar rui rodrigues
Browse files

change url strategy

parent 07dd881e
No related branches found
No related tags found
No related merge requests found
Pipeline #198553 failed
......@@ -49,10 +49,17 @@ In addition, it can also run tests on the local chrome and edge version.
**resources** should contain config.properties file with sensitive data:
```
//SIMPL-LABS
URL=https://poc-simpl-labs.dev.simpl-europe.eu/data-spaces
USERNAME=
PASSWORD=
SECRET_KEY=
//SIMPL-OPEN
URL_WIZARD=https://sd-creation-wizard.uatpso.com
//COMMON
IS_HEADLESS=false
```
## Writing tests
......@@ -149,6 +156,8 @@ Scenario Outline: a user <userStatus> logs in
### How to run tests
## ATTENTION: BEFORE RUN ANY TEST CONFIGURE PROPERTIES FILE
Run the following command
To simplOpen project
......@@ -192,10 +201,9 @@ scenario.attach(screenshot, "image/png", <title>);
```
### How to add properties file
- Go to directory src/main
- Create a file with name resources
- Go to directory src/main/resources
- Add a file with name config.properties
- Add the information that is needed
- Add the information that is needed (see the chapter [Structure](#structure))
### Conventions
- cucumber tags: each feature file should be a tag with feature name and each test should be tag with test case number and initial letter of feature name (eg. L01 - first scenario to login.feature).
......
package configuration.ui.data.simplOpen;
import framework.common.Config;
public class Wizard {
public static final String URL = "https://sd-creation-wizard.uatpso.com";
public static final String URL = Config.get("URL_WIZARD");
public static final String FILE_PATH = "simplOpen/input-shacl-file.ttl";
public static final String AGE = "30";
public static final String NAME = "Peter";
......
package framework.ui.helpers;
import com.microsoft.playwright.*;
import framework.common.Config;
import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
......@@ -35,8 +36,9 @@ public class UiSetup {
Playwright playwright = Playwright.create();
BrowserType chrome = playwright.chromium();
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
boolean isHeadless = Boolean.parseBoolean(Config.get("IS_HEADLESS"));
browser = chrome.launch(new BrowserType.LaunchOptions()
.setHeadless(false)
.setHeadless(isHeadless)
.setArgs(List.of("--ignore-certificate-errors"))
);
page = browser.newPage();
......
Feature: Catalogue
@TCC1 @SIMPL-2689
Scenario: send query with title parameter to the catalogue
Given the user is authenticated in Federated Catalogue service
When the user sends a "POST" request to "Query" by title parameter
Then the service returns a 200 status code
And all items with title parameter should be returned
# .......
@user
Feature: User
@U01
Scenario: creates a user with success
When the user creates a user
Then the new user should be created
@U02
Scenario: get user Janet information
When the user access to janet information
Then janet information should be displayed
@U03
Scenario: update morpheus information
When the user updates the morpheus information
Then The morpheus information should be updated
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment