tests(toh-[1-4]): e2e - support space in hero name (#2117)

This commit is contained in:
Patrice Chalin 2016-08-17 09:20:17 -07:00 committed by Kathy Walrath
parent c931b56f4a
commit 160b9d2812
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ class Hero {
let _name = await detail.element(by.css('h2')).getText(); let _name = await detail.element(by.css('h2')).getText();
return { return {
id: +_id.substr(_id.indexOf(' ') + 1), id: +_id.substr(_id.indexOf(' ') + 1),
name: _name.substr(0, _name.indexOf(' ')) name: _name.substr(0, _name.lastIndexOf(' '))
}; };
} }
} }

View File

@ -31,7 +31,7 @@ class Hero {
let _name = await detail.element(by.css('h2')).getText(); let _name = await detail.element(by.css('h2')).getText();
return { return {
id: +_id.substr(_id.indexOf(' ') + 1), id: +_id.substr(_id.indexOf(' ') + 1),
name: _name.substr(0, _name.indexOf(' ')) name: _name.substr(0, _name.lastIndexOf(' '))
}; };
} }
} }

View File

@ -31,7 +31,7 @@ class Hero {
let _name = await detail.element(by.css('h2')).getText(); let _name = await detail.element(by.css('h2')).getText();
return { return {
id: +_id.substr(_id.indexOf(' ') + 1), id: +_id.substr(_id.indexOf(' ') + 1),
name: _name.substr(0, _name.indexOf(' ')) name: _name.substr(0, _name.lastIndexOf(' '))
}; };
} }
} }

View File

@ -31,7 +31,7 @@ class Hero {
let _name = await detail.element(by.css('h2')).getText(); let _name = await detail.element(by.css('h2')).getText();
return { return {
id: +_id.substr(_id.indexOf(' ') + 1), id: +_id.substr(_id.indexOf(' ') + 1),
name: _name.substr(0, _name.indexOf(' ')) name: _name.substr(0, _name.lastIndexOf(' '))
}; };
} }
} }