from os import getenv from pytest import mark from alumnium.tools import DragSliderTool driver_type = getenv("ALUMNIUM_DRIVER", "selenium") @mark.xfail("appium" in driver_type, reason="Drag slider is not implemented in Appium yet") def test_drag_slider(al_factory, navigate): al = al_factory(extra_tools=[DragSliderTool]) navigate("slider.html") al.do("drag the slider to 70") al.check("the slider value is 70") al.do("drag the slider to 33") al.check("the slider value is 33") @mark.xfail("appium" in driver_type, reason="Drag slider is not implemented in Appium yet") def test_drag_aria_slider(al_factory, navigate): al = al_factory(extra_tools=[DragSliderTool]) navigate("aria_slider.html") al.do("drag the distance slider to 70") al.check("the distance is 70 miles") al.do("drag the distance slider to 30") al.check("the distance is 30 miles") @mark.xfail("appium" in driver_type, reason="Drag slider is not implemented in Appium yet") def test_drag_controlled_slider(al_factory, navigate): al = al_factory(extra_tools=[DragSliderTool]) navigate("controlled_slider.html") al.do("drag the storage slider to 20") al.check("the storage is 20 TB") @mark.xfail("appium" in driver_type, reason="Drag slider is not implemented in Appium yet") def test_drag_range_slider(al_factory, navigate): al = al_factory(extra_tools=[DragSliderTool]) navigate("range_slider.html") al.do("drag the maximum price slider to 20") al.check("the price is $0 – $20") al.do("drag the minimum price slider to 15") al.check("the price is $15 – $20")