Skip to content

Commit b9bd5a8

Browse files
tobias-kuendigNaktibalda
authored andcommitted
Fix see when source code contains <= JS operator (#4510)
* Added new test case * Remove script tags before using strip_tags
1 parent 5c3c866 commit b9bd5a8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/data/app/view/info.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,14 @@
4444
<a id="third-link">Third</a>
4545
</div>
4646

47+
<script>
48+
var a = 2;
49+
var b = 3;
50+
if (a <= b) {
51+
console.log('a is less than b!');
52+
}
53+
</script>
54+
<p>Text behind JS comparision</p>
55+
4756
</body>
4857
</html>

tests/unit/Codeception/Module/PhpBrowserTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ public function testLinksWithNonLatin()
7171
$this->module->click('Ссылочка');
7272
}
7373

74+
/**
75+
* @see https://github.com/Codeception/Codeception/issues/4509
76+
*/
77+
public function testSeeTextAfterJSComparisionOperator()
78+
{
79+
$this->module->amOnPage('/info');
80+
$this->module->see('Text behind JS comparision');
81+
}
7482

7583
public function testSetMultipleCookies()
7684
{

0 commit comments

Comments
 (0)