File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,23 @@ def test_swag_labs_basic_flow(self, username):
86
86
@pytest .mark .run (order = 2 )
87
87
def test_swag_labs_products_page_links (self , username ):
88
88
""" This test checks for 404s on the Swag Labs products page.
89
- This test is parameterized on the login user. """
89
+ This test is parameterized on the login user.
90
+ Swag Labs replaced broken links with dog images for the
91
+ "problem_user" login, so the test switches those back
92
+ to demonstrate the "assert_no_404_errors()" method. """
90
93
self .login_to_swag_labs (username = username )
94
+ self .set_attributes ('img[src*="/sl-404"]' , "src" , "/bad_link.jpg" )
91
95
self .assert_no_404_errors ()
96
+
97
+ @parameterized .expand ([
98
+ ["standard_user" ],
99
+ ["problem_user" ],
100
+ ])
101
+ @pytest .mark .run (order = 3 )
102
+ def test_swag_labs_visual_regressions (self , username ):
103
+ """ This test checks for visual regressions on the Swag Labs page.
104
+ This test is parameterized on the login user. """
105
+ self .login_to_swag_labs (username = "standard_user" )
106
+ self .check_window (baseline = True )
107
+ self .login_to_swag_labs (username = username )
108
+ self .check_window (level = 3 )
You can’t perform that action at this time.
0 commit comments