# HG changeset patch # User Claus Gittinger # Date 1553857000 -3600 # Node ID 145d31a73d22cc436183f1ebd55607d8dd26412f # Parent f5fa86b510757d42e4ef989bb7a9c5d5a9daabb1 #UI_ENHANCEMENT by cg class: RegressionTests::HTMLParserTests added: #test01a #test01b #test01c #test02a #test02b diff -r f5fa86b51075 -r 145d31a73d22 RegressionTests__HTMLParserTests.st --- a/RegressionTests__HTMLParserTests.st Thu Mar 28 17:00:23 2019 +0100 +++ b/RegressionTests__HTMLParserTests.st Fri Mar 29 11:56:40 2019 +0100 @@ -1,3 +1,5 @@ +"{ Encoding: utf8 }" + "{ Package: 'stx:goodies/regression' }" "{ NameSpace: RegressionTests }" @@ -54,7 +56,9 @@ !HTMLParserTests methodsFor:'tests'! -test01 +test01a + "test the new parser" + |el| el := HTML::HTMLParser parseText:' @@ -64,11 +68,52 @@ "/ el inspect. " - self new test01 + self new test01a " + + "Created: / 29-03-2019 / 10:35:20 / Claus Gittinger" ! -test02 +test01b + "test the old parser" + + |el| + + el := HTMLParser parseText:' + + +'. + "/ el inspect. + + " + self new test01b + " + + "Created: / 29-03-2019 / 10:35:27 / Claus Gittinger" +! + +test01c + "test the old parser" + + |el| + + el := HTMLParser parseText:' + + + + +'. + + " + self new test01c + " + + "Created: / 29-03-2019 / 11:22:27 / Claus Gittinger" +! + +test02a + "test the new parser" + |doc| doc := HTML::HTMLParser parseText:' @@ -144,8 +189,99 @@ self assert:(doc children first tagName = 'head'). " - self new test02 + self new test02a " + + "Created: / 29-03-2019 / 10:35:45 / Claus Gittinger" +! + +test02b + "test the old parser" + + |doc firstMarkup| + + doc := HTMLParser parseText:' + + + + + Test Open + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Google Test Search
+
openhttp://www.google.com/webhp?hl=en 
verifyTitleGoogle 
typeqSelenium OpenQA
verifyValueqSelenium OpenQA
clickAndWaitbtnG 
verifyTextPresentopenqa.org 
verifyTitleSelenium OpenQA - Google Search 
+ + +'. + firstMarkup := doc markup. + firstMarkup isTextElement ifTrue:[ + firstMarkup := firstMarkup next + ]. + self assert:(firstMarkup tagName = 'html'). + + " + self new test02b + " + + "Created: / 29-03-2019 / 10:35:55 / Claus Gittinger" + "Modified: / 29-03-2019 / 11:54:05 / Claus Gittinger" ! test03