Skip to content

Conversation

@abhiram-art
Copy link

Description

This PR completes the BDD end-to-end test scenario for user registration, as described in issue #520.

It connects the frontend and backend layers through WebDriverIO and finalizes the register.feature flow to ensure the user registration journey is properly tested end-to-end using Behavior Driven Development (BDD) style.

Fixes: #520


Changes Made

  • Changes in apps folder (specify the app and briefly describe the
    changes):

    • Web
    • Native
    • BDD
  • Updated register.feature with a complete scenario for registering a new user using email

  • Implemented corresponding step definitions in step-definitions/steps.ts:
    - Navigation to register page
    - Ensuring the test email is not already registered
    - Filling out and submitting the form.

Verifying confirmation message

  • Changes in packages folder (specify the package and briefly describe
    the changes):
    • Core

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing
    functionality to not work as expected)
  • 📝 Documentation update (changes)

Screenshots

Before After
"screenshot before" "screenshot after"

How Has This Been Tested?

  • Cypress integration
  • Cypress component tests
  • Jest unit tests

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional Comments

Please review the error for the confirmation message test.

@abhiram-art
Copy link
Author

abhiram-art commented Aug 30, 2025

Not able to understand the format of the confirmation message after signup.

yarn bdd:e2e - test status

Execution of 9 workers started at 2025-08-30T10:29:22.617Z

[0-7] RUNNING in chrome - file:///features/register.feature
[0-6] RUNNING in chrome - file:///features/login.feature
[0-3] 2025-08-30T10:29:24.913Z ERROR @wdio/local-runner: Failed launching test session: Error: Parser errors:
[0-3] (13:7): expected: #EOF, #TableRow, #DocStringSeparator, #StepLine, #TagLine, #ExamplesLine, #ScenarioLine, #RuleLine, #Comment, #Empty, got 'Email content:'
[0-3] at Function.create (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/node_modules/@cucumber/gherkin/src/Errors.ts:42:17)
[0-3] at Parser.parse (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/node_modules/@cucumber/gherkin/src/Parser.ts:145:38)
[0-3] at (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/build/index.js:198:33)
[0-3] at Array.map ()
[0-3] at (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/build/index.js:196:42)
[0-3] at Array.map ()
[0-3] at CucumberAdapter.getGherkinDocuments (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/build/index.js:195:34)
[0-3] at CucumberAdapter.generateDynamicSkipTags (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/build/index.js:207:17)
[0-3] at CucumberAdapter.init (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/build/index.js:217:38)
[0-3] at Object.adapterFactory.init (/Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/cucumber-framework/build/index.js:508:34)
[0-3] SYNCHRONOUS TERMINATION NOTICE: When explicitly exiting the process via process.exit or via a parent process, asynchronous tasks in your exitHooks will not run. Either remove these tasks, use gracefulExit() instead of process.exit(), or ensure your parent process sends a SIGINT to the process running this code.
[0-3] FAILED
[0-7] 2025-08-30T10:29:32.186Z WARN webdriverio: Failed to execute browser.browsingContextLocateNodes({ ... }) due to Error: WebDriver Bidi command "browsingContext.locateNodes" failed with error: unknown error - Unexpected error in selector script: NotSupportedError: Failed to execute 'evaluate' on 'XPathExpression': The node provided is '#document-fragment', which is not a valid context node type., falling back to regular WebDriver Classic command
[0-6] PASSED in chrome - file:///features/login.feature
[0-7] Error in "0: Then I should see a confirmation message"
Error: Expected a registration confirmation message
at file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/webdriverio/build/node.js:5742:15
at async Element.wrapCommandFn (file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/utils/build/index.js:978:23)
at async Element.elementErrorHandlerCallbackFn (file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/webdriverio/build/node.js:8459:24)
at async Element.wrapCommandFn (file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/utils/build/index.js:978:23)
at async World. (/Users/abhiram/Downloads/treetracker-wallet-app/apps/bdd/features/step-definitions/steps.ts:2:2614)
[0-7] FAILED in chrome - file:///features/register.feature

"spec" Reporter:

[chrome 139.0.7258.155 mac #0-6] Running: chrome (v139.0.7258.155) on mac
[chrome 139.0.7258.155 mac #0-6] Session ID: 186a9920dfe2655f3aac608d9e011105
[chrome 139.0.7258.155 mac #0-6]
[chrome 139.0.7258.155 mac #0-6] » features/login.feature
[chrome 139.0.7258.155 mac #0-6] Wallet app login
[chrome 139.0.7258.155 mac #0-6] In order to access my wallet
[chrome 139.0.7258.155 mac #0-6]
[chrome 139.0.7258.155 mac #0-6] Wrong login
[chrome 139.0.7258.155 mac #0-6] ✓ Given I am on the login page
[chrome 139.0.7258.155 mac #0-6] ✓ When I login with foobar and barfoo
[chrome 139.0.7258.155 mac #0-6] ✓ Then I should see text Login failed
[chrome 139.0.7258.155 mac #0-6]
[chrome 139.0.7258.155 mac #0-6] 3 passing (6.3s)

[chrome 139.0.7258.155 mac #0-7] Running: chrome (v139.0.7258.155) on mac
[chrome 139.0.7258.155 mac #0-7] Session ID: 84ee258c58c380adb66a65181eeb5199
[chrome 139.0.7258.155 mac #0-7]
[chrome 139.0.7258.155 mac #0-7] » features/register.feature
[chrome 139.0.7258.155 mac #0-7] Register
[chrome 139.0.7258.155 mac #0-7] New user register by email, social media
[chrome 139.0.7258.155 mac #0-7]
[chrome 139.0.7258.155 mac #0-7] As a new user, I can register new account by email address
[chrome 139.0.7258.155 mac #0-7] ✓ Given I am on the signup page
[chrome 139.0.7258.155 mac #0-7] ✓ And [email protected] is not registered in the system
[chrome 139.0.7258.155 mac #0-7] ✓ When I fill in the registration form with [email protected] and abc.123
[chrome 139.0.7258.155 mac #0-7] ✓ And I click on the signup button
[chrome 139.0.7258.155 mac #0-7] ✖ Then I should see a confirmation message
[chrome 139.0.7258.155 mac #0-7]
[chrome 139.0.7258.155 mac #0-7] 4 passing (16.7s)
[chrome 139.0.7258.155 mac #0-7] 1 failing
[chrome 139.0.7258.155 mac #0-7]
[chrome 139.0.7258.155 mac #0-7] 1) As a new user, I can register new account by email address Then I should see a confirmation message
[chrome 139.0.7258.155 mac #0-7] Error: Expected a registration confirmation message
[chrome 139.0.7258.155 mac #0-7] Error: Expected a registration confirmation message
[chrome 139.0.7258.155 mac #0-7] at file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/webdriverio/build/node.js:5742:15
[chrome 139.0.7258.155 mac #0-7] at async Element.wrapCommandFn (file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/utils/build/index.js:978:23)
[chrome 139.0.7258.155 mac #0-7] at async Element.elementErrorHandlerCallbackFn (file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/webdriverio/build/node.js:8459:24)
[chrome 139.0.7258.155 mac #0-7] at async Element.wrapCommandFn (file:///Users/abhiram/Downloads/treetracker-wallet-app/node_modules/@wdio/utils/build/index.js:978:23)
[chrome 139.0.7258.155 mac #0-7] at async World. (/Users/abhiram/Downloads/treetracker-wallet-app/apps/bdd/features/step-definitions/steps.ts:2:2614)

Spec Files: 1 passed, 2 failed, 6 skipped, 9 total (100% completed) in 00:00:20

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/bin/node
Arguments: /Users/abhiram/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js test
Directory: /Users/abhiram/Downloads/treetracker-wallet-app/apps/bdd
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@dadiorchen
Copy link
Collaborator

@pierrelstan
Copy link
Collaborator

@abhiram-art The key PRIVATE_KEYCLOAK_CLIENT_SECRET is supposed to be private, right?

@abhiram-art
Copy link
Author

abhiram-art commented Aug 30, 2025

@dadiorchen yes, I entered the client secret while setting up the project at the beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish the bdd e2e test for user registration

3 participants