2017-12-03 15:02:14 +00:00
|
|
|
import pytest
|
2018-01-24 10:58:58 +00:00
|
|
|
from pages.openbounty.bounties import BountiesPage
|
2018-04-06 11:58:07 +00:00
|
|
|
from pages.openbounty.activity import ActivityPage
|
2017-12-03 15:02:14 +00:00
|
|
|
from tests.basetestcase import BaseTestCase
|
2018-01-24 10:58:58 +00:00
|
|
|
from tests import test_data
|
2017-12-03 15:02:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.sanity
|
|
|
|
class TestLogin(BaseTestCase):
|
|
|
|
|
2018-04-25 08:46:15 +00:00
|
|
|
def test_deploy_new_contract(self):
|
|
|
|
|
|
|
|
# Waiting for deployed contract; test_data.issue created here
|
|
|
|
self.github_org.create_new_bounty()
|
|
|
|
self.github_org.get_deployed_contract()
|
|
|
|
|
|
|
|
# Navigate and check top bounty in "Open bounties"
|
|
|
|
bounties_page = BountiesPage(self.driver_dev)
|
|
|
|
bounties_page.get_bounties_page()
|
|
|
|
titles = bounties_page.bounty_titles.find_elements()
|
|
|
|
assert titles[0].text == test_data.issue['title']
|
2018-01-24 10:58:58 +00:00
|
|
|
|
2018-04-06 11:58:07 +00:00
|
|
|
def test_new_claim(self):
|
|
|
|
self.github_dev.create_pr_git('test_branch_%s' % self.github_dev.time_now)
|
2018-04-25 08:46:15 +00:00
|
|
|
self.github_dev.open_pr_github('Fixes')
|
|
|
|
|
|
|
|
# check new claim in "Open bounties"
|
|
|
|
bounties_page = BountiesPage(self.driver_dev)
|
|
|
|
bounties_page.get_bounties_page()
|
|
|
|
bounties_page.check_bounty_claims_amount(test_data.issue['title'], '1 open claim')
|
|
|
|
|
|
|
|
# check new claim in "Activity"
|
|
|
|
activity_page = ActivityPage(self.driver_dev)
|
|
|
|
activity_page.get_activity_page()
|
|
|
|
activity_page.check_activity_is_presented('Submitted a claim for ', test_data.issue['title'])
|
2018-04-06 11:58:07 +00:00
|
|
|
|
2018-01-24 10:58:58 +00:00
|
|
|
|
2018-01-26 18:12:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-24 10:58:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|