-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc20521
commit ccfbb2a
Showing
23 changed files
with
185 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,5 @@ coverage.xml | |
|
||
# Sphinx documentation | ||
docs/_build/ | ||
# mkdocs documentation | ||
site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
17 changes: 17 additions & 0 deletions
17
...ookiecutter.project }}/ckanext/{{ cookiecutter.project_shortname }}/tests/e2e/conftest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import annotations | ||
|
||
from typing import Any | ||
|
||
import pytest | ||
from playwright.sync_api import expect | ||
|
||
expect.set_options(timeout=1000) | ||
|
||
|
||
@pytest.fixture | ||
def browser_context_args( | ||
browser_context_args: dict[str, Any], ckan_config: dict[str, Any] | ||
): | ||
"""Modify playwright's standard configuration of browser's context.""" | ||
browser_context_args["base_url"] = ckan_config["ckan.site_url"] | ||
return browser_context_args |
15 changes: 15 additions & 0 deletions
15
...okiecutter.project }}/ckanext/{{ cookiecutter.project_shortname }}/tests/e2e/test_home.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Tests for UI.""" | ||
|
||
from __future__ import annotations | ||
|
||
import pytest | ||
from playwright.sync_api import Page | ||
|
||
import ckan.plugins.toolkit as tk | ||
|
||
|
||
@pytest.mark.playwright | ||
def test_homepage(page: Page): | ||
"""Homepage shows about link.""" | ||
page.goto(tk.url_for("home.index")) | ||
assert page.get_by_text("about").count() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ext/toolbelt/cli/cookiecutter/extended/{{ cookiecutter.project }}/test_config/default.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[app:main] | ||
use = config:../../ckan/test-core.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from ckan import plugins | ||
from ckan import plugins as p | ||
|
||
|
||
class ToolbeltPlugin(plugins.SingletonPlugin): | ||
class ToolbeltPlugin(p.SingletonPlugin): | ||
pass |
Oops, something went wrong.