Skip to content

Commit 238867a

Browse files
author
konstantina
committed
Fixed Firefox issue when running test_library_fetch.py test.
When run locally test_library_fetch.py on Firefox didn't work as expected. There was no control that the library or the example url was opened and test continued normally. Fixed this behavior and now we check that each url was correctly opened.
1 parent 0cbbc75 commit 238867a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

codebender_testing/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,12 @@ def open_all_libraries_and_examples(self, url, logfile):
539539
tic = time.time()
540540
for url in urls_to_visit:
541541
self.open(url)
542+
url_name = url.split('/')[-1]
543+
name = self.get_element(By.CSS_SELECTOR, '#mycontainer h1 small').text
544+
name = re.sub('[()]', '', name).split('.')[0]
545+
if (name != url_name):
546+
print "Didn't open url: ", url
547+
542548
test_status = True
543549
if library_re.match(url) and self.driver.current_url == 'https://codebender.cc/libraries':
544550
test_status = False

0 commit comments

Comments
 (0)