mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-13 20:58:51 +01:00
add tests for toggling visibility of collapsed contexts
This commit is contained in:
parent
30c2fb8b82
commit
cdff38995c
5 changed files with 127 additions and 5 deletions
67
features/toggle_context_containers.feature
Normal file
67
features/toggle_context_containers.feature
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
Feature: Toggle the context containers
|
||||
In order to only see the todos relevant on this moment
|
||||
As a Tracks user
|
||||
I want to toggle the contexts so the todos in that context are not shown
|
||||
|
||||
Background:
|
||||
Given the following user record
|
||||
| login | password | is_admin |
|
||||
| testuser | secret | false |
|
||||
And I have logged in as "testuser" with password "secret"
|
||||
|
||||
@selenium
|
||||
Scenario: I can toggle a context container
|
||||
Given I have the following contexts
|
||||
| name | hide |
|
||||
| @ipad | false |
|
||||
| @home | false |
|
||||
| @boss | false |
|
||||
And I have a project "collapse those contexts" that has the following todos
|
||||
| description | context |
|
||||
| test 1 | @ipad |
|
||||
| test 2 | @home |
|
||||
| test 3 | @boss |
|
||||
When I go to the home page
|
||||
Then I should see "test 1" in the context container for "@ipad"
|
||||
And I should see "test 2" in the context container for "@home"
|
||||
And I should see "test 3" in the context container for "@boss"
|
||||
When I collapse the context container of "@ipad"
|
||||
Then I should not see "test 1"
|
||||
And I should see "test 2" in the context container for "@home"
|
||||
And I should see "test 3" in the context container for "@boss"
|
||||
When I collapse the context container of "@home"
|
||||
Then I should not see "test 1"
|
||||
And I should not see "test 2"
|
||||
And I should see "test 3" in the context container for "@boss"
|
||||
When I collapse the context container of "@boss"
|
||||
Then I should not see "test 1"
|
||||
And I should not see "test 2"
|
||||
And I should not see "test 3"
|
||||
|
||||
@selenium
|
||||
Scenario: I can hide all collapsed containers
|
||||
Given I have the following contexts
|
||||
| name | hide |
|
||||
| @ipad | false |
|
||||
| @home | false |
|
||||
| @boss | false |
|
||||
And I have a project "collapse those contexts" that has the following todos
|
||||
| description | context |
|
||||
| test 1 | @ipad |
|
||||
| test 2 | @home |
|
||||
| test 3 | @boss |
|
||||
When I go to the home page
|
||||
Then I should see "test 1" in the context container for "@ipad"
|
||||
And I should see "test 2" in the context container for "@home"
|
||||
And I should see "test 3" in the context container for "@boss"
|
||||
When I collapse the context container of "@home"
|
||||
And I collapse the context container of "@boss"
|
||||
And I collapse the context container of "@ipad"
|
||||
Then I should not see "test 1"
|
||||
And I should not see "test 2"
|
||||
And I should not see "test 3"
|
||||
When I toggle all collapsed context containers
|
||||
Then I should not see the context container for "@home"
|
||||
And I should not see the context container for "@boss"
|
||||
And I should not see the context container for "@ipad"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue