Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
huyhung9630 committed Sep 19, 2024
2 parents e961dd8 + d52fdf3 commit b7011e9
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 116 deletions.
23 changes: 10 additions & 13 deletions EXPIRATION_TIMES_CHANGE/tc0101.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import time
import os

def tc_01_01():
def test_01_01():
with SB(
extension_dir=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'temp', 'metamask-chrome'))
) as sb:
sb.sleep(5)
sb.sleep(15)
sb.switch_to_window(1)
sb.click('input[data-testid="onboarding-terms-checkbox"]')
sb.click('button:contains("Import an existing wallet")')
Expand All @@ -34,7 +34,7 @@ def tc_01_01():
sb.click('button:contains("Got it")')
sb.click('button:contains("Next")')
sb.click('button:contains("Done")')
sb.sleep(5)
sb.sleep(15)
sb.click('button[data-testid="network-display"]')
sb.click('input[type="checkbox"]')
sb.click('p:contains("Sepolia")')
Expand All @@ -43,32 +43,29 @@ def tc_01_01():
sb.click('button:contains("Connect")')
sb.click('span:contains("Connect a Wallet")')
sb.click('button:contains("MetaMask")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Next")')
sb.click('button:contains("Confirm")')
sb.switch_to_window(2)
sb.switch_to_window(3)
sb.click('button.css-hnz0pg')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.switch_to_window(3)
sb.click('button:contains("Create")')
sb.click('span:contains("Mint a NFT to an Existing Collection")')
buttons = sb.find_elements('button:contains("Select")')
sb.sleep(7)
buttons[2].click()

sb.click('span:contains("Add an Artwork to an Existing Series")')
sb.click('span.ButtonBlock__Text-sc-z43f5s-2.dnuSfD.button-block__content')
sb.type('input#name', "autotest0101 expiration")
sb.type('textarea#description', "autotestautotestautotestautotest")
img_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'img', 'Ed-Sheeran-posing.jpg'))
sb.choose_file('input[type="file"]', img_path)
sb.click('span:contains("Mint later")')
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(30)
sb.click('button:contains("Cancel")') #Confirm
sb.sleep(15)

if __name__ == "__main__":
tc_01_01()
test_01_01()
25 changes: 13 additions & 12 deletions EXPIRATION_TIMES_CHANGE/tc0102.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import time
import os

def tc_01_02(url):
def test_01_02():
with SB(
extension_dir=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'temp', 'metamask-chrome'))
) as sb:
sb.sleep(5)
url = "https://development.arttaca.io/nft/test-muti/3"
sb.sleep(15)
sb.switch_to_window(1)
sb.click('input[data-testid="onboarding-terms-checkbox"]')
sb.click('button:contains("Import an existing wallet")')
Expand All @@ -34,7 +35,7 @@ def tc_01_02(url):
sb.click('button:contains("Got it")')
sb.click('button:contains("Next")')
sb.click('button:contains("Done")')
sb.sleep(5)
sb.sleep(15)
sb.click('button[data-testid="network-display"]')
sb.click('input[type="checkbox"]')
sb.click('p:contains("Sepolia")')
Expand All @@ -43,25 +44,25 @@ def tc_01_02(url):
sb.click('button:contains("Connect")')
sb.click('span:contains("Connect a Wallet")')
sb.click('button:contains("MetaMask")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Next")')
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('button.css-hnz0pg')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('button:contains("List Now")')
sb.type('input#reservePrice', "0.0000001")
sb.type('input#reservePrice', "0.00001")
sb.click('span:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(30)
sb.click('button:contains("Reject")') #Confirm
sb.sleep(15)

if __name__ == "__main__":
tc_01_02("https://development.arttaca.io/nft/hehehehehehe/3")
test_01_02()
23 changes: 12 additions & 11 deletions EXPIRATION_TIMES_CHANGE/tc0103.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import time
import os

def tc_01_03(url):
def test_01_03():
with SB(
extension_dir=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'temp', 'metamask-chrome'))
) as sb:
sb.sleep(5)
url="https://development.arttaca.io/nft/test-listing/2"
sb.sleep(15)
sb.switch_to_window(1)
sb.click('input[data-testid="onboarding-terms-checkbox"]')
sb.click('button:contains("Import an existing wallet")')
Expand All @@ -34,7 +35,7 @@ def tc_01_03(url):
sb.click('button:contains("Got it")')
sb.click('button:contains("Next")')
sb.click('button:contains("Done")')
sb.sleep(5)
sb.sleep(15)
sb.click('button[data-testid="network-display"]')
sb.click('input[type="checkbox"]')
sb.click('p:contains("Sepolia")')
Expand All @@ -43,22 +44,22 @@ def tc_01_03(url):
sb.click('button:contains("Connect")')
sb.click('span:contains("Connect a Wallet")')
sb.click('button:contains("MetaMask")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Next")')
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('button.css-hnz0pg')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('button:contains("Unlist")')
sb.click('button:contains("Yes")')
sb.click('button:contains("Close")')
sb.sleep(30)
sb.click('button:contains("No")') #Yes
# sb.click('button:contains("Close")')
sb.sleep(15)

if __name__ == "__main__":
tc_01_03("https://development.arttaca.io/nft/hehehehehehe/1")
test_01_03()
9 changes: 5 additions & 4 deletions EXPIRATION_TIMES_CHANGE/tc0104.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import time
import os

def tc_01_04(url):
def test_01_04():
with SB(
extension_dir=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'temp', 'metamask-chrome'))
) as sb:
url = "https://development.arttaca.io/nft/hieukkkk/6"
sb.sleep(5)
sb.switch_to_window(1)
sb.click('input[data-testid="onboarding-terms-checkbox"]')
Expand Down Expand Up @@ -57,12 +58,12 @@ def tc_01_04(url):
sb.switch_to_window(3)
sb.click('div.ThreeDots__ThreeDotButton-sc-1wt0g0h-0.EZXOj.three-dots')
sb.click('button:contains("Transfer")')
sb.type('input[placeholder="Search by user name or address"]',"0x9Ea8a7F39e7bC81A08f16b3e6d097d1Cc4C5cE6D")
sb.type('input[placeholder="Search by username or address"]',"0x9Ea8a7F39e7bC81A08f16b3e6d097d1Cc4C5cE6D")
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.click('button:contains("Reject")') #Confirm
sb.sleep(30)

if __name__ == "__main__":
tc_01_04("https://development.arttaca.io/nft/hehehehehehe/1")
test_01_04()
23 changes: 12 additions & 11 deletions EXPIRATION_TIMES_CHANGE/tc0105.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import time
import os

def tc_01_05(url):
def test_01_05():
with SB(
extension_dir=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'temp', 'metamask-chrome'))
) as sb:
sb.sleep(5)
url = "https://development.arttaca.io/nft/test-listing/4"
sb.sleep(15)
sb.switch_to_window(1)
sb.click('input[data-testid="onboarding-terms-checkbox"]')
sb.click('button:contains("Import an existing wallet")')
Expand All @@ -34,7 +35,7 @@ def tc_01_05(url):
sb.click('button:contains("Got it")')
sb.click('button:contains("Next")')
sb.click('button:contains("Done")')
sb.sleep(5)
sb.sleep(15)
sb.click('button[data-testid="network-display"]')
sb.click('input[type="checkbox"]')
sb.click('p:contains("Sepolia")')
Expand All @@ -43,25 +44,25 @@ def tc_01_05(url):
sb.click('button:contains("Connect")')
sb.click('span:contains("Connect a Wallet")')
sb.click('button:contains("MetaMask")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Next")')
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('button.css-hnz0pg')
sb.sleep(30)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('div.ThreeDots__ThreeDotButton-sc-1wt0g0h-0.EZXOj.three-dots')
sb.click('button:contains("Burn")')
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.click('button:contains("Cancel")') #Confirm
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(30)
sb.sleep(15)

if __name__ == "__main__":
tc_01_05("https://development.arttaca.io/nft/hehehehehehe/1")
test_01_05()
23 changes: 12 additions & 11 deletions EXPIRATION_TIMES_CHANGE/tc0106.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import time
import os

def tc_01_06(url):
def test_01_06():
with SB(
extension_dir=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'temp', 'metamask-chrome'))
) as sb:
sb.sleep(5)
url = "https://development.arttaca.io/nft/test-listing/4"
sb.sleep(15)
sb.switch_to_window(1)
sb.click('input[data-testid="onboarding-terms-checkbox"]')
sb.click('button:contains("Import an existing wallet")')
Expand All @@ -34,7 +35,7 @@ def tc_01_06(url):
sb.click('button:contains("Got it")')
sb.click('button:contains("Next")')
sb.click('button:contains("Done")')
sb.sleep(5)
sb.sleep(15)
sb.click('button[data-testid="network-display"]')
sb.click('input[type="checkbox"]')
sb.click('p:contains("Sepolia")')
Expand All @@ -43,25 +44,25 @@ def tc_01_06(url):
sb.click('button:contains("Connect")')
sb.click('span:contains("Connect a Wallet")')
sb.click('button:contains("MetaMask")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Next")')
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('button.css-hnz0pg')
sb.sleep(30)
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.sleep(15)
sb.switch_to_window(3)
sb.click('div.ThreeDots__ThreeDotButton-sc-1wt0g0h-0.EZXOj.three-dots')
sb.click('button:contains("Burn")')
sb.click('button:contains("Confirm")')
sb.sleep(7)
sb.click('button:contains("Cancel")') #Confirm
sb.sleep(15)
sb.switch_to_window(4)
sb.click('button:contains("Confirm")')
sb.sleep(30)
sb.sleep(15)

if __name__ == "__main__":
tc_01_06("https://development.arttaca.io/nft/hehehehehehe/3")
test_01_06()
Loading

0 comments on commit b7011e9

Please sign in to comment.