selenium: add re-creatable page test to page spec
authoraddshore <addshorewiki@gmail.com>
Sat, 13 Jan 2018 14:06:39 +0000 (14:06 +0000)
committeraddshore <addshorewiki@gmail.com>
Sat, 20 Jan 2018 10:47:59 +0000 (10:47 +0000)
Change-Id: I61c452246c29bd22000a06844901dfe8ca06fadd

tests/selenium/specs/page.js

index 130d6af..376dce5 100644 (file)
@@ -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