You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2026/03/13 12:59:16 UTC
(myfaces-tobago) branch main updated: test: migrate Jasmine tests to Playwright
This is an automated email from the ASF dual-hosted git repository.
hnoeth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/main by this push:
new 80add26e70 test: migrate Jasmine tests to Playwright
80add26e70 is described below
commit 80add26e70cf1423f6574bac6b6b860d0dba5840
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Fri Mar 13 13:58:44 2026 +0100
test: migrate Jasmine tests to Playwright
---
.../content/000-intro/03-intro/Intro.test.ts} | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/000-intro/03-intro/Intro.test.js b/tobago-example/tobago-example-demo/src/test/typescript/content/000-intro/03-intro/Intro.test.ts
similarity index 57%
rename from tobago-example/tobago-example-demo/src/main/webapp/content/000-intro/03-intro/Intro.test.js
rename to tobago-example/tobago-example-demo/src/test/typescript/content/000-intro/03-intro/Intro.test.ts
index 0994cfdec7..b3ee51fb50 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/000-intro/03-intro/Intro.test.js
+++ b/tobago-example/tobago-example-demo/src/test/typescript/content/000-intro/03-intro/Intro.test.ts
@@ -15,15 +15,16 @@
* limitations under the License.
*/
-import {elementByIdFn, querySelectorFn} from "/script/tobago-test.js";
-import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
+import {expect, test} from "@playwright/test";
-it("First section title is 'Intro'", function (done) {
- const titleOfFirstSectionHeader = querySelectorFn("tobago-section h1");
- const introLinkFn = elementByIdFn("page:navigation:nav:1:cmd");
+test.describe("000-intro/03-intro/Intro.xhtml", () => {
- const test = new JasmineTestTool(done);
- test.setup(() => titleOfFirstSectionHeader().textContent.trim() === "Intro", null, "click", introLinkFn);
- test.do(() => expect(titleOfFirstSectionHeader().textContent.trim()).toEqual("Intro"));
- test.start();
+ test.beforeEach(async ({page}) => {
+ await page.goto("/content/000-intro/03-intro/Intro.xhtml");
+ });
+
+ test("First section title is 'Intro'", async ({page}) => {
+ const titleOfFirstSectionHeader = page.locator("tobago-section h1");
+ await expect(titleOfFirstSectionHeader).toHaveText("Intro");
+ });
});