Skip to content

Commit c0c5a1d

Browse files
committed
Changed js method for getting all the libraries from /libraries page.
Taking the machine name from data attribute of each library row.
1 parent 0a7726f commit c0c5a1d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/target_libraries/test_target_libraries.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@
88

99
GET_ALL_LIBRARIES_SCRIPT = """
1010
var libraries = {};
11-
var humanNameRegExp = /^.+\((.+)\)$/;
1211
$('#mycontainer').find('.library-expand-handle').map(function () {
13-
var libraryName = $(this).text();
14-
if (humanNameRegExp.test(libraryName)) {
15-
libraryName = libraryName.match(humanNameRegExp)[1].trim().replace(/\.h/, '');
16-
}
12+
var libraryName = $(this).parents('.accordion-group').attr('data-name');
1713
libraries[libraryName] = $(this).parent().find('.library_link').attr('href');
1814
});
1915
return libraries;
@@ -38,6 +34,7 @@ def test_compile_target_libraries(self):
3834

3935
urls_to_follow = []
4036
for target in targets:
37+
target = target.lower()
4138
if target in libraries:
4239
library_url = libraries[target]
4340
self.open(library_url)

0 commit comments

Comments
 (0)