Closed Bug 1032759 Opened 10 years ago Closed 8 years ago

[testing] Test Filter Tasks According to Estimated Time

Categories

(Mozilla QA Graveyard :: One and Done, defect, P5)

Version 2
x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: bitgeeky, Assigned: bitgeeky)

Details

Attachments

(2 files)

This is the first test in series of task filteration tests.
Assignee: nobody → mozpankaj1994
Bob there are two task filters 
One on the home page and the other on the available tasks page.

So which one we want to test ? (Both are identical, so performing filtering operations on one will take care of the other)

Also if we click more than one checkbox for estimated time(say 15 min and 30 min) what is the criteria on which the tasks get displayed in this case ?

It will be great if you yourself add a test case for this one, since you developed the task filtering menu and know exactly how the things should be.
Flags: needinfo?(bob.silverberg)
(In reply to Pankaj Malhotra (:bitgeeky) from comment #1)
> Bob there are two task filters 
> One on the home page and the other on the available tasks page.
> 
> So which one we want to test ? (Both are identical, so performing filtering
> operations on one will take care of the other)

It's true they both should act the same. I would suggest just testing the one on the available tasks page.

> 
> Also if we click more than one checkbox for estimated time(say 15 min and 30
> min) what is the criteria on which the tasks get displayed in this case ?

That's a good question. Because the test is a `lte` [1], I would expect that any tasks with an execution time less than or equal to any of the checkboxes would work, but that's actually kind of confusing. I would suggest testing it manually to see how it behaves.

> 
> It will be great if you yourself add a test case for this one, since you
> developed the task filtering menu and know exactly how the things should be.

I think you have it mostly figured out already, so I think you can write up the test case. To reiterate what I said above, if multiple checkboxes are checked then any tasks with an execution time that is less than or equal to *any* of the checkboxes should be included. 

In order to write this test you'll need to add a number of tasks via the API so you can know what kind of results to expect. Probably the best way to approach this would be to add a bunch of tasks with a unique keyword and then use a combination of the keyword and execution time so that you can predict the exact number of tasks that should be returned.

The task API which allows tasks to be added will need to be updated to deal with the new database format. Can you please open a bug to make that change and work on that as a high priority as we will need that to do task filtering testing, and also to test other features of the site.

[1] https://github.com/mozilla/oneanddone/blob/master/oneanddone/tasks/filters.py#L25
Flags: needinfo?(bob.silverberg)
I was just working on the filtering bug and discovered that the MultipleChoiceFilter that we are using for Execution Time does not support `lte`, it only supports ==, which is fine because we are providing users with all of the options.

This means that the filter should select only tasks where the execution time is exactly equal to one of the values selected.
Test Case:

1 Using REST API create 5 tasks of each Estimated Time choice(15, 30, 45, 60)
2 Create an existing user using API
3 Login using existing user
4 Navigate to available task page
5 Verify that none of the Estimated Time checkbox is selected
6 Verify that count of displayed tasks is greater than 0
7 Select a single checkbox (30 min) and click filter tasks
8 Verify that all the displayed task objects have estimated time equal to 30 min
9 Click available task to navigate back to task filter
10 Select the 15 and 60 min checkbox and click filter tasks
11 Verify that all the task objects have their estimated time to be 15 or 60 min
12 Click available task to navigate back to task filter
13 Select the 30 and 45 min checkbox and click filter tasks
14 Verify that all the task objects have their estimated time to be 30 or 45 min
Bob, could you please have a look and let me know if the test case looks fine ?
Flags: needinfo?(bob.silverberg)
(In reply to Pankaj Malhotra (:bitgeeky) from comment #4)

Thanks bitgeeky. Here is some feedback:

> Test Case:
> 
> 1 Using REST API create 5 tasks of each Estimated Time choice(15, 30, 45, 60)

I'm not sure you need 5 of each. You can probably get away with one of 15, one of 30 and 2 of 45. I don't think we need to test all the possible combinations. With just those tasks you can verify that no execution time filter yields 4 tasks, execution time of 15 yields 1, execution time of 45 yields 2, and execution time of 15 & 30 yields 2.

> 2 Create an existing user using API
> 3 Login using existing user

You don't need steps 2 and 3. A non logged in user can filter tasks via the available tasks page.

> 4 Navigate to available task page
> 5 Verify that none of the Estimated Time checkbox is selected
> 6 Verify that count of displayed tasks is greater than 0

In order to be able to check actual counts, you will need to add a unique keyword to each task you added (i.e., include a timestamp in the keyword). Then, each time you want to check results, enter that keyword in the search, and also enter the other criteria (e.g., execution time of 15).

Let me know if the above is clear.
Flags: needinfo?(bob.silverberg)
Oh, one more thing: Please make sure that any tasks that you create are deleted at the end of the test. Try to use the same method that we use for users (i.e., conftest.py fixtures).
Added required css selector.
Attachment #8463137 - Flags: review?(bob.silverberg)
Test passes locally on adding required css selector and merging the pulls for Bug 1038618 and Bug 1043794
Attachment #8463138 - Flags: review?(bob.silverberg)
Priority: -- → P5
Target Milestone: --- → Future
Attachment #8463137 - Flags: review?(bob.silverberg)
Attachment #8463138 - Flags: review?(bob.silverberg)
The way that filters will work is going to change in the near future, so this bug doesn't really make sense anymore.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: