Skip to content

Commit

Permalink
Fixing broken search field. (#255)
Browse files Browse the repository at this point in the history
Extended manual for bug report workflow.
  • Loading branch information
stolpeo committed Nov 25, 2021
1 parent 6df7cc7 commit 75dd9fd
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 9 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ End-User Summary
- Fixing Kiosk mode of VarFish.
- Fixing displaying of beacon information in results table.
- Fixing broken flags & comments popup for structural variants.
- Fixing broken search field.
- Extended manual for bug report workflow.

Full Change List
================
Expand All @@ -23,6 +25,8 @@ Full Change List
- Mapping kiosk jobs to import queue.
- Fixing displaying of beacon information in results table.
- Fixing broken flags & comments popup for structural variants.
- Fixing broken search field.
- Extended manual for bug report workflow.

-------
v0.23.9
Expand Down
155 changes: 155 additions & 0 deletions docs_manual/bug_reports.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
.. _bug_reports:

================================
Bug Reports and Feature Requests
================================

We do organize bug reports and feature request in the
`Github issue tracker <https://github.com/bihealth/varfish-server/issues/new/choose>`_.
Please choose the template that fits best what you want to report and fill out
the questions to help us decide on how to approach the task.

-----------
Bug Reports
-----------

The template for bug reports has the following form (an up-to-date form is located in the Github issue tracker)::

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.

^^^^^^^^^^^^^^^^^^^
Root Cause Analysis
^^^^^^^^^^^^^^^^^^^

In the following, a root cause analysis (RCA) needs to be done. The ticket will get an answer with the title
**Root Cause Analysis** and a thorough description of what might cause the bug.

^^^^^^^^^^^^^^^^^^^
Resolution Proposal
^^^^^^^^^^^^^^^^^^^

When the root cause is determined, a solution needs to be proposed, following this form::

**Resolution Proposal**

e.g. The component X needs to be changed to Y so Z is not executed when M occurs.

**Affected Components**

e.g. VarFish server

**Affected Modules/Files**

e.g. variants module or queries.py

**Required Architectural Changes**

e.g. Function F needs to be moved to X.

**Resolution Sketch**

e.g. Change X in F. Then do Y.


^^^^^^^^^^^^^^^^^^
Fix & Pull Request
^^^^^^^^^^^^^^^^^^

1. Create new branch (name starts with issue number), e.g. ``123-fix-for-issue``
2. Create pull request in "Draft" state
3. Fix problem, ideally in a test-driven way, remove "Draft" state

^^^^^^^^^^^^^^
Review & Merge
^^^^^^^^^^^^^^

1. Perform code review
2. Ensure fix is documented in changelog (link to bug and PR #ids)

----------------
Feature Requests
----------------

A feature request follows the same workflow as a bug request (an up-to-date form is located in the Github issue tracker)::

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


^^^^^^
Design
^^^^^^

In the following, the design of the feature needs to be specified::

**Implementation Proposal**

e.g. The component X needs to be changed to Y so Z is not executed when M occurs.

**Affected Components**

e.g. VarFish server

**Affected Modules/Files**

e.g. variants module or queries.py

**Required Architectural Changes**

e.g. Function F needs to be moved to X.

**Implementation Sketch**

e.g. Change X in F. Then do Y.

^^^^^^^^^^^^^^^^
Implement & Test
^^^^^^^^^^^^^^^^

1. Create feature branch, named starting with issue ID
2. Perform implementation, ideally in a test-driven way
3. Tests and documentation must be augmented/updated as well

^^^^^^^^^^^^^^
Review & Merge
^^^^^^^^^^^^^^

1. Perform code review
2. Ensure change is documented in changelog (link to feature issue and PR #ids)
1 change: 1 addition & 0 deletions docs_manual/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Currently, the main focus is on small/sequence variants called from high-througp
:titlesonly:

contributors
bug_reports
history
glossary
dev_docker
Expand Down
4 changes: 2 additions & 2 deletions variants/templates/variants/_search_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{# Name & link column #}
<td>
<div class="sodar-overflow-container">
{% highlight_search_term item.name search_term as item_display_name %}
{% highlight_search_term item.name search_terms as item_display_name %}
<a href="{{ item.get_absolute_url }}">
{% autoescape off %}{{ item_display_name }}{% endautoescape %}
</a>
Expand All @@ -29,7 +29,7 @@
<td class="sodar-overflow-container">
{% autoescape off %}
{% for entry in item.pedigree %}
{% highlight_search_term entry.patient|only_source_name search_term %}{% if not forloop.last %}, {% endif %}
{% highlight_search_term entry.patient|only_source_name search_terms %}{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endautoescape %}
</td>
Expand Down
25 changes: 18 additions & 7 deletions variants/tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,12 @@ def test_variant_filter_case_display_loading(self):
self.compile_url_and_login(
{"project": self.case.project.sodar_uuid, "case": self.case.sodar_uuid}
)
# find & hit button
# Wait until button is a submit button.
WebDriverWait(self.selenium, self.wait_time).until(
wait_for_the_attribute_value((By.ID, "submitFilter"), "data-event-type", "submit")
)
# Click button.
button = self.selenium.find_element_by_id("submitFilter")
self.assertEqual(button.get_attribute("data-event-type"), "submit")
button.click()
WebDriverWait(self.selenium, self.wait_time).until(
ec.presence_of_element_located((By.ID, "logger"))
Expand All @@ -490,10 +493,12 @@ def test_variant_filter_case_display_cancel(self):
self.compile_url_and_login(
{"project": self.case.project.sodar_uuid, "case": self.case.sodar_uuid}
)
# find & hit button
time.sleep(5)
# Wait until button is a submit button.
WebDriverWait(self.selenium, self.wait_time).until(
wait_for_the_attribute_value((By.ID, "submitFilter"), "data-event-type", "submit")
)
# Find & hit button.
button = self.selenium.find_element_by_id("submitFilter")
self.assertEqual(button.get_attribute("data-event-type"), "submit")
button.click()
WebDriverWait(self.selenium, self.wait_time).until(
ec.presence_of_element_located((By.ID, "logger"))
Expand Down Expand Up @@ -751,9 +756,12 @@ def test_variant_joint_filter_display_loading(self):
"""Test if submitting the filter initiates the loading response."""
# login
self.compile_url_and_login({"project": self.project.sodar_uuid})
# Wait until button is a submit button.
WebDriverWait(self.selenium, self.wait_time).until(
wait_for_the_attribute_value((By.ID, "submitFilter"), "data-event-type", "submit")
)
# find & hit button
button = self.selenium.find_element_by_id("submitFilter")
self.assertEqual(button.get_attribute("data-event-type"), "submit")
button.click()
WebDriverWait(self.selenium, self.wait_time).until(
ec.presence_of_element_located((By.ID, "logger"))
Expand All @@ -767,9 +775,12 @@ def test_variant_joint_filter_display_cancel(self):
"""Test if submitting the filter can be canceled."""
# login
self.compile_url_and_login({"project": self.project.sodar_uuid})
# Wait until button is a submit button.
WebDriverWait(self.selenium, self.wait_time).until(
wait_for_the_attribute_value((By.ID, "submitFilter"), "data-event-type", "submit")
)
# find & hit button
button = self.selenium.find_element_by_id("submitFilter")
self.assertEqual(button.get_attribute("data-event-type"), "submit")
button.click()
WebDriverWait(self.selenium, self.wait_time).until(
ec.presence_of_element_located((By.ID, "logger"))
Expand Down

0 comments on commit 75dd9fd

Please sign in to comment.