Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6952f62
new featue-shabbat time
elor555 Feb 23, 2021
c745b37
edit
elor555 Feb 23, 2021
58d8fba
edit
elor555 Feb 24, 2021
4d2e3d3
edit
elor555 Feb 24, 2021
f4451ca
edit
elor555 Feb 24, 2021
03f8200
edit
elor555 Feb 24, 2021
09f3447
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 Feb 24, 2021
ad29c3b
edit
elor555 Feb 24, 2021
e82ad81
edit
elor555 Feb 24, 2021
5805579
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 Feb 24, 2021
e2612a9
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
elor555 Feb 24, 2021
55e82fa
Details Message
elor555 Feb 25, 2021
c422398
Details Message
elor555 Feb 25, 2021
a027151
Details Message
elor555 Feb 25, 2021
d07f516
Details Message
elor555 Feb 25, 2021
e49b624
Merge remote-tracking branch 'upstream/develop' into feature/shabbatime
elor555 Feb 25, 2021
d1da1f3
fix: flake8
elor555 Feb 25, 2021
00450c3
fix: many code improvements
elor555 Feb 25, 2021
1d21cd2
fix: many code improvements
elor555 Feb 25, 2021
10e5b04
fix: style improvements
elor555 Feb 25, 2021
5ef54f1
Merge remote-tracking branch 'upstream/develop' into feature/shabbatime
elor555 Feb 26, 2021
48cae11
fix: improvments
elor555 Feb 26, 2021
2e8be84
fix: improvments
elor555 Feb 26, 2021
7a4c32c
fix: improvments
elor555 Feb 26, 2021
e519138
fix: BUGFIX
elor555 Feb 26, 2021
6c580dd
fix: BUGFIX
elor555 Feb 26, 2021
ea4e41b
fix: STYLE
elor555 Feb 26, 2021
b0bb745
fix: bugfix
elor555 Feb 27, 2021
8fea1f5
fix: bugfix
elor555 Feb 27, 2021
bc9f14f
Merge remote-tracking branch 'upstream/develop' into feature/shabbatime
elor555 Mar 1, 2021
50c42d2
fix: improvment
elor555 Mar 1, 2021
1c743c3
fix: bugfix
elor555 Mar 2, 2021
935a9de
fix: bugfix
elor555 Mar 2, 2021
4c6a434
fix: bugfix
elor555 Mar 2, 2021
c8cf12f
fix: bugfix
elor555 Mar 3, 2021
bf56e9b
fix : adding information
elor555 Mar 3, 2021
f89ea45
fix : bugfix
elor555 Mar 3, 2021
ba2f35c
fix : bugfix
elor555 Mar 3, 2021
421e70b
fix : bugfix
elor555 Mar 10, 2021
8d3e106
fix : bugfix
elor555 Mar 10, 2021
9e22801
fix : bugfix
elor555 Mar 10, 2021
7313c85
fix : bugfix
elor555 Mar 10, 2021
855a871
fix : bugfix
elor555 Mar 11, 2021
b7c8067
fix : bugfix
elor555 Mar 11, 2021
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/develop' into feature/shabbatime
# Conflicts:
#	app/routers/dayview.py
#	app/static/dayview.css
#	tests/test_dayview.py
#	tests/test_weekview.py
  • Loading branch information
elor555 committed Feb 25, 2021
commit e49b62494e4df1a329ff03ac293a15e15f15a4bd
5 changes: 5 additions & 0 deletions app/routers/dayview.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

from app.database.models import Event, User
from app.dependencies import get_db, templates
from app.internal import international_days, zodiac
from app.internal.security.dependencies import current_user

# from app.internal.security.schema import CurrentUser
from app.internal import international_days, locations, shabbat, zodiac
from app.routers.user import get_all_user_events

Expand Down Expand Up @@ -227,6 +231,7 @@ async def dayview(
"international_day": inter_day,
"zodiac": zodiac_obj,
"view": view,
"current_time": current_time_with_attrs,
"user_location": location,
"shabbat": shabbat_obj,
},
Expand Down
9 changes: 9 additions & 0 deletions app/static/dayview.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ body {
height: 1.2rem;
}

#current_time_cursor {
border-bottom: 2.5px dotted rgba(255, 0, 0, 0.808);
}

#all-day-events {
background-color: var(--primary);
word-spacing: 0.25em;
}

.new-location {
position: absolute;
right: 1.2rem;
Expand Down
15 changes: 10 additions & 5 deletions tests/test_dayview.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,16 @@ def test_wrong_timeformat(session, dayview_test_client):
assert response.status_code == 404


def test_dayview_html(
event1, event2, event3, session, user, client,
user_location, shabbat):
def test_dayview_html(event1, event2, event3, session, dayview_test_client):
dayview_test_client.post(
dayview_test_client.app.url_path_for("register"),
data=REGISTER_DETAIL,
)
dayview_test_client.post(
dayview_test_client.app.url_path_for("login"),
data=LOGIN_DATA,
)
user = session.query(User).filter_by(username="correct_user").first()
create_dayview_event([event1, event2, event3], session=session, user=user)
response = dayview_test_client.get("/day/2021-2-1")
soup = BeautifulSoup(response.content, "html.parser")
Expand All @@ -181,8 +188,6 @@ def test_dayview_html_with_multiday_event(
dayview_test_client,
day,
grid_position,
user_location,
shabbat,
):
dayview_test_client.post(
dayview_test_client.app.url_path_for("register"),
Expand Down
30 changes: 20 additions & 10 deletions tests/test_weekview.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,32 @@ def test_get_week_dates(weekdays, sunday):
assert week_dates[i].strftime("%A") == weekdays[i]


def test_weekview_day_names(
session, user, client, weekdays,
user_location, shabbat):
response = client.get("/week/2021-1-3")
def test_weekview_day_names(session, user, weekview_test_client, weekdays):
weekview_test_client.post(
weekview_test_client.app.url_path_for("register"),
data=REGISTER_DETAIL,
)
weekview_test_client.post(
weekview_test_client.app.url_path_for("login"),
data=LOGIN_DATA,
)
response = weekview_test_client.get("/week/2021-1-3")
soup = BeautifulSoup(response.content, "html.parser")
day_divs = soup.find_all("div", {"class": "day-name"})
for i in range(6):
assert weekdays[i][:3].upper() in str(day_divs[i])


def test_weekview_day_dates(
session, user, client, sunday,
user_location, shabbat):
response = client.get("/week/2021-1-3")
def test_weekview_day_dates(session, weekview_test_client, sunday):
weekview_test_client.post(
weekview_test_client.app.url_path_for("register"),
data=REGISTER_DETAIL,
)
weekview_test_client.post(
weekview_test_client.app.url_path_for("login"),
data=LOGIN_DATA,
)
response = weekview_test_client.get("/week/2021-1-3")
soup = BeautifulSoup(response.content, "html.parser")
day_divs = soup.find_all("span", {"class": "date-nums"})
week_dates = list(get_week_dates(sunday))
Expand All @@ -69,8 +81,6 @@ def test_weekview_html_events(
weekview_test_client,
date,
event,
user_location,
shabbat
):
weekview_test_client.post(
weekview_test_client.app.url_path_for("register"),
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.