Skip to content

Commit d896a1b

Browse files
russelljtdyerjouni
andauthored
Minor Clean-Up: testing to upgrading (#2732)
Co-authored-by: Jouni Koivuviita <jouni@vaadin.com>
1 parent fc1af3e commit d896a1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+412
-439
lines changed

.github/styles/Vaadin/Abbr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ exceptions:
5454
- MDN
5555
- MIME
5656
- MPR
57+
- MVC
5758
- OCR
5859
- PATH
5960
- PDF

.github/styles/Vaadin/So.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
extends: existence
2-
message: "Don't start a sentence with '%s'."
1+
extends: substitution
2+
message: "Don't start a sentence with 'So'."
33
level: warning
44
scope: sentence
5-
raw:
6-
- '(?:[;-]\s)so[\s,]|\bSo[\s,]'
5+
swap:
6+
# Allow 'So far'
7+
'(?:[;-]\s)so[\s,]\W|\bSo,?\s?\w+': 'So far'

.github/styles/Vaadin/Terms.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ swap:
2525
'front-end(?! code| dependency| dependencies| development| developers?| teams?| sources?| resources?| files?| build| states?| tests?| testing| servers?| proxy| proxies| changes?| bundle| reloading| directory| directories| packages?| modules?| installation| customizations?| re-customizations?| compilation| services?| logic| applications?| traces?| spans?| endpoints?| tools?)': frontend
2626
grayed-out: unavailable
2727
NPM: npm
28-
open-source: open source
28+
# open-source: open source
2929
regex: regular expression
3030
repo: repository
3131
timeframe: time frame

articles/api.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,71 @@
11
---
22
title: API Reference
3+
description: Links to Application Programming Interface documentation.
34
order: 999
45
layout: index
56
---
67

8+
79
= API Reference
810
:toclevels: 2
911

1012
The Application Programming Interface (API) documentation for all Java classes and interfaces.
1113

1214
link:http://vaadin.com/api/platform/{moduleMavenVersion:com.vaadin:vaadin}/index.html[Javadoc, role="button primary water"]
1315

16+
1417
== Shortcuts
1518

1619
Below are shortcuts to certain parts of the API documentation.
1720

1821

19-
2022
[.cards.quiet]
2123
=== Flow
2224

25+
2326
[.card]
2427
==== Binder
2528
link:http://vaadin.com/api/platform/{moduleMavenVersion:com.vaadin:vaadin}/com/vaadin/flow/data/binder/package-summary.html[`com.vaadin.flow.data.binder`]
2629

30+
2731
[.card]
2832
==== DataProvider
2933
link:http://vaadin.com/api/platform/{moduleMavenVersion:com.vaadin:vaadin}/com/vaadin/flow/data/provider/package-summary.html[`com.vaadin.flow.data.provider`]
3034

35+
3136
[.card]
3237
==== Router
3338
link:http://vaadin.com/api/platform/{moduleMavenVersion:com.vaadin:vaadin}/com/vaadin/flow/router/package-summary.html[`com.vaadin.flow.router`]
3439

3540

36-
3741
[.cards.quiet]
3842
=== Design System
3943

44+
4045
[.card]
4146
==== Components
4247
Links to component API docs are under the "API" page for each component.
4348
xref:{articles}/components#[Browse components]
4449

4550

46-
4751
[.cards.quiet]
4852
=== Collaboration Kit
4953

54+
5055
[.card]
5156
==== Core API
5257
link:http://vaadin.com/api/platform/{moduleMavenVersion:com.vaadin:vaadin}/com/vaadin/collaborationengine/package-summary.html[`com.vaadin.collaborationengine`]
5358

5459

55-
5660
[.cards.quiet]
5761
=== TestBench
5862

63+
5964
[.card]
6065
==== Core API
6166
link:http://vaadin.com/api/com.vaadin/vaadin-testbench-core/[`com.vaadin.testbench`]
6267

68+
6369
[.card]
6470
==== Component API
6571
link:http://vaadin.com/api/com.vaadin/vaadin-components-testbench/[`com.vaadin.flow.component.*.testbench`]

articles/compatibility.adoc

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ order: 901
77

88
= List of Supported Technologies
99

10-
This page shows the minimum required versions of supported technologies for *Vaadin 24*. See the http://github.com/vaadin/platform/releases/tag/24.0.0[release notes] for more details.
11-
12-
pass:[<!-- vale Vaadin.Abbr = NO -->]
10+
This page shows the minimum required versions of supported technologies for Vaadin 24. See the http://github.com/vaadin/platform/releases/tag/24.0.0[release notes] for more details.
1311

1412
[cols="1,1"]
1513
|===
@@ -21,16 +19,16 @@ pass:[<!-- vale Vaadin.Abbr = NO -->]
2119
| Maven| 3.5 or later (except for 3.8.2 and 3.8.3)
2220
| Gradle| 7.5 or later
2321
| Servlet| 6 or later
24-
| Application servers
25-
a|
26-
27-
* Apache Tomcat 10.1
28-
* Open Liberty 23.0.0.1-beta
29-
* RedHat JBoss EAP 8.0 beta
30-
* WildFly 27
31-
* Jetty 11
32-
* Payara Server 6
33-
* Payara Micro 6
22+
| Application Servers
23+
a|
24+
25+
- Apache Tomcat 10.1
26+
- Open Liberty 23.0.0.1-beta
27+
- RedHat JBoss Enterprise Application Platform (EAP) 8.0 beta
28+
- WildFly 27
29+
- Jetty 11
30+
- Payara Server 6
31+
- Payara Micro 6
3432
| Portlet| Not supported yet
3533
| OSGi| Not supported yet
3634
| Karaf| Not supported yet
@@ -62,5 +60,3 @@ Vaadin 24 is supported by several web browsers. The following is a list of compa
6260
| Chrome | Evergreen
6361
| Safari | 15 or later
6462
|===
65-
66-
pass:[<!-- vale Vaadin.Abbr = YES -->]

articles/components/charts/migrating-from-earlier-versions.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ See the <<css-styling#,CSS Styling guide>> for detailed instructions.
7474

7575
=== Running Charts 9 in Vaadin 14
7676

77-
Although Charts 9 was released in a later Vaadin version, you can use it in a Vaadin 14 project in *npm mode* by overriding the version number in the `pom.xml` file:
77+
Although Charts 9 was released in a later Vaadin version, you can use it in a Vaadin 14 project in *npm mode* by overriding the version number in the [filename]`pom.xml` file:
7878

7979
.pom.xml
8080
[source,xml]

articles/components/charts/svg-generator.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This allows you to generate an SVG string of any chart, using a [classname]`Conf
1111

1212
== Installing
1313

14-
Add the `vaadin-charts-flow-svg-generator` dependency to your project's `pom.xml` as follows:
14+
Add the `vaadin-charts-flow-svg-generator` dependency to your project's [filename]`pom.xml` as follows:
1515

1616
[source,xml]
1717
----

articles/styling/advanced/multi-app-themes.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ An <<../application-theme#, application theme>> can be used in multiple applicat
2222
└── pom.xml
2323
----
2424

25-
2: Update `pom.xml` as follows:
25+
2: Update [filename]`pom.xml` as follows:
2626

2727
. Configure the theme library's identifiers and packaging format.
2828
. Configure the Vaadin platform version.
@@ -98,7 +98,7 @@ See Vaadin's <<{articles}/integrations/spring/configuration#special-configuratio
9898

9999
4: Create the JAR file by running the command `mvn install` in the project root folder. The file will be generated in the `target` sub-folder.
100100

101-
To use the packaged theme in an application, add the JAR as a dependency in the application project's `pom.xml`, and apply the theme either using the <<../application-theme#applying-a-theme, @Theme annotation>>, or in `theme.json` as a <<parent-and-sub-themes#, parent-theme>> to the application's own theme.
101+
To use the packaged theme in an application, add the JAR as a dependency in the application project's [filename]`pom.xml`, and apply the theme either using the <<../application-theme#applying-a-theme, @Theme annotation>>, or in `theme.json` as a <<parent-and-sub-themes#, parent-theme>> to the application's own theme.
102102

103103
.Application project pom.xml
104104
[source,xml]

articles/testing/end-to-end/advanced-concepts.adoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
---
2-
title: Advanced Testing Methods
2+
title: Advanced Testing Methods
3+
description: Describes advanced methods for testing a project.
34
order: 80
45
---
56

7+
68
= Advanced Testing Methods
79

810
There are a few advanced testing methods you may want to consider: waiting for Vaadin; waiting until a particular condition is met; scrolling; profiling test execution time; and running tests in parallel.
911

1012
These testing methods aren't typically needed. For example, situations in which you might need to disable automatic waiting or scrolling in a view are rare. In such cases, you've probably encountered a bug in the software. Nevertheless, these testing methods are explained here for when they are needed.
1113

14+
1215
== Waiting for Vaadin
1316

1417
Web pages are typically loaded and rendered immediately by the browser. In such applications, you can test the page elements immediately after the page is loaded. In Vaadin and other Single-Page Applications (SPAs), rendering is done by JavaScript code, asynchronously. Therefore, you need to wait until the server has given its response to an AJAX request and the JavaScript code finishes rendering the UI.
@@ -33,7 +36,7 @@ testBench(driver).waitForVaadin();
3336
You can re-enable waiting in the same interface with [methodname]`enableWaitForVaadin()`.
3437

3538

36-
== Waiting Until a Condition is Met
39+
== Waiting for Condition's Met
3740

3841
In addition to waiting for Vaadin, it's also possible to wait until a condition is met. For example, you might want to wait until an element is visible on the web page. That might be done like so:
3942

@@ -65,7 +68,6 @@ Furthermore, in Vaadin applications there are two sides which need to be profile
6568
The `TestBenchCommands` interface offers the following methods for profiling test execution time:
6669

6770
[methodname]`totalTimeSpentServicingRequests()`:: This returns the total time in milliseconds spent servicing requests in the application on the server side. The timer starts when you first navigate to the application and hence start a new session. The time passes only when servicing requests for the particular session.
68-
6971
+
7072
If you're also interested in the client-side performance for the last request, you must call [methodname]`timeSpentRenderingLastRequest()` before calling this method. It's necessary because this method makes an extra server request, which causes an empty response to be rendered.
7173

@@ -83,7 +85,6 @@ If you also call [methodname]`timeSpentServicingLastRequest()` or [methodname]`t
8385

8486
The following example is given in the `link:http://github.com/vaadin/testbench-demo/blob/master/src/test/java/com/vaadin/testbenchexample/VerifyExecutionTimeITCase.java[VerifyExecutionTimeITCase.java]` file in the TestBench demo:
8587

86-
8788
[source,java]
8889
----
8990
@Test
@@ -128,6 +129,7 @@ public void verifyServerExecutionTime() throws Exception {
128129
}
129130
----
130131

132+
131133
== Running Tests in Parallel
132134

133135
TestBench supports parallel tests execution using its own test runner (JUnit 4) or native link:http://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution[JUnit 5 parallel execution].
@@ -145,12 +147,14 @@ If your tests don't work in parallel, set the `com.vaadin.testbench.Parameters.t
145147

146148
[role="since:com.vaadin:vaadin@V24"]
147149

150+
148151
=== Using Native JUnit 5 Parallel Execution
149152

150153
To run tests in parallel, extend the TestBench utility class `BrowserTestBase` or manually annotate test classes with `@Execution(ExecutionMode.CONCURRENT)`.
151154

152155
To disable parallel execution, annotate the test class with `@Execution(ExecutionMode.SAME_THREAD)`.
153156

157+
154158
=== Accessing WebDriver and Additional Test Information
155159

156160
Using JUnit 5, it is possible to access additional test information in a method annotated with `@Test`, `@BeforeEach`, `@AfterEach`, `@BeforeAll`, or `@AfterAll` by adding the `BrowserTestInfo` method parameter. Here is an example of this:

articles/testing/end-to-end/bdd.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
title: Behavior-Driven Development
3+
description: A method of developing software starting with writing tests in plain spoken language.
34
order: 100
45
---
56

7+
68
= Behavior-Driven Development
79

810
Behavior-Driven Development (BDD) is a development methodology based on test-driven development, where development starts from writing tests for the software-to-be. BDD involves using a _ubiquitous language_ to communicate between business goals (i.e., the desired behavior) and tests to ensure that the software fulfills those goals.
@@ -13,15 +15,14 @@ Stories can be expressed as number of _scenarios_ that describe different cases
1315

1416
pass:[<!-- vale Vaadin.FirstPerson = NO -->]
1517

16-
* _Given_ that I have calculator open,
18+
- _Given_ that I have calculator open,
1719

18-
* _When_ I push calculator buttons,
20+
- _When_ I push calculator buttons,
1921

20-
* _Then_ the display should show the result.
22+
- _Then_ the display should show the result.
2123

2224
pass:[<!-- vale Vaadin.FirstPerson = YES -->]
2325

24-
2526
This kind of formalization is realized in the JBehave BDD framework for Java. The TestBench Demo includes a JBehave example, where the above scenario is written as the link:http://github.com/vaadin/testbench-demo/blob/master/src/test/java/com/vaadin/testbenchexample/bdd/CalculatorSteps.java[following test class]:
2627

2728
[.example]

0 commit comments

Comments
 (0)