-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73d0da5
commit a71d62b
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""page objects.""" | ||
from selenium.webdriver.common.by import By | ||
|
||
|
||
class Login: | ||
"""login class.""" | ||
email = (By.XPATH, '//*[@type="email"]') | ||
password = (By.XPATH, '//*[@type="password"]') | ||
login_button = (By.XPATH, '//button[text()="Login"]') | ||
undefined_message = (By.XPATH, '//*[@id="liveToast"]/div[2]') | ||
|
||
|
||
class Birthday: | ||
"""Birthday class.""" | ||
text1 = "//section[@class='task task--primary svelte-11utwz3']" | ||
text2 = '//button' | ||
birthday_button = (By.XPATH, text1+text2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""Module to test meeting page.""" | ||
import time | ||
from selenium import webdriver | ||
import pytest | ||
from pages.birthday import Login, Birthday | ||
from utils.base import BASEURL | ||
|
||
|
||
@pytest.fixture(name="driver1") | ||
def driver1_fixture(): | ||
"""Function to save driver fixture.""" | ||
driver = webdriver.Edge() | ||
driver.get(BASEURL) | ||
yield driver | ||
driver.quit() | ||
|
||
|
||
def to_login(driver1): | ||
"""Function to login in tests.""" | ||
email_input = driver1.find_element(*Login.email) | ||
email_input.send_keys("[email protected]") | ||
password_input = driver1.find_element(*Login.password) | ||
password_input.send_keys("123456789") | ||
login_button = driver1.find_element(*Login.login_button) | ||
login_button.click() | ||
time.sleep(3) | ||
|
||
|
||
def test_display_of_birthday_icon(driver1): | ||
"""Function to test birthday.""" | ||
to_login(driver1) | ||
birthday_button = driver1.find_element(*Birthday.birthday_button) | ||
button_text = birthday_button.text | ||
assert "🎂 BIRTHDAY" == button_text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"""base URL""" | ||
BASEURL = "https://cshr.gent01.dev.grid.tf/" |