blob: 44484c646029036b63d985371412dbec749caf66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
'use strict';
const Page = require( 'wdio-mediawiki/Page' );
class ViewListPage extends Page {
get title() { return $( '#firstHeading' ); }
get newFilterButton() { return $( '.oo-ui-buttonElement a' ); }
get filterSavedNotice() { return $( '.success' ); }
get savedFilterID() {
const succesMsg = this.filterSavedNotice.getHTML(),
regexp = /\/history\/(\d+)\//;
return regexp.exec( succesMsg )[ 1 ];
}
get savedFilterHistoryID() {
const succesMsg = this.filterSavedNotice.getHTML(),
regexp = /\/diff\/prev\/(\d+)/;
return regexp.exec( succesMsg )[ 1 ];
}
open() {
super.openTitle( 'Special:AbuseFilter' );
}
}
module.exports = new ViewListPage();
|