import Page from 'wdio-mediawiki/Page';

class ViewImportPage extends Page {
	get importData() {
		return $( 'textarea[name="wpImportText"]' );
	}

	get submit() {
		return $( 'button[type="submit"]' );
	}

	async importText( text ) {
		await this.open();
		await this.importData.setValue( text );
		await this.submit.click();
	}

	async open() {
		return super.openTitle( 'Special:AbuseFilter/import' );
	}
}
export const viewImportPage = new ViewImportPage();
