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

Fix issue 47 in calendar view #48

Merged
merged 3 commits into from
Jul 16, 2021
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
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)
eamanu marked this conversation as resolved.
Show resolved Hide resolved
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#")