import pytest
# Testing: https://w3c.github.io/core-aam/#role-map-button
TEST_HTML = {
"no-attributes": "
click me
",
"aria-pressed-undefined": "click me
",
"aria-haspopup-undefined": "click me
",
"aria-haspopup-false": "click me
",
}
@pytest.mark.parametrize("test_html", TEST_HTML.values(), ids=TEST_HTML.keys())
def test_atspi(atspi, session, inline, test_html):
session.url = inline(test_html)
# Spec:
# Role: ROLE_PUSH_BUTTON
node = atspi.find_node("test", session.url)
assert atspi.Accessible.get_role(node) == atspi.Role.PUSH_BUTTON
# @pytest.mark.parametrize("test_html", TEST_HTML.values(), ids=TEST_HTML.keys())
# def test_axapi(axapi, session, inline):
# session.url = inline(test_html)
#
# # Spec:
# # AXRole: AXButton
# # AXSubrole:
# @pytest.mark.parametrize("test_html", TEST_HTML.values(), ids=TEST_HTML.keys())
# def test_ia2(ia2, session, inline):
# session.url = inline(test_html)
#
# # Spec:
# # Role: ROLE_SYSTEM_PUSHBUTTON
# @pytest.mark.parametrize("test_html", TEST_HTML.values(), ids=TEST_HTML.keys())
# def test_uia(uia, session, inline):
# session.url = inline(test_html)
#
# # Spec:
# # Control Type: Button