Skip to content

Instantly share code, notes, and snippets.

View Marlena's full-sized avatar

Marlena Compton Marlena

View GitHub Profile
Marlena / gist:1108040
Created July 26, 2011 21:05
locators and their vagueries
Preferred hierarchy for locators:
Marlena / gist:1093866
Created July 19, 2011 22:09
Where stuff is in zamboni
html pages for adding ids:
css media/css
Marlena / validator
Created July 19, 2011 00:12
process of adding validator test
The process of adding a validator test
When a validator has a problem, someone (Jorge probably) files a bug with the error message.
Matt isolates the bug and writes a unit test for it.
A functional test also needs to be written. The functional test runs the addon through the validator and checks that the same error messages does not show up.
Here is a bug:
Marlena / Marks and builds
Created July 15, 2011 14:47
Marks and builds
This is an attempt to sort out having tests for zamboni pages and impala pages in one codebase.
Tests will get marks:
def test_the_header_layout(self, testsetup):
def test_the_header_layout(self, testsetup):
Marlena / gist:1018028
Created June 10, 2011 00:01
Tree terminology
directed/digraph - edges are ordered, have direction
antiparallel edges - edges that go both ways are ok. should never have parallel
Marlena / code review checklist
Created June 8, 2011 19:18
What I check for when I do code review for AMO selenium tests
Filename matches first classname
* filename is lowercase with underscores between words
* class name is camelcase and THE SAME as file name
Files with tests do not contain "self.selenium"
Locators are in CSS - (btw css can do children)
Marlena / gist:930398
Created April 20, 2011 04:49
locating unordered list through dom in js
Node.lastChild-1 for max page number. (next link is last)
// Access single unordered list: [0] index
var unorderedList = document.getElementsByTagName('ul')[0];
// Create Node list of all list items within the UL:
var allListItems = unorderedList.getElementsByTagName('li');
// Now, we can loop through each list item using a FOR loop:
From forked & updated repo:
create branch
-git branch litmus_11759_test_blank_search (create branch)
-git checkout litmus_11759_test_blank_search (switch to that branch)
-git checkout -b litmus_11759_test_blank_search (create & switch to branch)
import pagerank
4 import sys
5 import simplejson
7 file = sys.argv[1]
8 json_data = open(file)
9 #print json_data
10 pages_list = json.load(json_data)
11 print pages_listt
12 print "#######"