Skip to content

Commit

Permalink
Sanitize submit text.
Browse files Browse the repository at this point in the history
- Add all issue supporting files for future tests.
  • Loading branch information
rickypc committed Sep 23, 2015
1 parent f2d6558 commit 945999c
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.2.5 (2015.09.22)

* Bugfixes

### 1.2.4 (2015.08.28)

* Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selenium-page-object-generator",
"version": "1.2.4",
"version": "1.2.5",
"description": "A nimble and flexible Selenium Page Object Model generator to improve agile testing process velocity.",
"dependencies": {},
"devDependencies": {
Expand Down
18 changes: 18 additions & 0 deletions specs/issues/001.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<body>
<h1>Debiana</h1>
<label for="UserName">User Name</label>
<br>
<input maxlength="50" autocomplete="off" class="textfield" id="username" name="username" type="text" value>
<br>
<label for="Password">Password</label>
<br>
<input maxlength="25" autocomplete="off" class="textfield" id="password" name="password" type="password">
<br>
<!--
[FindsBy(How = How.Id, Using = "username")] [CacheLookup] private IWebElement debianaUserNamePassword1;
[FindsBy(How = How.Id, Using = "password")] [CacheLookup] private IWebElement debianaUserNamePassword2;
-->
</body>
</html>
20 changes: 20 additions & 0 deletions specs/issues/002.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<style>
.container {
border: 1px solid blue;
}
</style>
</head>
<body>
<div class="container">
<input type="checkbox" id="cat_someLongId1"/> This is checkbox 1<br/>
<input type="checkbox" id="cat_someLongId2"/> This is checkbox 2<br/>
<input type="checkbox" id="cat_someLongId3"/> This is checkbox 3<br/>
<input type="checkbox" id="cat_someLongId4"/> This is checkbox 4<br/>
<input type="checkbox" id="cat_someLongId5"/> This is checkbox 5<br/>
</div>
<input type="checkbox" id="other"/> This is the other checkbox<br/>
</body>
</html>
14 changes: 14 additions & 0 deletions specs/issues/003.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<input value="I'm Feeling Lucky" aria-label="I'm Feeling Lucky" id="gbqfbb" name="btnI" type="submit">
<!--
public GoogleHomePage submit() {
clickI&#x27;mFeelingLuckyButton();
return this;
}
-->
</body>
</html>
3 changes: 2 additions & 1 deletion src/chrome/assets/js/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,8 @@ window.POG=(function() {
sourceIndex: -1,
target: {
modelName: input.model.target,
name: getLetter('Click ' + submit.text + ' ' + submit.label, input.operations.letter)
name: getLetter('Click ' + getSanitizedText(submit.text) + ' ' +
submit.label, input.operations.letter)
},
type: 'submit'
};
Expand Down

0 comments on commit 945999c

Please sign in to comment.