This is an automated email from the ASF dual-hosted git repository.

rantunes pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-tools-temporary-rnd-do-not-use.git

commit 679f664df2534b42b0ecc39bcafe28def1a8ee49
Author: Tomáš David <[email protected]>
AuthorDate: Mon Nov 27 10:43:41 2023 +0100

    KOGITO-9962: Add Temporarily unexpire M118 flags to Chrome extension tests 
(#2067)
    
    Signed-off-by: Tomas David <[email protected]>
---
 README.md                                                           | 4 ++--
 packages/chrome-extension-test-helper/src/utils/tools/Driver.ts     | 6 +++++-
 .../drools-wb-scenario-simulation-editor-kogito-runtime/README.md   | 1 +
 .../drools-wb-scenario-simulation-editor-kogito-testing/README.md   | 1 +
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 820bb6cd5b..82ba168fe3 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ The KIE Tools project contains several applications. To 
develop each one of them
 1. After you've successfully built the project following the instructions 
above, open the `packages/chrome-extension-pack-kogito-kie-editors` folder on 
your favourite IDE. You can import the entire repo as well if you want to make 
changes to other packages.
 2. Run `pnpm build:dev` on 
`packages/chrome-extension-pack-kogito-kie-editors`. This will create a version 
of the Chrome Extension that fetches the envelope locally.
 3. Open a terminal and run `pnpm start` on 
`packages/chrome-extension-pack-kogito-kie-editors`. This will start a `webpack 
serve` instance with the editors and their envelope. We use that because we 
don't pack the Chrome Extension bundle with the editors inside. Instead, we 
fetch them from GitHub pages.
-4. You also have to enable invalid certificates for resources loaded from 
localhost in your browser. To do that, go to 
`chrome://flags/#allow-insecure-localhost` in your Chrome browser and enable 
this flag. Alternativelly, you can go to `https://localhost:9001` and add an 
exception.
+4. You also have to enable invalid certificates for resources loaded from 
localhost in your browser. To do that, go to 
`chrome://flags/#temporary-unexpire-flags-m118` in your Chrome browser, enable 
this flag and restart browser. Then go to 
`chrome://flags/#allow-insecure-localhost` in your Chrome browser and enable 
also this flag. Alternativelly, you can go to `https://localhost:9001` and add 
an exception.
 5. Open Chrome and go to `chrome://extensions`. Enable "Developer mode" in the 
top-right corner and click on "Load unpacked". Choose the 
`packages/chrome-extension-pack-kogito-kie-editors/dist` folder.
 6. From now on you can use the development version of the extension. 
**Remember!** After each change, you have to rebuild the changed modules and 
hit the "Refresh" button of the extension card.
 
@@ -95,7 +95,7 @@ The KIE Tools project contains several applications. To 
develop each one of them
 1. After you've successfully built the project following the instructions 
above, open the `packages/chrome-extension-serverless-workflow-editor` folder 
on your favourite IDE. You can import the entire repo as well if you want to 
make changes to other packages.
 1. Run `pnpm build:dev` on 
`packages/chrome-extension-serverless-workflow-editor`. This will create a 
version of the Chrome Extension that fetches the envelope locally.
 1. Open a terminal and run `pnpm start` on 
`packages/chrome-extension-serverless-workflow-editor`. This will start a 
`webpack serve` instance with the editors and their envelope. We use that 
because we don't pack the Chrome Extension bundle with the editors inside. 
Instead, we fetch them from GitHub pages.
-1. You also have to enable invalid certificates for resources loaded from 
localhost in your browser. To do that, go to 
`chrome://flags/#allow-insecure-localhost` in your Chrome browser and enable 
this flag. Alternativelly, you can go to `https://localhost:9000` and add an 
exception.
+1. You also have to enable invalid certificates for resources loaded from 
localhost in your browser. To do that, go to 
`chrome://flags/#temporary-unexpire-flags-m118` in your Chrome browser, enable 
this flag and restart browser. Then go to 
`chrome://flags/#allow-insecure-localhost` in your Chrome browser and enable 
also this flag. Alternativelly, you can go to `https://localhost:9000` and add 
an exception.
 1. Open Chrome and go to `chrome://extensions`. Enable "Developer mode" in the 
top-right corner and click on "Load unpacked". Choose the 
`packages/chrome-extension-serverless-workflow-editor/dist` folder.
 1. From now on you can use the development version of the extension. 
**Remember!** After each change, you have to rebuild the changed modules and 
hit the "Refresh" button of the extension card.
 
diff --git a/packages/chrome-extension-test-helper/src/utils/tools/Driver.ts 
b/packages/chrome-extension-test-helper/src/utils/tools/Driver.ts
index e5892214d3..27b4ff6b9b 100644
--- a/packages/chrome-extension-test-helper/src/utils/tools/Driver.ts
+++ b/packages/chrome-extension-test-helper/src/utils/tools/Driver.ts
@@ -43,7 +43,11 @@ export default class Driver {
 
     // init chrome options
     const chromeOptions: Options = new Options();
-    chromeOptions.addArguments("--load-extension=" + chromeExtensionPath, 
"--allow-insecure-localhost");
+    chromeOptions.addArguments(
+      "--load-extension=" + chromeExtensionPath,
+      "--enable-features=UnexpireFlagsM118",
+      "--allow-insecure-localhost"
+    );
 
     // init chrome driver log
     const LOGS_DIR: string = resolve("dist-e2e-tests", "logs");
diff --git 
a/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/README.md
 
b/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/README.md
index 66b14b5668..b3989a511b 100644
--- 
a/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/README.md
+++ 
b/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/README.md
@@ -10,6 +10,7 @@ Some minimal tests may be done in the following way:
 2. open the 
`drools-wb/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/target/drools-wb-scenario-simulation-editor-kogito-runtime/index.html`
 file inside Chrome
 3. inside the Chrome dev console, issue the command 
`$wnd.gwtEditorBeans.get("ScenarioSimulationEditor").get().setContent("", "")`; 
this will create a new - empty - scesim file.
 4. Some tricks: to avoid CORS and other policy-related issues:
+   - enable chrome://flags/#temporary-unexpire-flags-m118 flag
    - set chrome://flags/#allow-insecure-localhost for invalid certificates 
error
    - start chrome from cli with the command `chrome 
--allow-file-access-from-files` to allow loading from file.
    - Open index.html file:///(path_to_file)/index.html and get no dev 
compilation error.
diff --git 
a/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-testing/README.md
 
b/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-testing/README.md
index 66b14b5668..b3989a511b 100644
--- 
a/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-testing/README.md
+++ 
b/packages/stunner-editors/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-testing/README.md
@@ -10,6 +10,7 @@ Some minimal tests may be done in the following way:
 2. open the 
`drools-wb/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-kogito-runtime/target/drools-wb-scenario-simulation-editor-kogito-runtime/index.html`
 file inside Chrome
 3. inside the Chrome dev console, issue the command 
`$wnd.gwtEditorBeans.get("ScenarioSimulationEditor").get().setContent("", "")`; 
this will create a new - empty - scesim file.
 4. Some tricks: to avoid CORS and other policy-related issues:
+   - enable chrome://flags/#temporary-unexpire-flags-m118 flag
    - set chrome://flags/#allow-insecure-localhost for invalid certificates 
error
    - start chrome from cli with the command `chrome 
--allow-file-access-from-files` to allow loading from file.
    - Open index.html file:///(path_to_file)/index.html and get no dev 
compilation error.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to