From 817baf7e91393e21af8607da549ca2ef2e3d2736 Mon Sep 17 00:00:00 2001 From: addshore Date: Sat, 13 Jan 2018 14:06:39 +0000 Subject: [PATCH] selenium: add re-creatable page test to page spec Change-Id: I61c452246c29bd22000a06844901dfe8ca06fadd --- tests/selenium/specs/page.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js index 130d6afb3a..376dce5975 100644 --- a/tests/selenium/specs/page.js +++ b/tests/selenium/specs/page.js @@ -38,6 +38,28 @@ describe( 'Page', function () { } ); + it( 'should be re-creatable', function () { + let initialContent = getTestString(); + + // create + browser.call( function () { + return EditPage.apiEdit( name, initialContent ); + } ); + + // delete + browser.call( function () { + return DeletePage.apiDelete( name, 'delete prior to recreate' ); + } ); + + // create + EditPage.edit( name, content ); + + // check + assert.equal( EditPage.heading.getText(), name ); + assert.equal( EditPage.displayedContent.getText(), content ); + + } ); + it( 'should be editable', function () { // create -- 2.20.1