Skip to content

Commit

Permalink
Merge pull request #48 from Juerodriguez/fix-47-calendar
Browse files Browse the repository at this point in the history
Fix issue 47 in calendar view
  • Loading branch information
eamanu authored Jul 16, 2021
2 parents 2ceffc3 + 6f8b026 commit 743a1ca
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions controllers/agenda.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def calendar():
query = (db.agenda.created_by == auth.user.id)
# query&=(db.agenda.cumplido==None)
query &= (db.agenda.estado == "P")
query &= (db.agenda.vencimiento != None)
rows = db(query).select()
return dict(rows=rows)

Expand Down
39 changes: 39 additions & 0 deletions tests/test_d_agenda_issue47.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
def test_agenda_issue47_calendar_with_expiration(page, login):
# Click text=Agenda
page.click("text=Agenda")
assert page.url.endswith("/agenda/agenda")
# Click text=Agregar
page.click("text=Agregar")
assert page.url.endswith("/agenda/agenda/new/agenda")
# Click input[name="_autocomplete_expediente_numero_aux"]
page.click("input[name=\"_autocomplete_expediente_numero_aux\"]")
# Fill input[name="_autocomplete_expediente_numero_aux"]
page.fill("input[name=\"_autocomplete_expediente_numero_aux\"]", "1111")
# Click input[name="vencimiento"]
page.click("input[name=\"vencimiento\"]")
# Click :nth-match(:text("29"), 2)
page.click(":nth-match(:text(\"29\"), 2)")
# Click input[name="titulo"]
page.click("input[name=\"titulo\"]")
# Fill input[name="titulo"]
page.fill("input[name=\"titulo\"]", "tarea")
# Click text=Enviar
page.click("text=Enviar")
assert page.url.endswith("/agenda/agenda/new/agenda#")

def test_agenda_issue47_calendar_without_expiration(page, login):
# Click text=Agenda
page.click("text=Agenda")
# Click text=Agregar
page.click("text=Agregar")
page.click("input[name=\"_autocomplete_expediente_numero_aux\"]")
# Fill input[name="_autocomplete_expediente_numero_aux"]
page.fill("input[name=\"_autocomplete_expediente_numero_aux\"]", "1111")
# Click input[name="titulo"]
page.click("input[name=\"titulo\"]")
# Fill input[name="titulo"]
page.fill("input[name=\"titulo\"]", "tarea sin vencimiento")
# Click text=Enviar
page.click("text=Enviar")
assert page.url.endswith("/agenda/agenda/new/agenda#")

0 comments on commit 743a1ca

Please sign in to comment.