@webship-js/leantime-steps 0.0.0-stage → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +255 -2
- package/package.json +64 -4
- package/tests/features/roles.feature +25 -0
- package/tests/features/session.feature +29 -0
- package/tests/features/sprints.feature +9 -0
- package/tests/features/tasks.feature +36 -0
- package/tests/step-definitions/leantime-helpers.js +666 -0
- package/tests/step-definitions/leantime-session.steps.js +185 -0
- package/tests/step-definitions/leantime-sprints.steps.js +42 -0
- package/tests/step-definitions/leantime-tasks.steps.js +337 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Webship.co
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,256 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center"><img src="https://raw.githubusercontent.com/webship/leantime-steps/2.0.x/assets/logo.svg" alt="Leantime logo" width="180"></p>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# leantime-steps
|
|
4
|
+
|
|
5
|
+
[](https://github.com/webship/leantime-steps/actions/workflows/test.yml)
|
|
6
|
+
|
|
7
|
+
Cucumber step definitions for testing Leantime, the open-source project management software, with
|
|
8
|
+
[webship-js](https://webship.co/docs/webship-js/2.0.x), a BDD browser automation harness built on Playwright and
|
|
9
|
+
Cucumber-js. The pack covers what a project's work goes through:
|
|
10
|
+
|
|
11
|
+
- **logging in and out**: an account of the users registry by its handle, the login form, a refused login, who the
|
|
12
|
+
session is, logging out;
|
|
13
|
+
- **a project**: opened by its name, and refused to an account outside its team;
|
|
14
|
+
- **the task list** of a project, and **one task** in its window: its status, a comment, its assignee and the time
|
|
15
|
+
logged on it, each through its own control, and who made it;
|
|
16
|
+
- **a new task** made on the project's board;
|
|
17
|
+
- **the sprints**: what a sprint holds;
|
|
18
|
+
- **what an account may not do**: a Commenter changes no task, a Read Only person neither changes nor comments on one,
|
|
19
|
+
and an account outside the team is refused the project's tasks.
|
|
20
|
+
|
|
21
|
+
The steps make and remove their test content through the site's own API, as a managing account (a Company Manager)
|
|
22
|
+
logged in the way the screens log in: a task a scenario makes goes after it, so a run leaves the site as it found it.
|
|
23
|
+
|
|
24
|
+
No step phrase names the platform: a scenario reads `When I set the status of the task to "In Progress"` and
|
|
25
|
+
`Then the sprint should list the task "…"`.
|
|
26
|
+
|
|
27
|
+
CI builds a real Leantime site with [DDEV](https://ddev.com) on the runner (Leantime's own image on the project's own
|
|
28
|
+
MariaDB, installed by its own installer, the accounts of the suite, the sample content), runs the whole suite against it
|
|
29
|
+
twice on every push and pull request, checks after each run that the site holds what it held before, then runs the
|
|
30
|
+
assertions that must fail; see [The test site](#the-test-site) and [`.github/workflows/test.yml`](.github/workflows/test.yml).
|
|
31
|
+
|
|
32
|
+
## Logging in first
|
|
33
|
+
|
|
34
|
+
Every feature starts by logging in: an account of the users registry, by its handle.
|
|
35
|
+
|
|
36
|
+
| Step | What it does |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `Given I am a logged in user with the "member" user` | Logs in as an account of the users registry, by its handle. The first time in a run through the login form, then its session is put back |
|
|
39
|
+
| `When I log in with the "member" user` | Fills and submits the login form with the account's address and password, and waits until the session is the account's |
|
|
40
|
+
| `When I log in as "member@example.com" with the password "wrong"` | Fills and submits the login form with an address and a password as typed, and asserts nothing: for scenarios about the login itself |
|
|
41
|
+
| `Given I am not logged in` | The browser forgets its session |
|
|
42
|
+
| `When I log out` | Logs out at the site's logout address, and waits until the session is gone |
|
|
43
|
+
| `Then I should be logged in as "Member Test"` | The session is the account's: its whole name as the site shows it, or its address |
|
|
44
|
+
| `Then I should not be logged in` | The browser holds no session |
|
|
45
|
+
| `Then the login should be refused with "Username or password incorrect"` | The login form came back with that message (give the scenario `@js-off`) |
|
|
46
|
+
|
|
47
|
+
```gherkin
|
|
48
|
+
Scenario: An account logs in through the form and out again
|
|
49
|
+
Given I am not logged in
|
|
50
|
+
When I log in with the "member" user
|
|
51
|
+
Then I should be logged in as "Member Test"
|
|
52
|
+
When I log out
|
|
53
|
+
Then I should not be logged in
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## From nothing to a green run
|
|
57
|
+
|
|
58
|
+
What the machine needs: Docker, [DDEV](https://ddev.com), git, python3, Node.js 24 or later with npm, and about 1.5 GB
|
|
59
|
+
of free memory for Leantime and MariaDB. Leantime runs in DDEV's containers.
|
|
60
|
+
|
|
61
|
+
**1. The site.** The pack's own build script (the one CI runs) makes the site in a DDEV project: Leantime's own image
|
|
62
|
+
(`leantime/leantime:3.17.0`, `RELEASE` for another release) on MariaDB 11.4, installed by Leantime's own installer, the
|
|
63
|
+
five accounts of [Test users](#test-users), and the sample content (see [The test site](#the-test-site)). It takes a
|
|
64
|
+
minute or two once the images are pulled (Leantime's is a download of about 320 MB). Leantime supports MySQL 8.0+ or
|
|
65
|
+
MariaDB 10.6+; the test site runs MariaDB, as the Webship Workspace builds Leantime.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
git clone https://github.com/webship/leantime-steps.git
|
|
69
|
+
SITE_DIR="$PWD/leantime-site" leantime-steps/.github/scripts/build-ddev-site.sh
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The site answers at `https://leantimesteps.ddev.site`. In the [Webship Workspace](https://github.com/webship/workspace),
|
|
73
|
+
its Leantime plugin builds the same site in a sites folder, on DDEV, and wires this pack into the testing setup of the
|
|
74
|
+
site:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
bash core/scripts/plugins.sh --require leantime --with-needs
|
|
78
|
+
bash core/scripts/plugins.sh --activate leantime --with-needs
|
|
79
|
+
bash core/scripts/plugins.sh --install leantime
|
|
80
|
+
bash dev/cmd-leantime-project.sh ltsite --install --add-users --sample-content
|
|
81
|
+
bash dev/cmd-tools-testing.sh ltsite --run
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**2. A test project.**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
mkdir leantime-tests && cd leantime-tests
|
|
88
|
+
npm init -y
|
|
89
|
+
npm install --save-dev webship-js @webship-js/leantime-steps
|
|
90
|
+
npx init-webship-js
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**3. `cucumber.js`.** Add the pack's step definitions after webship-js's own, and give the world its parameters:
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
require: [
|
|
97
|
+
'node_modules/webship-js/tests/step-definitions/**/*.js',
|
|
98
|
+
'node_modules/@webship-js/leantime-steps/tests/step-definitions/**/*.js',
|
|
99
|
+
],
|
|
100
|
+
tags: process.env.CUCUMBER_TAGS || 'not @wip and not @must-fail',
|
|
101
|
+
worldParameters: {
|
|
102
|
+
launchUrl: process.env.LAUNCH_URL || 'https://leantimesteps.ddev.site',
|
|
103
|
+
// The account that makes and removes test content through the site's API: a Company Manager of the projects used.
|
|
104
|
+
manager: process.env.MANAGER || 'owner',
|
|
105
|
+
// The project a step works in when it names none (its name).
|
|
106
|
+
project: process.env.PROJECT || 'Webship site',
|
|
107
|
+
// Leantime logs in with the address (username), and shows the whole name (name).
|
|
108
|
+
users: {
|
|
109
|
+
owner: { username: process.env.LEANTIME_OWNER_USER || 'owner@example.com', password: process.env.LEANTIME_OWNER_PASSWORD, name: 'Owner Test' },
|
|
110
|
+
member: { username: process.env.LEANTIME_MEMBER_USER || 'member@example.com', password: process.env.LEANTIME_MEMBER_PASSWORD, name: 'Member Test' },
|
|
111
|
+
commenter: { username: process.env.LEANTIME_COMMENTER_USER || 'commenter@example.com', password: process.env.LEANTIME_COMMENTER_PASSWORD, name: 'Commenter Test' },
|
|
112
|
+
reader: { username: process.env.LEANTIME_READER_USER || 'reader@example.com', password: process.env.LEANTIME_READER_PASSWORD, name: 'Reader Test' },
|
|
113
|
+
stranger: { username: process.env.LEANTIME_STRANGER_USER || 'stranger@example.com', password: process.env.LEANTIME_STRANGER_PASSWORD, name: 'Stranger Test' },
|
|
114
|
+
},
|
|
115
|
+
// … webship-js's own parameters (minWaitTime, screenshot, javascript …)
|
|
116
|
+
},
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
This repository's own [`cucumber.js`](cucumber.js) is a whole example.
|
|
120
|
+
|
|
121
|
+
**4. Run.**
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npx cucumber-js # every feature
|
|
125
|
+
npx cucumber-js tests/features/tasks.feature # one feature
|
|
126
|
+
CUCUMBER_TAGS=@sprints npx cucumber-js # one tag
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Steps
|
|
130
|
+
|
|
131
|
+
### Projects
|
|
132
|
+
|
|
133
|
+
| Step | What it does |
|
|
134
|
+
| --- | --- |
|
|
135
|
+
| `When I open the project "Webship site"` | Opens the project, by its name: its task list |
|
|
136
|
+
| `Then I should be refused the project "Webship site"` | The session reads none of its tasks, and its page shows none (`@js-off`) |
|
|
137
|
+
|
|
138
|
+
### Test content
|
|
139
|
+
|
|
140
|
+
| Step | What it does |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| `Given there is a task "Webship test …" in the project "Webship site"` | Makes it through the site's API as the managing account, when it is not there. It goes after the scenario |
|
|
143
|
+
| `Given there is no task "Webship test …" in the project "Webship site"` | Removes any of the title |
|
|
144
|
+
|
|
145
|
+
### The task list
|
|
146
|
+
|
|
147
|
+
| Step | What it does |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| `Then the task list should show "…"` / `should not show "…"` | A task of the title is (not) in the open project's list |
|
|
150
|
+
| `When I create a task "Webship test …" in the project "Webship site"` | Through the board's "Add To-Do": its title, then Enter. It goes after the scenario |
|
|
151
|
+
|
|
152
|
+
### One task
|
|
153
|
+
|
|
154
|
+
A task opens in a window of the page. The steps find that window by the task's own address (its form sends to
|
|
155
|
+
`/tickets/showTicket/<number>`), never by its place on the page, and read what they changed back from the site's API.
|
|
156
|
+
|
|
157
|
+
| Step | What it does |
|
|
158
|
+
| --- | --- |
|
|
159
|
+
| `When I open the task "…"` | Opens it by its title, or by its number ("#1") |
|
|
160
|
+
| `When I set the status of the task to "In Progress"` | Through its status list, then Save |
|
|
161
|
+
| `Then the status of the task should be "In Progress"` | The status it has now |
|
|
162
|
+
| `When I add the comment "…" to the task` | Through "Add a new comment" in its Discussion, its editor and Save |
|
|
163
|
+
| `Then the task should show the comment "…"` (`… by "Member Test"`) | It holds the comment, written by that person when one is named, and its window shows it |
|
|
164
|
+
| `When I assign the task to "Owner Test"` | Through its assignee list, then Save: someone of the project's team, by their whole name |
|
|
165
|
+
| `Then the task should be assigned to "Owner Test"` | Its assignee now |
|
|
166
|
+
| `When I log "1.5" hours on the task with the note "…"` | Through its Time Tracking: the hours and the note, then Save |
|
|
167
|
+
| `Then the task should have "1.5" hours logged` | The time logged on it in all, by everyone |
|
|
168
|
+
| `Then the task should be created by "Owner"` | Who made it, by their first or whole name, as its window says ("Created by …") |
|
|
169
|
+
|
|
170
|
+
### What an account may not do
|
|
171
|
+
|
|
172
|
+
| Step | What it does |
|
|
173
|
+
| --- | --- |
|
|
174
|
+
| `Then I should not be able to change the task` | Its Save buttons and its assignee list are disabled (a Commenter's, a Read Only person's) |
|
|
175
|
+
| `Then I should not be able to comment on the task` | Its Discussion offers no new comment (a Read Only person's) |
|
|
176
|
+
| `Then I should not be able to create a task in the project "Webship site"` | The project's board offers no "Add To-Do" (a Commenter's, a Read Only person's) |
|
|
177
|
+
| `Then I should be refused the task "…"` | The session reads nothing of it, and gets no window of it (an account outside the team) (`@js-off`) |
|
|
178
|
+
|
|
179
|
+
### Sprints
|
|
180
|
+
|
|
181
|
+
| Step | What it does |
|
|
182
|
+
| --- | --- |
|
|
183
|
+
| `When I open the sprint "Sprint 1" of the project "Webship site"` | The project's task list, of that sprint only |
|
|
184
|
+
| `Then the sprint should list the task "…"` / `should not list` | What it holds |
|
|
185
|
+
|
|
186
|
+
Every step carries five example phrasings in its JSDoc, and `npm run test:examples` checks that each one matches its
|
|
187
|
+
own step only.
|
|
188
|
+
|
|
189
|
+
## Rules of a suite
|
|
190
|
+
|
|
191
|
+
- Log in by a handle of the users registry; never write a password into a feature.
|
|
192
|
+
- Never create or delete an account in a suite: accounts are configuration, made by the build of the site.
|
|
193
|
+
- Change only what the scenario made: a status, a comment, an assignee and logged time go on a task of
|
|
194
|
+
`Given there is a task "…"`, which goes after the scenario.
|
|
195
|
+
- Name test content "Webship test …". A run that was stopped half way leaves its tasks; the Workspace's
|
|
196
|
+
`cmd-tools-leantime-cli.sh <site> --tidy` deletes them for good (only tasks of that title made by the test accounts
|
|
197
|
+
in the sample project), or delete them as the managing account.
|
|
198
|
+
- Leantime's own delete of a task keeps its comments, its logged time and its history in its database, out of every
|
|
199
|
+
screen and every answer of its API: the counts CI compares are the same after a run. The same `--tidy` (or
|
|
200
|
+
`TIDY_ONLY=1 .github/scripts/build-ddev-site.sh`, which CI runs last) removes what the test accounts left there.
|
|
201
|
+
- A refusal (a wrong password, a project or a task an account may not see) makes the browser log the refused requests:
|
|
202
|
+
give those scenarios `@js-off`.
|
|
203
|
+
- Leantime shows a person the window of help of a screen once a session ("I'll explore on my own"). The steps close
|
|
204
|
+
one when it shows, by its own button, and the run says so (`[leantime-steps] a tour of … showed and was closed`).
|
|
205
|
+
"Don't show this again" is the person's own setting: a run leaves it as it is. The site keeps one window at a time,
|
|
206
|
+
and a window of help that comes over a task's takes the task's with it when it closes: the steps open the board and
|
|
207
|
+
close its window of help first, then ask for the task, and ask again when one came over it.
|
|
208
|
+
- Leantime allows a set number of API calls a minute for an account (120 by default, `LEAN_RATELIMIT_API`) and of
|
|
209
|
+
logins from one address (20, `LEAN_RATELIMIT_AUTH`). A suite reads and logs in more often than a person, so the test
|
|
210
|
+
site allows 1000 and 100, a setting for a test site only. The pack reads the site once a second while it waits,
|
|
211
|
+
reads the managing account's projects once a run, and puts each account's session back after its first login.
|
|
212
|
+
|
|
213
|
+
## Test users
|
|
214
|
+
|
|
215
|
+
The accounts the features log in as, each with the password `dD.123123ddd`:
|
|
216
|
+
|
|
217
|
+
| Handle | Address | Whole name | Role in Webship site |
|
|
218
|
+
| --- | --- | --- | --- |
|
|
219
|
+
| `owner` | `owner@example.com` | Owner Test | Company Manager (the managing account) |
|
|
220
|
+
| `member` | `member@example.com` | Member Test | Editor |
|
|
221
|
+
| `commenter` | `commenter@example.com` | Commenter Test | Commenter: comments, and changes no task |
|
|
222
|
+
| `reader` | `reader@example.com` | Reader Test | Read Only: reads, and neither changes nor comments |
|
|
223
|
+
| `stranger` | `stranger@example.com` | Stranger Test | An Editor outside the project's team |
|
|
224
|
+
|
|
225
|
+
## The test site
|
|
226
|
+
|
|
227
|
+
`.github/scripts/build-ddev-site.sh` builds it, and `COUNTS_ONLY=1` makes it print what the sample project holds
|
|
228
|
+
(tasks, open ones, comments, assignees, tagged tasks, tasks in sprints, sprints, time entries, history entries, members
|
|
229
|
+
of the project, users): CI compares them before and after each run. The sample content, in the project Webship site:
|
|
230
|
+
|
|
231
|
+
- "The greeting script says Helo instead of Hello" (#1): by the owner, In Progress, high, assigned to the member, tagged
|
|
232
|
+
bug, in the sprint "Sprint 1", with the owner's comment and 1.5 hours the member logged;
|
|
233
|
+
- "The usage line spells greeting as greting" (#2): by the member, New, with the commenter's comment from outside the
|
|
234
|
+
project's editors.
|
|
235
|
+
|
|
236
|
+
Leantime's installer, run from its console, cannot fill its own onboarding project ("My Project") with its sample
|
|
237
|
+
tasks, which it adds as a person: that project is empty on purpose, and the sample project is the build's own.
|
|
238
|
+
|
|
239
|
+
The features read the sample content and never change it. The site script (`site/leantime-site.php`, run with
|
|
240
|
+
Leantime's own code in its container) is the one of the Webship Workspace's Leantime plugin.
|
|
241
|
+
|
|
242
|
+
## The assertions that must fail
|
|
243
|
+
|
|
244
|
+
`tests/must-fail/` holds scenarios that assert something that is not true on the test site; `npm run test:must-fail`
|
|
245
|
+
runs them and checks that each fails at its last step with the message its description announces, and a hint. A step
|
|
246
|
+
that cannot fail proves nothing.
|
|
247
|
+
|
|
248
|
+
## Logo
|
|
249
|
+
|
|
250
|
+
The logo is Leantime's own wordmark, from its repository (`public/assets/images/logo_blue.svg` at v3.17.0), which is
|
|
251
|
+
licensed AGPL-3.0 as a whole; the name and the mark are Leantime's. It names the platform the pack tests.
|
|
252
|
+
|
|
253
|
+
## License
|
|
254
|
+
|
|
255
|
+
MIT (see `LICENSE`). Leantime itself is AGPL-3.0: the pack drives a running site and carries none of its code. Its
|
|
256
|
+
repository's acceptance tests were read for their flows only.
|
package/package.json
CHANGED
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webship-js/leantime-steps",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Cucumber step definitions for Leantime, the open-source project management software, a pack for webship-js (Playwright and Cucumber): logging in and out and its refusals, a project and who may open it, the task list, one task (its status, its comments, its assignee, the time logged on it, who made it), a new task, what a Commenter and a Read Only person may not do, and the sprints with their tasks. Test content is made and removed through the site's own API, so a run leaves the site as it found it.",
|
|
5
|
+
"main": "tests/step-definitions/leantime-helpers.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"tests/step-definitions/",
|
|
8
|
+
"tests/features/",
|
|
9
|
+
"README.md",
|
|
10
|
+
"LICENSE"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "cucumber-js --config cucumber.js",
|
|
14
|
+
"test:dry": "cucumber-js --config cucumber.js --dry-run",
|
|
15
|
+
"test:examples": "node tests/check-examples.js",
|
|
16
|
+
"test:paths": "node tests/check-paths.js",
|
|
17
|
+
"test:must-fail": "node tests/check-must-fail.js",
|
|
18
|
+
"test:chromium": "BROWSER=chromium cucumber-js --config cucumber.js",
|
|
19
|
+
"test:firefox": "BROWSER=firefox cucumber-js --config cucumber.js",
|
|
20
|
+
"test:webkit": "BROWSER=webkit cucumber-js --config cucumber.js",
|
|
21
|
+
"test:headed": "HEADLESS=false cucumber-js --config cucumber.js",
|
|
22
|
+
"generate-reports": "generate-reports",
|
|
23
|
+
"test:fast": "SLOW_MO=0 cucumber-js --config cucumber.js"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"webship-js",
|
|
27
|
+
"leantime",
|
|
28
|
+
"project-management",
|
|
29
|
+
"tasks",
|
|
30
|
+
"sprints",
|
|
31
|
+
"timesheets",
|
|
32
|
+
"cucumber",
|
|
33
|
+
"cucumber-js",
|
|
34
|
+
"playwright",
|
|
35
|
+
"bdd",
|
|
36
|
+
"gherkin",
|
|
37
|
+
"step-definitions",
|
|
38
|
+
"e2e-testing"
|
|
39
|
+
],
|
|
40
|
+
"author": "Webship.co",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "git+https://github.com/webship/leantime-steps.git"
|
|
45
|
+
},
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/webship/leantime-steps/issues"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/webship/leantime-steps#readme",
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">= 24.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"webship-js": "^2.0.16"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"tsx": "^4.23.0",
|
|
61
|
+
"webship-js": "^2.0.17"
|
|
62
|
+
},
|
|
63
|
+
"overrides": {
|
|
64
|
+
"@cucumber/cucumber": "^12"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@roles
|
|
2
|
+
Feature: What a Commenter and a Read Only person may not do
|
|
3
|
+
A Commenter reads the project's tasks and comments on them, and changes none; a Read Only person only reads; an
|
|
4
|
+
account outside the project's team is refused its tasks.
|
|
5
|
+
|
|
6
|
+
Scenario: A Commenter comments on a task and changes nothing
|
|
7
|
+
Given there is a task "Webship test comment" in the project "Webship site"
|
|
8
|
+
And I am a logged in user with the "commenter" user
|
|
9
|
+
When I open the task "Webship test comment"
|
|
10
|
+
Then I should not be able to change the task
|
|
11
|
+
When I add the comment "A word from a commenter" to the task
|
|
12
|
+
Then the task should show the comment "A word from a commenter" by "Commenter Test"
|
|
13
|
+
And I should not be able to create a task in the project "Webship site"
|
|
14
|
+
|
|
15
|
+
Scenario: A Read Only person reads a task, and neither changes nor comments on it
|
|
16
|
+
Given I am a logged in user with the "reader" user
|
|
17
|
+
When I open the task "The greeting script says Helo instead of Hello"
|
|
18
|
+
Then I should not be able to change the task
|
|
19
|
+
And I should not be able to comment on the task
|
|
20
|
+
And I should not be able to create a task in the project "Webship site"
|
|
21
|
+
|
|
22
|
+
@js-off
|
|
23
|
+
Scenario: An account outside the project's team is refused its tasks
|
|
24
|
+
Given I am a logged in user with the "stranger" user
|
|
25
|
+
Then I should be refused the task "The greeting script says Helo instead of Hello"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@session
|
|
2
|
+
Feature: Logging in and out
|
|
3
|
+
An account logs in with its e-mail address and its password, and out again; a wrong password is refused, and an
|
|
4
|
+
account outside a project's team is refused the project.
|
|
5
|
+
|
|
6
|
+
Scenario: An account logs in through the form and out again
|
|
7
|
+
Given I am not logged in
|
|
8
|
+
When I log in with the "member" user
|
|
9
|
+
Then I should be logged in as "Member Test"
|
|
10
|
+
When I log out
|
|
11
|
+
Then I should not be logged in
|
|
12
|
+
|
|
13
|
+
@js-off
|
|
14
|
+
Scenario: A wrong password is refused
|
|
15
|
+
When I log in as "member@example.com" with the password "not-the-right-password"
|
|
16
|
+
Then the login should be refused with "Username or password incorrect"
|
|
17
|
+
And I should not be logged in
|
|
18
|
+
|
|
19
|
+
Scenario: The session of an account, by its whole name and its address
|
|
20
|
+
Given I am a logged in user with the "owner" user
|
|
21
|
+
Then I should be logged in as "Owner Test"
|
|
22
|
+
And I should be logged in as "owner@example.com"
|
|
23
|
+
|
|
24
|
+
@js-off
|
|
25
|
+
Scenario: An account outside the project's team is refused the project, and logs out
|
|
26
|
+
Given I am a logged in user with the "stranger" user
|
|
27
|
+
Then I should be refused the project "Webship site"
|
|
28
|
+
When I log out
|
|
29
|
+
Then I should not be logged in
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@sprints
|
|
2
|
+
Feature: The sprints of a project
|
|
3
|
+
A sprint lists the tasks put in it, and no other.
|
|
4
|
+
|
|
5
|
+
Scenario: The sprint lists its task
|
|
6
|
+
Given I am a logged in user with the "member" user
|
|
7
|
+
When I open the sprint "Sprint 1" of the project "Webship site"
|
|
8
|
+
Then the sprint should list the task "The greeting script says Helo instead of Hello"
|
|
9
|
+
And the sprint should not list the task "The usage line spells greeting as greting"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@tasks
|
|
2
|
+
Feature: The tasks of a project
|
|
3
|
+
An Editor reads the project's tasks, makes one, sets its status, comments on it, assigns it and logs time on it;
|
|
4
|
+
what a scenario makes goes after it.
|
|
5
|
+
|
|
6
|
+
Scenario: A member reads the project's tasks
|
|
7
|
+
Given I am a logged in user with the "member" user
|
|
8
|
+
When I open the project "Webship site"
|
|
9
|
+
Then the task list should show "The greeting script says Helo instead of Hello"
|
|
10
|
+
And the task list should show "The usage line spells greeting as greting"
|
|
11
|
+
|
|
12
|
+
Scenario: A member makes a task on the board
|
|
13
|
+
Given there is no task "Webship test new" in the project "Webship site"
|
|
14
|
+
And I am a logged in user with the "member" user
|
|
15
|
+
When I create a task "Webship test new" in the project "Webship site"
|
|
16
|
+
And I open the project "Webship site"
|
|
17
|
+
Then the task list should show "Webship test new"
|
|
18
|
+
|
|
19
|
+
Scenario: A member works a task: its status, a comment, its assignee and the time on it
|
|
20
|
+
Given there is a task "Webship test work" in the project "Webship site"
|
|
21
|
+
And I am a logged in user with the "member" user
|
|
22
|
+
When I open the task "Webship test work"
|
|
23
|
+
And I set the status of the task to "In Progress"
|
|
24
|
+
Then the status of the task should be "In Progress"
|
|
25
|
+
When I add the comment "Checked on the test site" to the task
|
|
26
|
+
Then the task should show the comment "Checked on the test site" by "Member Test"
|
|
27
|
+
When I assign the task to "Member Test"
|
|
28
|
+
Then the task should be assigned to "Member Test"
|
|
29
|
+
When I log "1.5" hours on the task with the note "Looked into it"
|
|
30
|
+
Then the task should have "1.5" hours logged
|
|
31
|
+
|
|
32
|
+
Scenario: The sample task tells who made it
|
|
33
|
+
Given I am a logged in user with the "member" user
|
|
34
|
+
When I open the task "The greeting script says Helo instead of Hello"
|
|
35
|
+
Then the task should be created by "Owner"
|
|
36
|
+
And the task should be assigned to "Member Test"
|