Skip to content

Commit fbadbdd

Browse files
committed
Update example tests
1 parent 1eed251 commit fbadbdd

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

examples/translations/english_test_1.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33

44
class MyTestClass(BaseCase):
55
def test_example_1(self):
6-
url = "https://store.xkcd.com/collections/posters"
7-
self.open(url)
8-
self.type("input.search-input", "xkcd book\n")
9-
self.assert_text("xkcd: volume 0", "h3")
10-
self.click("li.checkout-link a")
11-
self.assert_text("Shopping Cart", "#page-title")
12-
self.assert_element("div#umbrella")
13-
self.open("https://xkcd.com/353/")
14-
self.assert_title("xkcd: Python")
15-
self.assert_element('img[alt="Python"]')
16-
self.click('a[rel="license"]')
17-
self.assert_text("back to this page")
18-
self.go_back()
19-
self.click_link("About")
20-
self.assert_exact_text("xkcd.com", "h2")
6+
self.open("https://www.saucedemo.com")
7+
self.type("#user-name", "standard_user")
8+
self.type("#password", "secret_sauce\n")
9+
self.assert_element("#inventory_container")
10+
self.assert_exact_text("PRODUCTS", "span.title")
11+
self.click('button[name*="backpack"]')
12+
self.click("#shopping_cart_container a")
13+
self.assert_exact_text("YOUR CART", "span.title")
14+
self.assert_text("Backpack", "div.cart_item")
15+
self.click('button:contains("Remove")') # HTML innerText
16+
self.assert_text_not_visible("Backpack", "div.cart_item")
17+
self.js_click("a#logout_sidebar_link")

examples/translations/portuguese_test_1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_exemplo_1(self):
1414
self.js_digitar("#searchform input", "Florianópolis")
1515
self.clique("#searchform button")
1616
self.verificar_texto("Florianópolis", "h1#firstHeading")
17-
self.verificar_elemento('img[alt*="Avenida Beira Mar"]')
17+
self.verificar_elemento('td:contains("Avenida Beira-Mar")')
1818
self.voltar()
1919
self.verificar_verdade("João" in self.obter_url_atual())
2020
self.js_digitar("#searchform input", "Teatro Amazonas")

0 commit comments

Comments
 (0)