+
+
+
diff --git a/packages/runner-playwright/cucumber.cjs b/packages/runner-playwright/cucumber.cjs
index ea49ddde1..09cd87ec2 100644
--- a/packages/runner-playwright/cucumber.cjs
+++ b/packages/runner-playwright/cucumber.cjs
@@ -1,10 +1,11 @@
module.exports = {
default: {
- paths: [ 'e2e/*.feature' ],
+ paths: [ 'e2e/**/*.feature'],
require: [ 'src/cucumber/step_definitions/playwright/**/*.{ts,js}' ],
publishQuiet: true,
format: ['html:report/playwright/cucumber-report.html', 'message:report/cucumber-messages.ndjson', 'html:cucumber-report.html'],
compiler: 'ts:ts-node/register',
requireModule: ['ts-node/register'],
+ tags: 'not @Ignore'
},
};
diff --git a/packages/runner-playwright/e2e/playbook/example1.playbooked.feature b/packages/runner-playwright/e2e/playbook/example1.playbooked.feature
new file mode 100644
index 000000000..78a7cdcf6
--- /dev/null
+++ b/packages/runner-playwright/e2e/playbook/example1.playbooked.feature
@@ -0,0 +1,6 @@
+@Ignore
+Feature: Accessibility Step Definition
+
+ Scenario: key.then.a11y.check.default
+ Given je me connecte3
+ Then I should not see an element with aria-label "[NOT] flegend"
diff --git a/packages/runner-playwright/e2e/playbook/example2.playbooked.feature b/packages/runner-playwright/e2e/playbook/example2.playbooked.feature
new file mode 100644
index 000000000..248f42500
--- /dev/null
+++ b/packages/runner-playwright/e2e/playbook/example2.playbooked.feature
@@ -0,0 +1,10 @@
+@Ignore
+Feature: Accessibility Step Definition
+
+ Scenario: key.then.a11y.check.default
+ Given je me connecte
+ Then I should not see an element with aria-label "[NOT] flegend"
+
+ Scenario: key.then.a11y.check.default
+ Given je me connecte2
+ Then I should not see an element with aria-label "[NOT] flegend"
diff --git a/packages/runner-playwright/e2e/playbook/template/template.playbook.feature b/packages/runner-playwright/e2e/playbook/template/template.playbook.feature
new file mode 100644
index 000000000..bc45ae11b
--- /dev/null
+++ b/packages/runner-playwright/e2e/playbook/template/template.playbook.feature
@@ -0,0 +1,10 @@
+@Ignore
+Feature: Template
+
+ Scenario: je me connecte
+ When I visit path "https://e2e-test-quest.github.io/simple-webapp/?template1"
+ Then I should see an element with aria-label "flegend"
+
+ Scenario: je me connecte3
+ When I visit path "https://e2e-test-quest.github.io/simple-webapp/?template3"
+ Then I should see an element with aria-label "flegend"
diff --git a/packages/runner-playwright/e2e/playbook/template/template2.playbook.feature b/packages/runner-playwright/e2e/playbook/template/template2.playbook.feature
new file mode 100644
index 000000000..34ff5b629
--- /dev/null
+++ b/packages/runner-playwright/e2e/playbook/template/template2.playbook.feature
@@ -0,0 +1,6 @@
+@Ignore
+Feature: Template
+
+ Scenario: je me connecte2
+ When I visit path "https://e2e-test-quest.github.io/simple-webapp/?template2"
+ Then I should see an element with aria-label "flegend"
diff --git a/packages/runner-playwright/generate-playbook-step-definitions.ts b/packages/runner-playwright/generate-playbook-step-definitions.ts
new file mode 100644
index 000000000..1a889235b
--- /dev/null
+++ b/packages/runner-playwright/generate-playbook-step-definitions.ts
@@ -0,0 +1,19 @@
+/**
+* Software Name : UUV
+*
+* SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
+* SPDX-License-Identifier: MIT
+*
+* This software is distributed under the MIT License,
+* the text of which is available at https://spdx.org/licenses/MIT.html
+* or see the "LICENSE" file for more details.
+*
+* Authors: NJAKO MOLOM Louis Fredice & SERVICAL Stanley
+* Software description: Make test writing fast, understandable by any human
+* understanding English or French.
+*/
+
+import { STEP_DEFINITION_FILE_NAME, TEST_RUNNER_ENUM, PlaybookStepDefinition } from "@uuv/runner-commons";
+
+const playbookStepDefinition: PlaybookStepDefinition = new PlaybookStepDefinition(__dirname, TEST_RUNNER_ENUM.PLAYWRIGHT, STEP_DEFINITION_FILE_NAME.BY_SCENARIO_TEMPLATE);
+playbookStepDefinition.runGenerate();
diff --git a/packages/runner-playwright/package.json b/packages/runner-playwright/package.json
index b91a1d5bb..d7b42b945 100644
--- a/packages/runner-playwright/package.json
+++ b/packages/runner-playwright/package.json
@@ -34,6 +34,7 @@
],
"scripts": {
"generate:step-definitions": "ts-node generate-step-definitions.ts",
+ "generate:playbook-step-definitions": "ts-node generate-playbook-step-definitions.ts",
"package": "npm pack --pack-destination=\"../../dist/packages\"",
"postinstall": "node postinstall.js",
"serverTest:run": "ts-node playwright/run-test-app.ts 9002",
diff --git a/packages/runner-playwright/src/cucumber/step_definitions/playwright/_playbook-engine.ts b/packages/runner-playwright/src/cucumber/step_definitions/playwright/_playbook-engine.ts
new file mode 100644
index 000000000..0bf552786
--- /dev/null
+++ b/packages/runner-playwright/src/cucumber/step_definitions/playwright/_playbook-engine.ts
@@ -0,0 +1,16 @@
+/**
+ * Software Name : UUV
+ *
+ * SPDX-FileCopyrightText: Copyright (c) 2022-2023 Orange
+ * SPDX-License-Identifier: MIT
+ *
+ * This software is distributed under the MIT License,
+ * the text of which is available at https://spdx.org/licenses/MIT.html
+ * or see the "LICENSE" file for more details.
+ *
+ * Authors: NJAKO MOLOM Louis Fredice & SERVICAL Stanley
+ * Software description: Make test writing fast, understandable by any human
+ * understanding English or French.
+ */
+
+import { Given } from "@cucumber/cucumber";
diff --git a/packages/runner-playwright/src/cucumber/step_definitions/playwright/base-check-engine.ts b/packages/runner-playwright/src/cucumber/step_definitions/playwright/base-check-engine.ts
index 9b9cf53ae..164742c8d 100644
--- a/packages/runner-playwright/src/cucumber/step_definitions/playwright/base-check-engine.ts
+++ b/packages/runner-playwright/src/cucumber/step_definitions/playwright/base-check-engine.ts
@@ -14,7 +14,7 @@
*/
import { DEFAULT_TIMEOUT, fs, key, KEY_PRESS } from "@uuv/runner-commons";
-import { checkA11y, configureAxe, injectAxe } from "axe-playwright";
+import { checkA11y, injectAxe } from "axe-playwright";
import { Locator } from "playwright";
import { devices, expect } from "@playwright/test";
import { Page } from "playwright";
diff --git a/packages/runner-playwright/src/lib/uuv-cli.ts b/packages/runner-playwright/src/lib/uuv-cli.ts
index c0a5cac0e..f8642a265 100644
--- a/packages/runner-playwright/src/lib/uuv-cli.ts
+++ b/packages/runner-playwright/src/lib/uuv-cli.ts
@@ -21,6 +21,7 @@ import figlet from "figlet";
import minimist from "minimist";
import { run } from "./runner-playwright";
import fs from "fs";
+import { PlaybookStepDefinition, STEP_DEFINITION_FILE_NAME, TEST_RUNNER_ENUM } from "@uuv/runner-commons";
export async function main() {
const PROJECT_DIR = "uuv";
@@ -37,6 +38,9 @@ export async function main() {
case "e2e":
await runE2ETests(argv);
break;
+ case "playbook":
+ await runPlaybook();
+ break;
default:
console.error(chalk.red("Unknown command"));
process.exit(1);
@@ -79,6 +83,11 @@ export async function main() {
});
}
+ async function runPlaybook(): Promise