2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
urllib3,
|
|
|
|
selenium,
|
|
|
|
cssselect,
|
|
|
|
django,
|
|
|
|
flask,
|
|
|
|
lxml,
|
|
|
|
pytestCheckHook,
|
|
|
|
zope-testbrowser,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "splinter";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.21.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cobrateam";
|
|
|
|
repo = "splinter";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-PGGql8yI1YosoUBAyDoI/8k7s4sVYnXEV7eow3GHH88=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ urllib3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
"zope.testbrowser" = [
|
|
|
|
zope-testbrowser
|
|
|
|
lxml
|
|
|
|
cssselect
|
|
|
|
];
|
|
|
|
django = [
|
|
|
|
django
|
|
|
|
lxml
|
|
|
|
cssselect
|
|
|
|
];
|
|
|
|
flask = [
|
|
|
|
flask
|
|
|
|
lxml
|
|
|
|
cssselect
|
|
|
|
];
|
2023-03-15 16:39:30 +00:00
|
|
|
selenium = [ selenium ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-12 18:23:04 +00:00
|
|
|
pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabledTests = [
|
|
|
|
# driver is present and fails with a different error during loading
|
2022-07-14 12:49:19 +00:00
|
|
|
"test_browser_local_driver_not_present"
|
2023-03-15 16:39:30 +00:00
|
|
|
"test_browser_log_missing_drivers"
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_local_driver_not_present"
|
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"samples"
|
2022-07-14 12:49:19 +00:00
|
|
|
# We run neither Chromium nor Firefox nor ...
|
|
|
|
"tests/test_async_finder.py"
|
2023-03-15 16:39:30 +00:00
|
|
|
"tests/test_element_is_visible.py"
|
2022-07-14 12:49:19 +00:00
|
|
|
"tests/test_html_snapshot.py"
|
|
|
|
"tests/test_iframes.py"
|
|
|
|
"tests/test_mouse_interaction.py"
|
2021-07-03 03:11:41 +00:00
|
|
|
"tests/test_popups.py"
|
2022-07-14 12:49:19 +00:00
|
|
|
"tests/test_screenshot.py"
|
|
|
|
"tests/test_shadow_root.py"
|
2021-04-12 18:23:04 +00:00
|
|
|
"tests/test_webdriver.py"
|
|
|
|
"tests/test_webdriver_chrome.py"
|
2021-12-06 16:07:01 +00:00
|
|
|
"tests/test_webdriver_edge_chromium.py"
|
2021-04-12 18:23:04 +00:00
|
|
|
"tests/test_webdriver_firefox.py"
|
|
|
|
"tests/test_webdriver_remote.py"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
pythonImportsCheck = [ "splinter" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://splinter.readthedocs.io/en/latest/news.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Browser abstraction for web acceptance testing";
|
|
|
|
homepage = "https://github.com/cobrateam/splinter";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|