Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 160b9d2

Browse files
chalinkwalrath
authored andcommitted
tests(toh-[1-4]): e2e - support space in hero name (#2117)
1 parent c931b56 commit 160b9d2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

public/docs/_examples/toh-1/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Hero {
1919
let _name = await detail.element(by.css('h2')).getText();
2020
return {
2121
id: +_id.substr(_id.indexOf(' ') + 1),
22-
name: _name.substr(0, _name.indexOf(' '))
22+
name: _name.substr(0, _name.lastIndexOf(' '))
2323
};
2424
}
2525
}

public/docs/_examples/toh-2/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Hero {
3131
let _name = await detail.element(by.css('h2')).getText();
3232
return {
3333
id: +_id.substr(_id.indexOf(' ') + 1),
34-
name: _name.substr(0, _name.indexOf(' '))
34+
name: _name.substr(0, _name.lastIndexOf(' '))
3535
};
3636
}
3737
}

public/docs/_examples/toh-3/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Hero {
3131
let _name = await detail.element(by.css('h2')).getText();
3232
return {
3333
id: +_id.substr(_id.indexOf(' ') + 1),
34-
name: _name.substr(0, _name.indexOf(' '))
34+
name: _name.substr(0, _name.lastIndexOf(' '))
3535
};
3636
}
3737
}

public/docs/_examples/toh-4/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Hero {
3131
let _name = await detail.element(by.css('h2')).getText();
3232
return {
3333
id: +_id.substr(_id.indexOf(' ') + 1),
34-
name: _name.substr(0, _name.indexOf(' '))
34+
name: _name.substr(0, _name.lastIndexOf(' '))
3535
};
3636
}
3737
}

0 commit comments

Comments
 (0)