forked from extsoft/dp-151
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'InformationBlock' class was created in oct/pages/product_page.py.
'open_brand_page' method, 'open_share_link' method were moved from the 'ProductPage(Page)' class to 'InformationBlock' class. 'add_to_wish_list' method was created and added to 'InformationBlock' class. This method adds the product to the wish list. 'MessageBlock' class was created in oct/pages/product_page.py. 'has_wish_list_message' method was created and added to 'MessageBlock' class. This method checks that the message about adding product to the wish list is displayed. 'information_block' method and 'messages' method were created and added to 'ProductPage(Page)' class. adding_to_wish_list.py module in oct/tests/web was created for implementation and running the test case.
- Loading branch information
1 parent
de10944
commit 8edc1b9
Showing
4 changed files
with
66 additions
and
13 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
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,21 @@ | ||
# pylint: disable=no-self-use # pyATS-related exclusion | ||
from selenium.webdriver import Remote | ||
from pyats.aetest import Testcase, test | ||
from oct.browsers import Chrome | ||
from oct.tests import run_testcase | ||
from oct.pages.product_page import ProductPage | ||
|
||
|
||
class AddingProductToWishList(Testcase): | ||
@test | ||
def test_adding_to_wish_list(self, grid: str) -> None: | ||
chrome: Remote = Chrome(grid) | ||
product_page = ProductPage(chrome, "41", "iMac") | ||
product_page.open() | ||
product_page.loaded() | ||
product_page.information_block().add_to_wish_list() | ||
assert product_page.messages().has_wish_list_message() | ||
|
||
|
||
if __name__ == "__main__": | ||
run_testcase() |
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
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