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

Develop to master - fix email notifications #87

Merged
merged 10 commits into from
Dec 6, 2023
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CKAN_GIT_VERSION=$CKAN_VERSION
CKAN_GIT_ORG=qld-gov-au

if [ "$CKAN_VERSION" = "2.10" ]; then
CKAN_GIT_VERSION=ckan-2.10.1-qgov.4
CKAN_GIT_VERSION=ckan-2.10.1-qgov.10
PYTHON_VERSION=py3
PYTHON="${PYTHON}3"
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- set num = activities|length -%}
{% set num = activities|length %}{{ ngettext("You have {num} new activity on your {site_title} dashboard", "You have {num} new activities on your {site_title} dashboard", num).format(site_title=g.site_title if g else site_title, num=num) }} {{ _('To view your dashboard, click on this link:') }}

{{ ungettext("You have {num} new activity on your {site_title} dashboard", "You have {num} new activities on your {site_title} dashboard", num).format(site_title=g.site_title, num=num) }}:
{% url_for 'activity.dashboard', _external=True %}

{% for activity in activities -%}
{%- set data = activity['data'] if activity['data'] else None -%}
Expand All @@ -15,12 +15,9 @@
{%- set action = 'organization.read' if activity_type == 'changed organization' else 'group.read' -%}
{%- endif -%}
{%- endif -%}
{% if action and id %}{{name}} ({{ h.activity_type_nice(activity_type)|capitalize }}) {{ h.url_for(action, id=id, _external=True) }}{% if activity_type %}{% endif %}{% endif %}
{% if action and id %}{{name}} {% if activity_type %}({{ (activity_type|replace('organization', _('organization'))|replace('package', 'dataset')|capitalize).split()|reverse|join(' ') }}){% endif %} {% url_for action, id=id, _external=True %}{% endif %}
{% endfor %}
{{ _('To view your dashboard, click on this link:') }}

{{ g.site_url + '/dashboard' }}
{{ _('You can turn off these email notifications in your {site_title} preferences. To change your preferences, click on this link:').format(site_title=g.site_title if g else site_title) }}

{{ _('You can turn off these email notifications in your {site_title} preferences. To change your preferences, click on this link:').format(site_title=g.site_title) }}

{{ g.site_url + '/user/edit' }}
{% url_for 'user.edit', _external=True %}
4 changes: 2 additions & 2 deletions test/features/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def log_in_directly(context):
assert context.persona, "A persona is required to log in, found [{}] in context. Have you configured the personas in before_scenario?".format(context.persona)
context.execute_steps(u"""
When I attempt to log in with password "$password"
Then I should see an element with xpath "//a[@title='Log out']"
Then I should see an element with xpath "//*[@title='Log out']/i[contains(@class, 'fa-sign-out')]"
""")


Expand Down Expand Up @@ -513,7 +513,7 @@ def go_to_admin_config(context):
@when(u'I log out')
def log_out(context):
context.execute_steps(u"""
When I visit "/user/_logout"
When I press the element with xpath "//*[@title='Log out']"
Then I should see "Log in"
""")

Expand Down