Skip to content

๐Ÿณ๏ธโ€๐ŸŒˆ๐ŸŒ๐Ÿ“ฎ Bangarang is an open source and free direct democracy application based on claim system. Made through ATDD & Hexagonal Architecture principles.

License

Notifications You must be signed in to change notification settings

bbohec/bangarang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Summary

What is Bangarang?

Bangarang is an open source and free direct democratic claim system. It allows anybody to declare or search for claim and claiming for them.

This project uses an iterative product management approach. Previous dev sessions are available in French as DeVLOG on YouTube.

Does Bangarang have a demo?

The current production instance of Bangarang is available here.

How to deploy a new Bangarang instance?

Bangarang is actually configured to be deployed continuously on Vercel with GitHub integration. It means when you make changes on GitHub, Vercel will be triggered to redeploy a new instance of Bangarang depending on the branch you have made the change.

Actually, Bangarang have only one persistent database option based on Google Cloud Platform Datastore technology.

In order to configure Bangarang with your own GCP Datastore instance, you must set the following environment variables:

NODE_ENV=**ENVIRONMENT**
REST_ENDPOINT_FQDN=**NODE INSTANCE FQDN**
REST_ENDPOINT_SHEME=**http or https**
GCP_DATASTORE_PROJECT_ID='{"gcpProjectId":"**YOUR GCP DATASTORE INSTANCE PROJECT ID**"}'
GCP_DATASTORE_CLIENT_EMAIL='{"gcpClientEmail":"**YOUR GCP DATASTORE INSTANCE SERVICE ACCOUNT EMAIL**"}'
GCP_DATASTORE_PRIVATE_KEY='{"gcpPrivateKey":"**YOUR GCP DATASTORE INSTANCE SERVICE ACCOUNT PRIVATE KEY**"}'
GCP_DATASTORE_KIND_PREFIX='{"gcpKindPrefix":"**OPTIONAL GCP KIND PREFIX**"}'

These environment variables can be set through your system and/or with a .env file for development purpose.

Bangarang server will crash during starting if some environment variables are missing.

Install Bangarang

npm install

Develop Bangarang

Bangarang will be executed in a dev/watch way.

npm run dev

Build Bangarang

The build prepare Bangarang optimized artifacts (reduced Tailwind CSS).

npm run build

Run Bangarang

npm run start

Bangarang development practice

Bangarang architecture

Bangarang is developed through the following practices/methodologies (we try to ๐Ÿ˜‰):

  • Clean Code
  • Clean Architecture / Hexagonal Architecture
  • Business Logic
    • Acceptance Test Driven Development (ATDD) based on Behavior Driven Development feature examples/scenarios.
    • Test Driven Development when obvious implementation is not found.
  • Adapters integration.
    • Test After suite created from Fake Adapters
    • Production technology adapters developed from the previous test suite with a test first way.

In that way, we expect that Bangarang can evolve its technology and/or business logic and/or design in a sustainable development.

Language

Bangarang is principally developed with Typescript. But it is also implementing Svelte/Typescript files for front-end components.

Testing library

Bangarang is using Mocha and Chai testing and assertion libraries.

Business logic change

Current Bangarang business logic can be tested through the following command:

npm run test:acceptance

Each feature is described by BDD example scenarios that are at the end translated into code test suite by following the following process:

  • discuss the feature and imagine working and non-working examples
  • write the feature and its examples in a feature text file. Write the feature help people make sure the feature, examples and ubiquitous language are understandable for all. Current features are using a Gherkin or AAA or State/Event/Consequences way of specifying examples
  • translate the text example into a code test suite in an iterative way. Each assertion must be done by following the TDD cycles (Red โ€” Green โ€” Refactor)
  • while features are not added to the project, it is allowed to experiment refactoring sessions
  • features use Clean Architecture design pattern. By default, the feature uses Fake Adapters (in memory). That way, all the business logic can be validated in seconds in order to provide close to instant feedback
  • if a part of the business logic doesn't have an obvious implementation, then a specific unit test suite can be applied in a more TDD baby step approach order to absorb the difficulty.

217 passing (110ms)

Technological change

Current Bangarang technologies can be tested through the integration test suite by executing the following command:

npm run test:integration

Each adapter has its own test suite. The test suite is made in a Test After methodology of testing all methods of the Fake Adapter required by the Business Logic contract (Port interface).

Production adapters that have to implement the Port of the Business Logic are created without implementation and are validated in a Test First/TDD way.

Production Architecture

Front-end details

  • Svelte UI provided by Sapper middleware used on Node.js Express JS back-end server.
  • Style components implements Tailwind CSS classes on HTML parts.
  • Svelte & Sapper component are built with Rollup configuration.
  • The business logic is actually hosted on front-end.
  • It is planned to move the critical business logic into the back-end and use instead simple command/query on backend when required.
  • Business Logic use cases are executed from the User class.
  • The Business Logic interact indirectly with front-end Svelte components by using Svelte Stores (publisher/subscriber svelte components).
  • The Business logic interact with persistent databases by sending Rest requests to the back-end.

Back-end details

  • The express server has HTTP/REST routes used by client business logic in order to execute GCP Adapter methods.
  • It is planned to define command/query use cases on backend.

Project Tree Information

.
โ”œโ”€โ”€โ”€.vscode------------------------Specific VS Code
โ”œโ”€โ”€โ”€doc
โ”‚   โ”œโ”€โ”€โ”€dev------------------------Technical/Developer Documentation
โ”‚   โ”œโ”€โ”€โ”€market---------------------Marketing / Product Documentation
โ”‚   โ”œโ”€โ”€โ”€ui-------------------------User Interface Documentation
โ”‚   โ””โ”€โ”€โ”€ux-------------------------User Experience Documentation
โ”œโ”€โ”€โ”€src
โ”‚   โ”œโ”€โ”€โ”€assets---------------------/!\ Specific Sapper /!\
โ”‚   โ”œโ”€โ”€โ”€client
โ”‚   โ”‚   โ”œโ”€โ”€โ”€adapters---------------Clean Architecture - Client Adapters (Primary & Secondary)
โ”‚   โ”‚   โ”œโ”€โ”€โ”€businessLogic
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€โ”€entities-----------Clean Architecture - Business Logic/Core - Entities
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€โ”€commands-----------Clean Architecture - Business Logic/Core - Use Cases
โ”‚   โ”‚   โ”œโ”€โ”€โ”€components-------------Svelte Components
โ”‚   โ”‚   โ”œโ”€โ”€โ”€interfaces-------------UI/Svelte Specific interfaces excluded from Clean Architecture
โ”‚   โ”‚   โ”œโ”€โ”€โ”€logic------------------UI/Svelte Specific logic excluded from Clean Architecture
โ”‚   โ”‚   โ”œโ”€โ”€โ”€port-------------------Clean Architecture - Ports/Interfaces
โ”‚   โ”‚   โ”œโ”€โ”€โ”€stores-----------------Svelte Stores
โ”‚   โ”‚   โ””โ”€โ”€โ”€views------------------Svelte Specific View Components
โ”‚   โ”œโ”€โ”€โ”€node_modules---------------/!\ Specific Sapper /!\
โ”‚   โ”œโ”€โ”€โ”€routes---------------------Sapper Routes
โ”‚   โ””โ”€โ”€โ”€tests
โ”‚       โ”œโ”€โ”€โ”€acceptance-------------Business Logic / Core Tests
โ”‚       โ””โ”€โ”€โ”€integration------------Integration / Adapter Tests
โ”œโ”€โ”€โ”€static-------------------------Sapper Static Files
โ””โ”€โ”€โ”€__sapper__---------------------/!\ Specific Sapper /!\

Features Status

  Feature: Claiming
    As a Bangarang Member
    In order to claim
    I want to claim on claim

        Scenario: Claiming For
      โˆš Given the user is signed in
      โˆš And the claim with id 'claim' is declared on Bangarang with the following values:
                | claim title |claimed people| claimed For people | claimed Against people|
                | claim title | 10           | 10                 | 0                     |
      โˆš When the user claim 'For' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Success' status and 'Claimed.' message.
      โˆš And the 'peopleClaimed' quantity on claim 'claim title' is 11
      โˆš And the 'peopleClaimedFor' quantity on claim 'claim title' is 11
      โˆš And the 'peopleClaimedAgainst' quantity on claim 'claim title' is 0
      โˆš And the user view is "claim".

        Scenario: Claiming Against
      โˆš Given the user is signed in
      โˆš And the claim with id 'claim' is declared on Bangarang with the following values:
                | claim title |claimed people| claimed For people | claimed Against people|
                | claim title | 20           | 0                 | 20                     |
      โˆš When the user claim 'Against' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Success' status and 'Claimed.' message.
      โˆš And the 'peopleClaimed' quantity on claim 'claim title' is 21
      โˆš And the 'peopleClaimedFor' quantity on claim 'claim title' is 0
      โˆš And the 'peopleClaimedAgainst' quantity on claim 'claim title' is 21
      โˆš And the user view is "claim".

        Scenario: Claim not declared on Bangarang
      โˆš Given the user is signed in
      โˆš And there is no declared claims on Bangarang
      โˆš When the user claim 'Against' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Failed' status and 'The claim 'claim' is not declared on Bangarang.' message.
      โˆš And the user view is "claim".

        Scenario: User not Signed In
      โˆš Given the user is not signed in
      โˆš And the claim with id 'claim' is declared on Bangarang with the following values:
                | claim title |claimed people| claimed For people | claimed Against people|
                | claim title | 20           | 0                 | 20                     |
      โˆš When the user claim 'Against' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Failed' status and 'You must be signed in in order to claim.' message.
      โˆš And the 'peopleClaimed' quantity on claim 'claim title' is 20
      โˆš And the 'peopleClaimedFor' quantity on claim 'claim title' is 0
      โˆš And the 'peopleClaimedAgainst' quantity on claim 'claim title' is 20
      โˆš And the user view is "SigningInMenu".

        Scenario: Can't claim For multiple times
      โˆš Given the user is signed in
      โˆš And the claim with id 'claim' is declared on Bangarang with the following values:
                | claim title |claimed people| claimed For people | claimed Against people|
                | claim title | 10           | 10                 | 0                     |
      โˆš And the user has previously claimed 'For' on claim 'claim title'
      โˆš When the user claim 'For' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Failed' status and 'Claiming 'For' multiple times on a claim is forbidden.' message.
      โˆš And the 'peopleClaimed' quantity on claim 'claim title' is 10
      โˆš And the 'peopleClaimedFor' quantity on claim 'claim title' is 10
      โˆš And the 'peopleClaimedAgainst' quantity on claim 'claim title' is 0
      โˆš And the user view is "claim".

        Scenario: Can't claim Against multiple times
      โˆš Given the user is signed in
      โˆš And the claim with id 'claim' is declared on Bangarang with the following values:
                | claim title |claimed people| claimed For people | claimed Against people|
                | claim title | 10           | 9                 | 1                     |
      โˆš And the user has previously claimed 'Against' on claim 'claim title'
      โˆš When the user claim 'Against' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Failed' status and 'Claiming 'Against' multiple times on a claim is forbidden.' message.
      โˆš And the 'peopleClaimed' quantity on claim 'claim title' is 10
      โˆš And the 'peopleClaimedFor' quantity on claim 'claim title' is 9
      โˆš And the 'peopleClaimedAgainst' quantity on claim 'claim title' is 1
      โˆš And the user view is "claim".

        Scenario: user change claim choice For > Against
      โˆš Given the user is signed in
      โˆš And the claim with id 'claim' is declared on Bangarang with the following values:
                | claim title |claimed people| claimed For people | claimed Against people|
                | claim title | 10           | 10                 | 0                     |
      โˆš And the user has previously claimed 'For' on claim 'claim title'
      โˆš When the user claim 'Against' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Success' status and 'Claimed.' message.
      โˆš And the 'peopleClaimed' quantity on claim 'claim title' is 10
      โˆš And the 'peopleClaimedFor' quantity on claim 'claim title' is 9
      โˆš And the 'peopleClaimedAgainst' quantity on claim 'claim title' is 1
      โˆš And the user view is "claim".

        Scenario: user change claim choice Against > For
      โˆš Given the user is signed in
      โˆš And the claim with id 'claim' is declared on Bangarang with the following values:
                | claim title |claimed people| claimed For people | claimed Against people|
                | claim title | 10           | 0                 | 10                     |
      โˆš And the user has previously claimed 'Against' on claim 'claim title'
      โˆš When the user claim 'For' on the claim with title 'claim title'
      โˆš Then the user has a 'Claiming.' notification with 'Success' status and 'Claimed.' message.
      โˆš And the 'peopleClaimed' quantity on claim 'claim title' is 10
      โˆš And the 'peopleClaimedFor' quantity on claim 'claim title' is 1
      โˆš And the 'peopleClaimedAgainst' quantity on claim 'claim title' is 9
      โˆš And the user view is "claim".

  Feature: Declaring Claim
    As a guest or a Bangarang Member
    In order to claim or share a claim
    I want to declare a claim

    Scenario: Declaring Simple Claim
      โˆš Given the user current view is the "declaring claim menu"
      โˆš And the claim with id 'claimId' is not declared on Bangarang.
      โˆš When the user declare a new 'Simple' claim with title 'expectedClaim'.
      โˆš Then the claim with title 'expectedClaim' is declared on Bangarang.
      โˆš And the user has a 'Declaring claim.' notification with 'Success' status and 'Declared.' message.
      โˆš And the user current view is the "claimId"

    Scenario: Claim with same title already exist
      โˆš Given the user current view is the "declaring claim menu"
      โˆš And the claim with id 'claimId' and title 'expectedClaim' is declared on Bangarang.
      โˆš When the user declare a new 'Simple' claim with title 'expectedClaim'.
      โˆš Then the new claim is not declared on Bangarang.
      โˆš And the user has a 'Declaring claim.' notification with 'Failed' status and 'The claim "expectedClaim" already exist.' message.
      โˆš And the user current view is the "claimId"

    Scenario: Claim with same title uppercase already exist
      โˆš Given the user current view is the "declaring claim menu"
      โˆš And the claim with id 'claimId' is declared on Bangarang.
      โˆš When the user declare a new 'Simple' claim with title 'EXPECTEDCLAIM'.
      โˆš Then the new claim is not declared on Bangarang.
      โˆš And the user has a 'Declaring claim.' notification with 'Failed' status and 'The claim "EXPECTEDCLAIM" already exist.' message.
      โˆš And the user current view is the "claimId"

    Scenario: Claim with empty title
      โˆš Given the user current view is the "declaring claim menu"
      โˆš When the user declare a new 'Simple' claim with title ''.
      โˆš Then the new claim is not declared on Bangarang.
      โˆš And the user has a 'Declaring claim.' notification with 'Failed' status and 'A claim must have a title.' message.
      โˆš And the user current view is the "declaring claim menu"

  Feature: Registering
    As a guest,
    In order to claim,
    I want to register on Bangarang.

    Scenario: Register on Bangarang.
      โˆš Given the user is not signed in as 'johndoe'.
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš When the user register on Bangarang with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | "(VRVdFrr4jF'Rx7   |  john@doe.com | John Doe  |
      โˆš Then 'johndoe' is a Bangarang member with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | "(VRVdFrr4jF'Rx7   |  john@doe.com | John Doe  |
      โˆš And the user has a 'Registering.' notification with 'Success' status and 'Registered.' message.

    Scenario: Invalid email.
      โˆš Given the user is not signed in as 'johndoe'.
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš When the user register on Bangarang with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | "(VRVdFrr4jF'Rx7   |  johndoe.com | John Doe  |
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš And the user has a 'Registering.' notification with 'Failed' status and 'Email invalid.' message.

    Scenario: Invalid email 2.
      โˆš Given the user is not signed in as 'johndoe'.
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš When the user register on Bangarang with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | "(VRVdFrr4jF'Rx7   |  john@doe. | John Doe  |
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš And the user has a 'Registering.' notification with 'Failed' status and 'Email invalid.' message.

    Scenario: Unsecure Password.
      โˆš Given the user is not signed in as 'johndoe'.
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš When the user register on Bangarang with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | password   |  john@doe.com | John Doe  |
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš And the user has a 'Registering.' notification with 'Failed' status and 'Unsecure password.' message.
    
    Scenario: Already member of Bangarang.
      โˆš Given the user is not signed in as 'johndoe'.
      โˆš And 'johndoe' is a Bangarang member with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | "(VRVdFrr4jF'Rx7   |  john@doe.com | John Doe  |
      โˆš When the user register on Bangarang with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | "(VRVsdfsdfdFrr4jF'Rx7   |  johnny@doe.com | Johnny Doe  |
      โˆš Then 'johndoe' is a Bangarang member with the following parameters:
            | username | password           | email         | fullname  |
            | johndoe  | "(VRVdFrr4jF'Rx7   |  john@doe.com | John Doe  |
      โˆš And the user has a 'Registering.' notification with 'Failed' status and 'Already member of Bangarang.' message.

  Feature : Retrieving Claim
    As a guest or a Bangarang Member
    In order to share a claim or to claim
    I want to retrieve a claim

    Scenario: Retrieve Claim as Guest
      โˆš Given the user is signed in
      โˆš And the claim 'Claim Title' with id 'claimId' is declared on Bangarang
      โˆš When the user retrieve the claim with title 'Claim Title'
      โˆš Then the retrieved claim in the claim user notification has the following information: 
        | title | people claimed    | people claimed for    | people claimed against    | previous user claim choice    |
        | Claim Title | 10                |   9                   |   1                       |    undefined                    |
      โˆš And the user has a 'Retrieving claim.' notification with 'Success' status and 'Claim retrieved.' message.

    Scenario: Retrieve Claim as Bangarang member that has not claimed yet
      โˆš Given the user is signed in
      โˆš And the user has not claimed on claim 'Claim Title'
      โˆš And the claim 'Claim Title' is declared on Bangarang
      โˆš When the user retrieve the claim with id 'claimId'
      โˆš Then the retrieved claim in the claim user notification has the following information: 
        | title | people claimed    | people claimed for    | people claimed against    | previous user claim choice    |
        | Claim Title | 10                |   9                   |   1                       |    undefined                    |
      โˆš And the user has a 'Retrieving claim.' notification with 'Success' status and 'Claim retrieved.' message.

    Scenario: Retrieve Claim as Bangarang member that has claimed For
      โˆš Given the user is signed in
      โˆš And the user has claimed 'For' on claim 'Claim Title'
      โˆš And the claim 'Claim Title' is declared on Bangarang
      โˆš When the user retrieve the claim with id 'claimId'
      โˆš Then the retrieved claim in the claim user notification has the following information: 
        | title | people claimed    | people claimed for    | people claimed against    | previous user claim choice    |
        | Claim Title | 10                |   9                   |   1                       |    For                    |
      โˆš And the user has a 'Retrieving claim.' notification with 'Success' status and 'Claim retrieved.' message.

    Scenario: Retrieve Claim as Bangarang member that has claimed Against
      โˆš Given the user is signed in
      โˆš And the user has claimed 'Against' on claim 'Claim Title'
      โˆš And the claim 'Claim Title' is declared on Bangarang
      โˆš When the user retrieve the claim with id 'claimId'
      โˆš Then the retrieved claim in the claim user notification has the following information: 
        | title | people claimed    | people claimed for    | people claimed against    | previous user claim choice    |
        | Claim Title | 10                |   9                   |   1                       |    Against                    |
      โˆš And the user has a 'Retrieving claim.' notification with 'Success' status and 'Claim retrieved.' message.

    Scenario: Claim not found
      โˆš Given the user is signed in
      โˆš And the claim 'Claim Title' is not declared on Bangarang
      โˆš When the user retrieve the claim with title 'claimId'
      โˆš Then the retrieved claim is undefined
      โˆš And the user has a 'Retrieving claim.' notification with 'Failed' status and 'The claim is not declared on Bangarang.' message.

  Feature: Searching Claims
    As a guest or a Bangarang Member,
    In order to claim or share a claim,
    I want to find claims

        Scenario 1: order engine unit 1
      โˆš Given there is the following declared claims:
                [good people,good people1,good people 2,good 3 people,PEOPLE GOOD]
      โˆš When the user search claims with search criteria 'good people'
      โˆš Then the retreived claims is the following:
                [good people,good people 2,PEOPLE GOOD,good 3 people,good people1]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '5 claims found.' message.

        Scenario 2: order engine unit 2
      โˆš Given there is the following declared claims:
                [good 4 people,PEOPLE GOOD]
      โˆš When the user search claims with search criteria 'good people'
      โˆš Then the retreived claims is the following:
                [PEOPLE GOOD,good 4 people]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 3: order engine unit 3
      โˆš Given there is the following declared claims:
                [good NOPE people,PEOPLE GOOD]
      โˆš When the user search claims with search criteria 'good people'
      โˆš Then the retreived claims is the following:
                [PEOPLE GOOD,good NOPE people]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 4: order engine unit 4
      โˆš Given there is the following declared claims:
                [Bad NOPE Cookie,COOKIE BAD]
      โˆš When the user search claims with search criteria 'Bad Cookie'
      โˆš Then the retreived claims is the following:
                [COOKIE BAD,Bad NOPE Cookie]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 5: order engine unit 5
      โˆš Given there is the following declared claims:
                [Third NOPE Thing,THING THIRD]
      โˆš When the user search claims with search criteria 'Thing Third'
      โˆš Then the retreived claims is the following:
                [THING THIRD,Third NOPE Thing]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 6: order engine unit 6
      โˆš Given there is the following declared claims:
                [good 3 people,GOOD 4 PEOPLE]
      โˆš When the user search claims with search criteria 'good people'
      โˆš Then the retreived claims is the following:
                [good 3 people,GOOD 4 PEOPLE]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 7: order engine unit 7
      โˆš Given there is the following declared claims:
                [third NOPE thing,THIRD LOREM THING]
      โˆš When the user search claims with search criteria 'third thing'
      โˆš Then the retreived claims is the following:
                [third NOPE thing,THIRD LOREM THING]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 8: order engine unit 8
      โˆš Given there is the following declared claims:
                [third 3 thing,THIRD 4 THING]
      โˆš When the user search claims with search criteria 'third thing'
      โˆš Then the retreived claims is the following:
                [third 3 thing,THIRD 4 THING]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 9: order engine unit 9
      โˆš Given there is the following declared claims:
                [third thing,THIRD THING]
      โˆš When the user search claims with search criteria 'THIRD THING'
      โˆš Then the retreived claims is the following:
                [third thing,THIRD THING]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '2 claims found.' message.

        Scenario 10: Searching Claims with one word
      โˆš Given there is the following declared claims:
                [claim,claim2,claim3,Claim4,CLAIME5,Cloum]
      โˆš When the user search claims with search criteria 'claim'
      โˆš Then the retreived claims is the following:
                [claim,claim2,claim3,Claim4,CLAIME5]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '5 claims found.' message.

        Scenario 11: Searching Claims with multiple words
      โˆš Given there is the following declared claims:
                [good people,good people1,good people 2,good 3 people,GOOD 4 PEOPLE,PEOPLE GOOD,Cloum]
      โˆš When the user search claims with search criteria 'good people'
      โˆš Then the retreived claims is the following:
                [good people,good people 2,PEOPLE GOOD,good 3 people,GOOD 4 PEOPLE,good people1]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '6 claims found.' message.

        Scenario 12: Searching Claims with one or multiple words
      โˆš Given there is the following declared claims:
                [good,people,good people,good 2 people,GOOD 4 PEOPLE,PEOPLE GOOD,Cloum]
      โˆš When the user search claims with search criteria 'good people'
      โˆš Then the retreived claims is the following:
                [good people,PEOPLE GOOD,good 2 people,GOOD 4 PEOPLE,good,people]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '6 claims found.' message.

        Scenario 13: No claims match search criteria
      โˆš Given there is the following declared claims:
                [cloum,cloum2,cloum3,Cloum4,CLOUME5]
      โˆš When the user search claims with search criteria 'claim'
      โˆš Then the retreived claims is the following:
                []
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '0 claims found.' message.

        Scenario 14: Claims found with bad lower/upper case search criteria
      โˆš Given there is the following declared claims:
                [cloum2,cloum3,Cloum4,CLOUME5,cloum]
      โˆš When the user search claims with search criteria 'clOUm'
      โˆš Then the retreived claims is the following:
                [cloum,cloum2,cloum3,Cloum4,CLOUME5]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '5 claims found.' message.

        Scenario 15: Claim with punctuation & search criteria without punctuation
      โˆš Given there is the following declared claims:
                [Guillermo Lasso est-il le prรฉsident de l'Equateur?]
      โˆš When the user search claims with search criteria 'equateur'
      โˆš Then the retreived claims is the following:
                [Guillermo Lasso est-il le prรฉsident de l'Equateur?]
      โˆš And the user has a 'Searching Claims' notification with 'Success' status and '1 claims found.' message.


Feature: Signing In
    As a guest
    In order to claim
    I want to sign in Bangarang

    Scenario: User Signing In
      โˆš Given the user is not signed in
      โˆš And there is 'johndoe' Bangarang member with password 'Password'
      โˆš When the user signin as 'johndoe' with password 'Password'
      โˆš Then the user is signed in as a Bangarang member with the following information:
            | username | user fullname |
            | johndoe  |       |
      โˆš And the user has a 'Signing In' notification with 'Success' status and 'Signed In.' message.

    Scenario: User already signed in
      โˆš Given the user is already SignedIn
      โˆš When the user signin as 'johndoe' with password 'Password'
      โˆš Then the user has a 'Signing In' notification with 'Failed' status and 'Already signed in.' message.

    Scenario: User is not a Bangarang member
      โˆš Given the user is not signed in
      โˆš And there is no 'johndoe' Bangarang member'
      โˆš When the user signin as 'johndoe' with password 'Password'
      โˆš Then the user has a 'Signing In' notification with 'Failed' status and 'Bad credentials. Verify credentials or register to Bangarang.' message.

    Scenario: Bad credentials
      โˆš Given the user is not signed in
      โˆš And there is 'johndoe' Bangarang member with password 'Password'
      โˆš When the user signin as 'johndoe' with password 'baspassword'
      โˆš Then the user has a 'Signing In' notification with 'Failed' status and 'Bad credentials. Verify credentials or register to Bangarang.' message.


  217 passing (113ms)

Technical Integration Status

  Bangarang Claim Interactor - Integration Test
    
    Integration Test with 'fake' adapter.
      โˆš claimById - error
      โˆš claimByTitleIncencitiveCase - error
      โˆš isClaimExistByTitleIncensitiveCase - error
      โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - error
      โˆš saveClaim - error
      save claim scenario
        โˆš isClaimExistByTitleIncensitiveCase - The claim 'Claim with impoRtant stuff on It.' don't exist.
        โˆš saveClaim - The claim 'Claim with impoRtant stuff on It.' is saved.
        โˆš isClaimExistByTitleIncensitiveCase - The claim 'Claim with impoRtant stuff on It.' exist.
        โˆš claimById - The claim 'Claim with impoRtant stuff on It.' can be retrieved by Id.        โˆš claimByTitleIncencitiveCase - The claim 'Claim with impoRtant stuff on It.' can be retrieved by it's title.
        โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - The claim 'Claim with impoRtant stuff on It.' is retrieved with 'imporTant dog toto important' search criteria.
        โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - No claim is retrieved with 'dog' search criteria.
    
    Integration Test with 'restFake' adapter.
      โˆš claimById - error
      โˆš claimByTitleIncencitiveCase - error
      โˆš isClaimExistByTitleIncensitiveCase - error
      โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - error
      โˆš saveClaim - error
      save claim scenario
        โˆš isClaimExistByTitleIncensitiveCase - The claim 'Claim with impoRtant stuff on It.' don't exist.
        โˆš saveClaim - The claim 'Claim with impoRtant stuff on It.' is saved.
        โˆš isClaimExistByTitleIncensitiveCase - The claim 'Claim with impoRtant stuff on It.' exist.
        โˆš claimById - The claim 'Claim with impoRtant stuff on It.' can be retrieved by Id.        โˆš claimByTitleIncencitiveCase - The claim 'Claim with impoRtant stuff on It.' can be retrieved by it's title.
        โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - The claim 'Claim with impoRtant stuff on It.' is retrieved with 'imporTant dog toto important' search criteria.
        โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - No claim is retrieved with 'dog' search criteria.
    
    Integration Test with 'restGcp' adapter.
      โˆš claimById - error (46ms)
      โˆš claimByTitleIncencitiveCase - error (96ms)
      โˆš isClaimExistByTitleIncensitiveCase - error
      โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - error
      โˆš saveClaim - error
      save claim scenario
        โˆš isClaimExistByTitleIncensitiveCase - The claim 'Claim with impoRtant stuff on It.' don't exist. (53ms)
        โˆš saveClaim - The claim 'Claim with impoRtant stuff on It.' is saved. (69ms)
        โˆš isClaimExistByTitleIncensitiveCase - The claim 'Claim with impoRtant stuff on It.' exist. (72ms)
        โˆš claimById - The claim 'Claim with impoRtant stuff on It.' can be retrieved by Id. (50ms)
        โˆš claimByTitleIncencitiveCase - The claim 'Claim with impoRtant stuff on It.' can be retrieved by it's title. (67ms)
        โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - The claim 'Claim with impoRtant stuff on It.' is retrieved with 'imporTant dog toto important' search criteria. (76ms)
        โˆš retrieveClaimsThatContainInIncensitiveCaseTitleOneOrMoreIncencitiveCaseSearchCriteriaWords - No claim is retrieved with 'dog' search criteria.


  Bangarang Member Interactor - Integration Test
    
    Integration Test with 'fake' adapter.
      โˆš retrievePreviousMemberClaimChoiceOnClaim - error
      โˆš retrievePreviousMemberClaimChoiceOnClaim & saveMemberClaim - testclaimId - OK      
      โˆš saveMember - error - Member not saved
      โˆš isMemberExistWithUsername & saveMember - OK - Member 'test' saved and exist
      โˆš saveCredentials - OK - Credentials saved
      โˆš saveCredentials - error - Credentials not saved
      โˆš isCredentialsValid - OK - isCredentialsValid with bad password
      โˆš isCredentialsValid - OK - isCredentialsValid with unexisting credentials
      โˆš isCredentialsValid - OK - isCredentialsValid with good credentials
      โˆš retrieveUserContract - Error
      โˆš retrieveUserContract - OK - UserExist
      โˆš retrieveUserContract - OK - User don't exist
    
    Integration Test with 'RESTfake' adapter.
      โˆš retrievePreviousMemberClaimChoiceOnClaim - error
      โˆš retrievePreviousMemberClaimChoiceOnClaim & saveMemberClaim - testclaimId - OK      
      โˆš saveMember - error - Member not saved
      โˆš isMemberExistWithUsername & saveMember - OK - Member 'test' saved and exist
      โˆš saveCredentials - OK - Credentials saved
      โˆš saveCredentials - error - Credentials not saved
      โˆš isCredentialsValid - OK - isCredentialsValid with bad password
      โˆš isCredentialsValid - OK - isCredentialsValid with unexisting credentials
      โˆš isCredentialsValid - OK - isCredentialsValid with good credentials
      โˆš retrieveUserContract - Error
      โˆš retrieveUserContract - OK - UserExist
      โˆš retrieveUserContract - OK - User don't exist
    
    Integration Test with 'RESTGCPDatastore' adapter.
      โˆš retrievePreviousMemberClaimChoiceOnClaim - error (40ms)
      โˆš retrievePreviousMemberClaimChoiceOnClaim & saveMemberClaim - testclaimId - OK (126ms)
      โˆš saveMember - error - Member not saved
      โˆš isMemberExistWithUsername & saveMember - OK - Member 'test' saved and exist (113ms)      โˆš saveCredentials - OK - Credentials saved (63ms)
      โˆš saveCredentials - error - Credentials not saved
      โˆš isCredentialsValid - OK - isCredentialsValid with bad password
      โˆš isCredentialsValid - OK - isCredentialsValid with unexisting credentials
      โˆš isCredentialsValid - OK - isCredentialsValid with good credentials
      โˆš retrieveUserContract - Error
      โˆš retrieveUserContract - OK - UserExist
      โˆš retrieveUserContract - OK - User don't exist


  72 passing (2s)

About

๐Ÿณ๏ธโ€๐ŸŒˆ๐ŸŒ๐Ÿ“ฎ Bangarang is an open source and free direct democracy application based on claim system. Made through ATDD & Hexagonal Architecture principles.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published