From 09536c527df0266453a7a38786781abaaf35dded Mon Sep 17 00:00:00 2001 From: addshore Date: Fri, 8 Jun 2018 13:08:49 +0100 Subject: [PATCH] selenium: page spec, make it easier to see where strings come from Having randomly generated strings is great, but sometimes it can help to allow a human to easily see where the string is actually being generated in code, so add an optional suffix to the string being generated. Change-Id: Ibfe45f74b4880a70a76c01223a787dabcd43607e --- tests/selenium/specs/page.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js index dfc6fa1ae8..bc5f1009d7 100644 --- a/tests/selenium/specs/page.js +++ b/tests/selenium/specs/page.js @@ -10,8 +10,8 @@ describe( 'Page', function () { var content, name; - function getTestString() { - return Math.random().toString() + '-öäü-♠♣♥♦'; + function getTestString( suffix = 'defaultsuffix' ) { + return Math.random().toString() + '-öäü-♠♣♥♦-' + suffix; } before( function () { @@ -22,8 +22,8 @@ describe( 'Page', function () { beforeEach( function () { browser.deleteCookie(); - content = getTestString(); - name = getTestString(); + content = getTestString( 'beforeEach-content' ); + name = getTestString( 'beforeEach-name' ); } ); it( 'should be creatable', function () { @@ -36,7 +36,7 @@ describe( 'Page', function () { } ); it( 'should be re-creatable', function () { - let initialContent = getTestString(); + let initialContent = getTestString( 'initialContent' ); // create browser.call( function () { -- 2.20.1