RCFilters: Align TagItemWidget highlight in Safari
[lhc/web/wiklou.git] / tests / selenium / specs / page.js
1 'use strict';
2 const assert = require( 'assert' ),
3 HistoryPage = require( '../pageobjects/history.page' ),
4 EditPage = require( '../pageobjects/edit.page' );
5
6 describe( 'Page', function () {
7
8 var content,
9 name;
10
11 beforeEach( function () {
12 content = Math.random().toString();
13 name = Math.random().toString();
14 } );
15
16 it( 'should be creatable', function () {
17
18 // create
19 EditPage.edit( name, content );
20
21 // check
22 assert.equal( EditPage.heading.getText(), name );
23 assert.equal( EditPage.displayedContent.getText(), content );
24
25 } );
26
27 it( 'should be editable', function () {
28
29 var content2 = Math.random().toString();
30
31 // create
32 EditPage.edit( name, content );
33
34 // edit
35 EditPage.edit( name, content2 );
36
37 // check content
38 assert.equal( EditPage.heading.getText(), name );
39 assert.equal( EditPage.displayedContent.getText(), content2 );
40
41 } );
42
43 it( 'should have history', function () {
44
45 // create
46 EditPage.edit( name, content );
47
48 // check
49 HistoryPage.open( name );
50 assert.equal( HistoryPage.comment.getText(), `(Created page with "${content}")` );
51
52 } );
53
54 } );