Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Merge pull request #408 from AndreiH/xfail-api
Browse files Browse the repository at this point in the history
Removed app cleanup for first test
  • Loading branch information
AlinT committed Dec 12, 2013
2 parents eb7cf2b + d726f4f commit eee1b69
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
2 changes: 2 additions & 0 deletions tests/desktop/developer_hub/test_api_submit.py
Expand Up @@ -4,6 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import pytest

from unittestzero import Assert

Expand All @@ -15,6 +16,7 @@

class TestAPI(BaseTest):

@pytest.mark.xfail(reason="https://github.com/mozilla/marketplace-tests/issues/400")
def test_assert_that_a_app_can_be_added_by_api(self, mozwebqa):
mock_app = MockApplication() # generate mock app
mock_app.name = 'API %s' % mock_app.name
Expand Down
37 changes: 10 additions & 27 deletions tests/desktop/developer_hub/test_developer_hub.py
Expand Up @@ -61,25 +61,17 @@ def test_packaged_app_submission(self, mozwebqa):
app_details.select_categories(*category)

app_details.screenshot_upload(app['screenshot_link'])
try:
next_steps = app_details.click_continue()
Assert.equal('Almost There!', next_steps.almost_there_message)

content_ratings = next_steps.click_continue()
Assert.equal('Get My App Rated', content_ratings.get_app_rated_message)
next_steps = app_details.click_continue()
Assert.equal('Almost There!', next_steps.almost_there_message)

# insert Submission ID and Security code to get app rated
content_ratings.fill_in_app_already_rated_info(app['submission_id'], app['security_code'])
content_ratings.click_submit()
Assert.equal('Content ratings successfully saved.', content_ratings.saved_ratings_message)
content_ratings = next_steps.click_continue()
Assert.equal('Get My App Rated', content_ratings.get_app_rated_message)

except Exception as exception:
Assert.fail(exception)
finally:
# Clean up app
edit_app = dev_home.go_to_apps_status_page(app)
delete_popup = edit_app.click_delete_app()
return delete_popup.delete_app()
# insert Submission ID and Security code to get app rated
content_ratings.fill_in_app_already_rated_info(app['submission_id'], app['security_code'])
content_ratings.click_submit()
Assert.equal('Content ratings successfully saved.', content_ratings.saved_ratings_message)

def test_hosted_paid_app_submission(self, mozwebqa):
app = MockApplication()
Expand Down Expand Up @@ -222,24 +214,15 @@ def test_hosted_app_submission(self, mozwebqa):
return delete_popup.delete_app()

def test_that_deletes_app(self, mozwebqa):
mock_app = MockApplication() # generate mock app
mock_app.name = 'API %s' % mock_app.name

# init API client
mk_api = MarketplaceAPI.get_client(mozwebqa.base_url,
mozwebqa.credentials)

mk_api.submit_app(mock_app) # submit app

app_status = mk_api.app_status(mock_app) # get app data from API

dev_home = Home(mozwebqa)
dev_home.go_to_developers_homepage()
dev_home.login(user="default")

my_apps = dev_home.header.click_my_submissions()

app_name = app_status['name']
first_free_app = my_apps.first_free_app
app_name = first_free_app.name

self._delete_app(mozwebqa, app_name)

Expand Down

0 comments on commit eee1b69

Please sign in to comment.