From: addshore Date: Sat, 13 Jan 2018 14:06:39 +0000 (+0000) Subject: selenium: add re-creatable page test to page spec X-Git-Tag: 1.31.0-rc.0~832^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=817baf7e91393e21af8607da549ca2ef2e3d2736;p=lhc%2Fweb%2Fwiklou.git selenium: add re-creatable page test to page spec Change-Id: I61c452246c29bd22000a06844901dfe8ca06fadd --- 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