Skip to content

Commit

Permalink
Remove visit of main page in start of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andmedoctopus committed Dec 29, 2023
1 parent e741974 commit ea8e351
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def test_status_code(self):

def test_can_open_page_in_new_tab(self):
"""should be able to visit url in a new tab"""
self.browser.visit(EXAMPLE_APP)
self.browser.windows.current.new_tab(EXAMPLE_APP)
self.browser.windows[1].is_current = True
self.assertEqual(EXAMPLE_APP, self.browser.url)
Expand Down
4 changes: 0 additions & 4 deletions tests/click_elements.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# Copyright 2012 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from .fake_webapp import EXAMPLE_APP


class ClickElementsTest:
def test_click_links(self):
self.browser.links.find_by_text("FOO").click()
self.assertIn("BAR!", self.browser.html)
self.browser.visit(EXAMPLE_APP)

def test_click_element_by_css_selector(self):
self.browser.find_by_css('a[href="http://localhost:5000/foo"]').click()
self.assertIn("BAR!", self.browser.html)
self.browser.visit(EXAMPLE_APP)

def test_click_input_by_css_selector(self):
self.browser.find_by_css('input[name="send"]').click()
self.assertIn("My name is: Master Splinter", self.browser.html)
self.browser.visit(EXAMPLE_APP)
2 changes: 0 additions & 2 deletions tests/form_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import pytest

from .fake_webapp import EXAMPLE_APP
from splinter.exceptions import ElementDoesNotExist


Expand Down Expand Up @@ -109,7 +108,6 @@ def test_submiting_a_form_and_verifying_page_content(self):
self.browser.fill("query", "my name")
self.browser.find_by_name("send").click()
self.assertIn("My name is: Master Splinter", self.browser.html)
self.browser.visit(EXAMPLE_APP)

def test_can_choose_a_radio_button(self):
"should provide a way to choose a radio button"
Expand Down

0 comments on commit ea8e351

Please sign in to comment.