Skip to content

Commit fd9242b

Browse files
authored
Fix prettier version and formatting in .md files of E2E tests (#23411)
Signed-off-by: Dmytro Nochevnov <dnochevn@redhat.com>
1 parent fcf5867 commit fd9242b

5 files changed

Lines changed: 53 additions & 67 deletions

File tree

.github/workflows/pr-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
# remove build-in images form the VM becqause it is not used
4646
docker rmi -f $(docker images -aq)
4747
48-
- name: Configuring nodejs 16.x version
48+
- name: Configuring nodejs 18.x version
4949
uses: actions/setup-node@v3
5050
with:
51-
node-version: '16'
51+
node-version: '18'
5252

5353
- name: Check compilation errors
5454
run: |

tests/e2e/CODE_STYLE.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,24 @@
66

77
Coding standards offer several advantages, including:
88

9-
1. Increase Code Quality: By adhering to coding standards, developers can create code that is more secure, efficient,
10-
maintainable, and uniform. This, in turn, can result in fewer errors and improved overall performance.
9+
1. Increase Code Quality: By adhering to coding standards, developers can create code that is more secure, efficient, maintainable, and uniform. This, in turn, can result in fewer errors and improved overall performance.
1110

12-
2. Improved Readability and Maintainability: Coding standards contribute to code that is more comprehensible and easier
13-
to maintain. Consistently formatted code aids other developers in comprehending and modifying it, saving time and
14-
reducing the likelihood of introducing errors.
11+
2. Improved Readability and Maintainability: Coding standards contribute to code that is more comprehensible and easier to maintain. Consistently formatted code aids other developers in comprehending and modifying it, saving time and reducing the likelihood of introducing errors.
1512

16-
3. Accelerated Development: The adherence to coding standards can expedite the development process. When developers
17-
adhere to a predefined set of guidelines, they can produce code more swiftly and with fewer mistakes. Additionally,
18-
uniform code formatting facilitates the identification and resolution of issues.
13+
3. Accelerated Development: The adherence to coding standards can expedite the development process. When developers adhere to a predefined set of guidelines, they can produce code more swiftly and with fewer mistakes. Additionally, uniform code formatting facilitates the identification and resolution of issues.
1914

20-
4. Better Scalability: Coding standards facilitate the creation of scalable code, simplifying the incorporation of new
21-
features or updates. Consistent coding practices also streamline code maintenance as the codebase expands.
15+
4. Better Scalability: Coding standards facilitate the creation of scalable code, simplifying the incorporation of new features or updates. Consistent coding practices also streamline code maintenance as the codebase expands.
2216

23-
5. Elevated Collaboration and Communication: Uniform guidelines encourage better understanding and manipulation of code
24-
written by fellow developers. This fosters smoother teamwork and facilitates the sharing of code.
17+
5. Elevated Collaboration and Communication: Uniform guidelines encourage better understanding and manipulation of code written by fellow developers. This fosters smoother teamwork and facilitates the sharing of code.
2518

26-
6. Consistency Across Projects: The adoption of coding standards guarantees a consistent coding approach across various
27-
projects. This simplifies the task of upholding code quality, transitioning between tasks, and fostering
28-
collaborative work.
19+
6. Consistency Across Projects: The adoption of coding standards guarantees a consistent coding approach across various projects. This simplifies the task of upholding code quality, transitioning between tasks, and fostering collaborative work.
2920

3021
### Automated tools
3122

32-
Automated lint checking and code format performs with ESLint and Prettier tools before every commit using Husky
33-
pre-commit hook.
34-
Full set of rules can be found:
23+
Automated lint checking and code format performs with ESLint and Prettier tools before every commit using Husky pre-commit hook. Full set of rules can be found:
3524

36-
- [.eslintrc](.eslintrc.js)
37-
- [.prettierrc](.prettierrc.json)
25+
- [.eslintrc](.eslintrc.js)
26+
- [.prettierrc](.prettierrc.json)
3827

3928
### Preferable code style
4029

tests/e2e/README.md

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22

33
## Requirements
44

5-
- node 16.x
6-
- "Chrome" browser 114.x or later
7-
- deployed Che 7 with accessible URL
5+
- node 16.x
6+
- "Chrome" browser 114.x or later
7+
- deployed Che 7 with accessible URL
88

99
## Before launch
1010

1111
**Perform commands:**
1212

13-
- `export TS_SELENIUM_BASE_URL=<Che7 URL>`
14-
- `npm ci`
13+
- `export TS_SELENIUM_BASE_URL=<Che7 URL>`
14+
- `npm ci`
1515

1616
Note: If there is any modifications in package.json, manually execute the `npm install` to update the package-lock.json. So that errors can be avoided while executing npm ci
1717

1818
## Default launch
1919

20-
- Provide connection credentials:
21-
- `export TS_SELENIUM_OCP_USERNAME=<username>`
22-
- `export TS_SELENIUM_OCP_PASSWORD=<password>`
23-
- `npm run test`
20+
- Provide connection credentials:
21+
- `export TS_SELENIUM_OCP_USERNAME=<username>`
22+
- `export TS_SELENIUM_OCP_PASSWORD=<password>`
23+
- `npm run test`
2424

2525
## Custom launch
2626

27-
- Use environment variables which described in the "constants" folder
28-
- Use environment variables for setting timeouts if needed. You can see the list in **`'TimeoutConstants.ts'`**. You can see the list of those variables and their value if you set the `'TS_SELENIUM_PRINT_TIMEOUT_VARIABLES = true'`
29-
- To test one specification export file name as `export USERSTORY=<spec-file-name-without-extension> && npm run test` (example: `-e USERSTORY=Quarkus`)
30-
- To run test without Selenium WebDriver (API tests etc.) use `export USERSTORY=<spec-file-name-without-extension> && npm run driver-less-test` (example: `-e USERSTORY=CloneGitRepoAPI`)
31-
- This project support application testing deployed on Kubernetes or Openshift platform. Openshift is default value. To switch into Kubernetes, please, use `TS_PLATFORM=kubernetes` environmental variable and `TS_SELENIUM_K8S_PASSWORD`, `TS_SELENIUM_K8S_USERNAME` to provide credentials. The sample of test command in this case:
27+
- Use environment variables which described in the "constants" folder
28+
- Use environment variables for setting timeouts if needed. You can see the list in **`'TimeoutConstants.ts'`**. You can see the list of those variables and their value if you set the `'TS_SELENIUM_PRINT_TIMEOUT_VARIABLES = true'`
29+
- To test one specification export file name as `export USERSTORY=<spec-file-name-without-extension> && npm run test` (example: `-e USERSTORY=Quarkus`)
30+
- To run test without Selenium WebDriver (API tests etc.) use `export USERSTORY=<spec-file-name-without-extension> && npm run driver-less-test` (example: `-e USERSTORY=CloneGitRepoAPI`)
31+
- This project support application testing deployed on Kubernetes or Openshift platform. Openshift is default value. To switch into Kubernetes, please, use `TS_PLATFORM=kubernetes` environmental variable and `TS_SELENIUM_K8S_PASSWORD`, `TS_SELENIUM_K8S_USERNAME` to provide credentials. The sample of test command in this case:
3232
```
3333
export TS_PLATFORM=kubernetes && \
3434
export TS_SELENIUM_K8S_USERNAME=<username> && \
@@ -37,52 +37,50 @@ Note: If there is any modifications in package.json, manually execute the `npm i
3737
npm run test
3838
```
3939
Also, environmental variables can be set in files in "constants" folder.
40-
- Local test results can be represented with Allure reporter `npm run open-allure-dasboard`
40+
- Local test results can be represented with Allure reporter `npm run open-allure-dasboard`
4141
4242
## Docker launch
4343
44-
- open terminal and go to the "e2e" directory
45-
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url
46-
- run command `"npm run test-docker"`
44+
- open terminal and go to the "e2e" directory
45+
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url
46+
- run command `"npm run test-docker"`
4747
4848
## Docker launch with changed tests
4949
5050
**For launching tests with local changes perform next steps:**
5151
52-
- open terminal and go to the "e2e" directory
53-
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url
54-
- run command `"npm run test-docker-mount-e2e"`
52+
- open terminal and go to the "e2e" directory
53+
- export the `"TS_SELENIUM_BASE_URL"` variable with "Che" url
54+
- run command `"npm run test-docker-mount-e2e"`
5555
5656
## Debug docker launch
5757
5858
The `'eclipse/che-e2e'` docker image has VNC server installed inside. For connecting use `'0.0.0.0:5920'` address.
5959
6060
## The "Happy Path" scenario launching
6161
62-
**The easiest way to do that is to perform steps which are described in the "Docker launch" paragraph.
63-
For running tests without docker, please perform next steps:**
62+
**The easiest way to do that is to perform steps which are described in the "Docker launch" paragraph. For running tests without docker, please perform next steps:**
6463
65-
- Deploy Che on Kubernetes infrastructure by using 'Minikube' and 'Chectl' <https://github.com/eclipse-che/che-server/blob/HEAD/deploy/kubernetes/README.md>
66-
- Create workspace by using 'Chectl' and devfile
67-
- link to 'Chectl' manual <https://github.com/che-incubator/chectl#chectl-workspacestart>
68-
- link to devfile ( **`For successfull test passing, exactly provided devfile should be used`** )
69-
<https://gist.githubusercontent.com/Ohrimenko1988/93f5426f4ebc1705c55feb8ff0396a49/raw/cbea89ad145ba33ed34a151a12c50f045f9f3b78/yaml-ls-bug.yaml>
70-
- Provide the **`'TS_SELENIUM_BASE_URL'`** environment variable as described above
71-
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts)
72-
- perform command **`export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`**
64+
- Deploy Che on Kubernetes infrastructure by using 'Minikube' and 'Chectl' <https://github.com/eclipse-che/che-server/blob/HEAD/deploy/kubernetes/README.md>
65+
- Create workspace by using 'Chectl' and devfile
66+
- link to 'Chectl' manual <https://github.com/che-incubator/chectl#chectl-workspacestart>
67+
- link to devfile ( **`For successfull test passing, exactly provided devfile should be used`** ) <https://gist.githubusercontent.com/Ohrimenko1988/93f5426f4ebc1705c55feb8ff0396a49/raw/cbea89ad145ba33ed34a151a12c50f045f9f3b78/yaml-ls-bug.yaml>
68+
- Provide the **`'TS_SELENIUM_BASE_URL'`** environment variable as described above
69+
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts)
70+
- perform command **`export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`**
7371
7472
## Launching the DevWorkspaceHappyPath spec file using Che with oauth authentication
7573
7674
**Setup next environment variables:**
7775
78-
- export TS_SELENIUM_BASE_URL=\<Che-URL\>
79-
- export TS_SELENIUM_OCP_USERNAME=\<cluster-username\>
80-
- export TS_SELENIUM_OCP_PASSWORD=\<cluster-password\>
81-
- export TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true"
82-
- export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=\<login-provide-title\>
83-
- export TS_SELENIUM_DEVWORKSPACE_URL=\<devworkspace-url\>
84-
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts)
76+
- export TS_SELENIUM_BASE_URL=\<Che-URL\>
77+
- export TS_SELENIUM_OCP_USERNAME=\<cluster-username\>
78+
- export TS_SELENIUM_OCP_PASSWORD=\<cluster-password\>
79+
- export TS_SELENIUM_VALUE_OPENSHIFT_OAUTH="true"
80+
- export TS_OCP_LOGIN_PAGE_PROVIDER_TITLE=\<login-provide-title\>
81+
- export TS_SELENIUM_DEVWORKSPACE_URL=\<devworkspace-url\>
82+
- export TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME=EmptyWorkspace (default value, see BASE_TEST_CONSTANTS.ts)
8583
8684
**Execute the npm command:**
8785
88-
- perform command `export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`
86+
- perform command `export USERSTORY=$TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME && npm run test-all-devfiles`

tests/e2e/package-lock.json

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"mocha-junit-reporter": "^2.2.1",
5555
"mocha-multi-reporters": "^1.5.1",
5656
"monaco-page-objects": "3.9.1",
57-
"prettier": "^3.0.2",
57+
"prettier": "^3.4.0",
5858
"rimraf": "2.6.2",
5959
"selenium-webdriver": "4.6.1",
6060
"shelljs": "^0.8.5",

0 commit comments

Comments
 (0)