Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inverted backlog filter to Chalk Planning work context #139

Merged
merged 2 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions tests/dont_filter_edit_test.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import pytest

from helpers.label_helpers import (clear_label_filters, toggle_label_filter,
toggle_label_filter_section)
from helpers.label_helpers import (toggle_label_filter, toggle_label_filter_section)
from helpers.todo_helpers import (add_todo, cancel_edit, edit_todo, find_todo,
find_todos, wait_for_todo,
wait_for_todo_to_disappear)


@pytest.mark.parametrize('test_name', ['Todo: Don\'t Filter During Edit'])
def test_dont_filter_edit(page, todo_prefix):
# Remove default filter
clear_label_filters(page)

# Add todos
todo1_description = f'{todo_prefix} todo to edit'
add_todo(page, todo1_description)
Expand Down
6 changes: 1 addition & 5 deletions tests/label_filtering_test.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import pytest

from helpers.label_helpers import (add_todo_w_labels, clear_label_filters,
get_label_filter_status, toggle_label_filter,
from helpers.label_helpers import (add_todo_w_labels, get_label_filter_status, toggle_label_filter,
toggle_label_filter_section)
from helpers.todo_helpers import (list_todo_descriptions, wait_for_todo,
wait_for_todo_to_disappear)


@pytest.mark.parametrize('test_name', ['Label: Label Filtering'])
def test_label_filtering(page, todo_prefix):
# Remove default filter
clear_label_filters(page)

# Add todos w/ labels
todo_5min_low_desc = f'{todo_prefix} test todo - 5min low energy'
add_todo_w_labels(page, todo_5min_low_desc, ['low-energy', '5 minutes'])
Expand Down
6 changes: 3 additions & 3 deletions tests/label_persistence_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

@pytest.mark.parametrize('test_name', ['Label: Label Persistence'])
def test_label_persistence(page, todo_prefix):
# Remove default filter
clear_label_filters(page)

# Add todo w/ 5 min & errand labels
todo_description = f'{todo_prefix} test todo'
labels = ['errand', '5 minutes']
todo_item = add_todo_w_labels(page, todo_description, labels)

# Remove default filter
clear_label_filters(page)

# Verify labels are selected
todo_labels = todo_item.locator('[data-testid="todo-labels"] > div').all_text_contents()
assert todo_labels == labels
1 change: 1 addition & 0 deletions ui/js/src/redux/workspaceSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const workContexts: { [key: string]: WorkContext } = {
displayName: 'Chalk Planning',
labels: {
Chalk: FILTER_STATUS.Active,
backlog: FILTER_STATUS.Inverted,
vague: FILTER_STATUS.Active,
},
},
Expand Down
3 changes: 3 additions & 0 deletions ui/js/src/selectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ describe('selectActiveWorkContext', function () {
workspace: {
filterLabels: {
Chalk: FILTER_STATUS.Active,
backlog: FILTER_STATUS.Inverted,
vague: FILTER_STATUS.Active,
},
},
Expand All @@ -279,6 +280,7 @@ describe('selectActiveWorkContext', function () {
workspace: {
filterLabels: {
Chalk: FILTER_STATUS.Active,
backlog: FILTER_STATUS.Inverted,
vague: FILTER_STATUS.Active,
Home: FILTER_STATUS.Active,
},
Expand All @@ -294,6 +296,7 @@ describe('selectActiveWorkContext', function () {
workspace: {
filterLabels: {
Chalk: FILTER_STATUS.Active,
backlog: FILTER_STATUS.Inverted,
},
},
};
Expand Down
Loading