Git Product home page Git Product logo

mcom-tests's People

Contributors

alexgibson avatar alint avatar ana-yankova avatar bebef1987 avatar bobsilverberg avatar chirarobert avatar craigcook avatar davehunt avatar dchunwong avatar gauthierm avatar glogiotatidis avatar jgmize avatar jlongster avatar jpetto avatar klrmn avatar kyoshino avatar m8ttyb avatar pablofiumara avatar pmac avatar rbillings avatar retornam avatar rik avatar roarange avatar sgarrity avatar singhabhinavds avatar stephendonner avatar stupchiy avatar teodosia avatar vaidik avatar viorelaioia avatar

Watchers

 avatar

mcom-tests's Issues

Investigate fixing/changing the static homepage-link tests (test_major_link_destinations_are_correct)

From @stephendonner on January 7, 2015 17:26

Let's re-evaluate the static homepage-link tests, which it looks like (due to frequent changes) we'd have to update often, like to address this recent failure:

09:13:05 =================================== FAILURES ===================================
09:13:05 ____________ TestHomePage.test_major_link_destinations_are_correct _____________
09:13:05 [gw1] darwin -- Python 2.7.5 /Users/Shared/Jenkins/Home/jobs/mozilla.com.dev.saucelabs/workspace/.env/bin/python
09:13:05 self = <tests.test_home.TestHomePage instance at 0x102fce368>
09:13:05 mozwebqa = <pytest_mozwebqa.pytest_mozwebqa.TestSetup instance at 0x102fc3320>
09:13:05
09:13:05 @pytest.mark.nondestructive
09:13:05 def test_major_link_destinations_are_correct(self, mozwebqa):
09:13:05 home_page = HomePage(mozwebqa)
09:13:05 home_page.go_to_page()
09:13:05 bad_links = []
09:13:05 for link in home_page.major_links_list:
09:13:05 url = home_page.link_destination(link.get('locator'))
09:13:05 if not url.endswith(link.get('url_suffix')):
09:13:05 bad_links.append('%s does not end with %s' % (url, link.get('url_suffix')))
09:13:05 > Assert.equal(0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))
09:13:05
09:13:05 tests/test_home.py:36:
09:13:05 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
09:13:05
09:13:05 self = <class 'unittestzero.Assert'>, first = 0, second = 2
09:13:05 msg = u'2 bad links found: https://webmaker.org/ does not end with //sendto.mozilla....rg_largeblock, https://webmaker.org/appmaker does not end with //webmaker.org/'
09:13:05
09:13:05 @classmethod
09:13:05 def equal(self, first, second, msg=None):
09:13:05 """
09:13:05 Asserts that 2 elements are the same
09:13:05
09:13:05 :Args:
09:13:05 - First object to be tested
09:13:05 - Second object to be tested
09:13:05 - Message that will be printed if it fails
09:13:05 """
09:13:05 > assert first == second, msg
09:13:05 E AssertionError: 2 bad links found: https://webmaker.org/ does not end with //sendto.mozilla.org/page/contribute/givenow-seq?preset=2&source=mozillaorg_largeblock&ref=EOYFR2014&utm_campaign=EOYFR2014&utm_source=mozilla.org&utm_medium=referral&utm_content=mozillaorg_largeblock, https://webmaker.org/appmaker does not end with //webmaker.org/
09:13:05
09:13:05 .env/lib/python2.7/site-packages/unittestzero.py:55: AssertionError
09:13:05 ------------------------------- pytest-mozwebqa --------------------------------
09:13:05 Failing URL: https://www-dev.allizom.org/en-US/

Page object: https://github.com/mozilla/mcom-tests/blob/master/pages/desktop/home.py#L18
Test: https://github.com/mozilla/mcom-tests/blob/master/tests/test_home.py#L28

Copied from original issue: mozilla/mcom-tests#373

Investigate fixing/changing the static homepage-link tests (test_major_link_destinations_are_correct)

From @stephendonner on January 7, 2015 17:26

Let's re-evaluate the static homepage-link tests, which it looks like (due to frequent changes) we'd have to update often, like to address this recent failure:

09:13:05 =================================== FAILURES ===================================
09:13:05 ____________ TestHomePage.test_major_link_destinations_are_correct _____________
09:13:05 [gw1] darwin -- Python 2.7.5 /Users/Shared/Jenkins/Home/jobs/mozilla.com.dev.saucelabs/workspace/.env/bin/python
09:13:05 self = <tests.test_home.TestHomePage instance at 0x102fce368>
09:13:05 mozwebqa = <pytest_mozwebqa.pytest_mozwebqa.TestSetup instance at 0x102fc3320>
09:13:05
09:13:05 @pytest.mark.nondestructive
09:13:05 def test_major_link_destinations_are_correct(self, mozwebqa):
09:13:05 home_page = HomePage(mozwebqa)
09:13:05 home_page.go_to_page()
09:13:05 bad_links = []
09:13:05 for link in home_page.major_links_list:
09:13:05 url = home_page.link_destination(link.get('locator'))
09:13:05 if not url.endswith(link.get('url_suffix')):
09:13:05 bad_links.append('%s does not end with %s' % (url, link.get('url_suffix')))
09:13:05 > Assert.equal(0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))
09:13:05
09:13:05 tests/test_home.py:36:
09:13:05 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
09:13:05
09:13:05 self = <class 'unittestzero.Assert'>, first = 0, second = 2
09:13:05 msg = u'2 bad links found: https://webmaker.org/ does not end with //sendto.mozilla....rg_largeblock, https://webmaker.org/appmaker does not end with //webmaker.org/'
09:13:05
09:13:05 @classmethod
09:13:05 def equal(self, first, second, msg=None):
09:13:05 """
09:13:05 Asserts that 2 elements are the same
09:13:05
09:13:05 :Args:
09:13:05 - First object to be tested
09:13:05 - Second object to be tested
09:13:05 - Message that will be printed if it fails
09:13:05 """
09:13:05 > assert first == second, msg
09:13:05 E AssertionError: 2 bad links found: https://webmaker.org/ does not end with //sendto.mozilla.org/page/contribute/givenow-seq?preset=2&source=mozillaorg_largeblock&ref=EOYFR2014&utm_campaign=EOYFR2014&utm_source=mozilla.org&utm_medium=referral&utm_content=mozillaorg_largeblock, https://webmaker.org/appmaker does not end with //webmaker.org/
09:13:05
09:13:05 .env/lib/python2.7/site-packages/unittestzero.py:55: AssertionError
09:13:05 ------------------------------- pytest-mozwebqa --------------------------------
09:13:05 Failing URL: https://www-dev.allizom.org/en-US/

Page object: https://github.com/mozilla/mcom-tests/blob/master/pages/desktop/home.py#L18
Test: https://github.com/mozilla/mcom-tests/blob/master/tests/test_home.py#L28

Copied from original issue: mozilla/mcom-tests#373

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.