[PR #152] [MERGED] [Client] Setup UI test using BDD approach #1251

Open
opened 2025-10-09 19:11:42 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/plankanban/planka/pull/152
Author: @amrita-shrestha
Created: 8/20/2021
Status: Merged
Merged: 10/17/2024
Merged by: @meltyshev

Base: masterHead: uitest-setup


📝 Commits (2)

  • 19449b3 SetUp uitest using BDD approach
  • 100f531 Merge branch 'master' into uitest-setup

📊 Changes

7 files changed (+131 additions, -1 deletions)

View changed files

client/nightwatch.conf.js (+19 -0)
📝 client/package.json (+6 -1)
client/tests/acceptance/cucumber.conf.js (+25 -0)
client/tests/acceptance/features/webUILogin/login.feature (+9 -0)
client/tests/acceptance/pageObjects/dashboardPage.js (+20 -0)
client/tests/acceptance/pageObjects/loginPage.js (+26 -0)
client/tests/acceptance/stepDefinitions/loginContext.js (+26 -0)

📄 Description

Description

This PR adds setup for UI testing that uses Behavior Driven Development (BDD) approach.
Used testing libraries:

  • nightwatch
  • nightwatch-api
  • @cucumber/cucumber
  • @cucumber/pretty-formatter

Example test scenario included:

  • login with valid credentials

Motivation and Context

Why BDD?
BDD provides shared tools and processes across the entire (technical and non-technical) team to foster collaboration in meeting defined business requirements. BDD increases and improves collaboration. By using plain language, all are able to write behavior scenarios. With BDD, as its name says, you focus on the behavior, which has a stronger impact than the implementation itself.

#13

How Has This Been Tested?

  • locally

How to run UI test?

Pre-requisite:

  • Docker

Step to run tests

  1. Pull and run selenium docker image
docker run -d --network="host" -v /dev/shm:/dev/shm selenium/standalone-chrome-debug
  1. Run planka project
  2. Run UI test with following command:
cd client
npm run test:webui tests/acceptance/features

Note: UI test will run in chrome browser (other browsers can be set up)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/plankanban/planka/pull/152 **Author:** [@amrita-shrestha](https://github.com/amrita-shrestha) **Created:** 8/20/2021 **Status:** ✅ Merged **Merged:** 10/17/2024 **Merged by:** [@meltyshev](https://github.com/meltyshev) **Base:** `master` ← **Head:** `uitest-setup` --- ### 📝 Commits (2) - [`19449b3`](https://github.com/plankanban/planka/commit/19449b3b8c778f46059f22e0db6fb159a3968a66) SetUp uitest using BDD approach - [`100f531`](https://github.com/plankanban/planka/commit/100f531677db04d7698fa9afd099ee63f701cb97) Merge branch 'master' into uitest-setup ### 📊 Changes **7 files changed** (+131 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `client/nightwatch.conf.js` (+19 -0) 📝 `client/package.json` (+6 -1) ➕ `client/tests/acceptance/cucumber.conf.js` (+25 -0) ➕ `client/tests/acceptance/features/webUILogin/login.feature` (+9 -0) ➕ `client/tests/acceptance/pageObjects/dashboardPage.js` (+20 -0) ➕ `client/tests/acceptance/pageObjects/loginPage.js` (+26 -0) ➕ `client/tests/acceptance/stepDefinitions/loginContext.js` (+26 -0) </details> ### 📄 Description ## Description This PR adds setup for UI testing that uses Behavior Driven Development (BDD) approach. Used testing libraries: - `nightwatch` - `nightwatch-api` - `@cucumber/cucumber` - `@cucumber/pretty-formatter` Example test scenario included: - login with valid credentials ## Motivation and Context Why BDD? BDD provides shared tools and processes across the entire (technical and non-technical) team to foster collaboration in meeting defined business requirements. BDD increases and improves collaboration. By using plain language, all are able to write behavior scenarios. With BDD, as its name says, you focus on the behavior, which has a stronger impact than the implementation itself. ## Related Issue #13 ## How Has This Been Tested? - locally ## How to run UI test? Pre-requisite: - Docker Step to run tests 1. Pull and run selenium docker image ``` docker run -d --network="host" -v /dev/shm:/dev/shm selenium/standalone-chrome-debug ``` 2. Run `planka` project 3. Run UI test with following command: ``` cd client npm run test:webui tests/acceptance/features ``` Note: UI test will run in chrome browser (other browsers can be set up) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-09 19:11:42 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#1251