refactor pagination e2e (#1312)

* wrap test suites in functions

* better naming and small improvements

* higher suite that calls the wrapped test functions
This commit is contained in:
Adina Parpalita
2020-01-22 07:46:57 +02:00
committed by Cilibiu Bogdan
parent 4e7595f7b2
commit 653be8bbcd
15 changed files with 832 additions and 884 deletions

View File

@@ -120,7 +120,7 @@ export class SitesApi extends RepoApi {
return this.createSite(title, SITE_VISIBILITY.MODERATED, description, siteId);
}
async createSites(titles: string[], visibility?: string) {
async createSites(titles: string[], visibility?: string): Promise<any> {
try {
return titles.reduce(async (previous: any, current: any) => {
await previous;
@@ -131,6 +131,10 @@ export class SitesApi extends RepoApi {
}
}
async createSitesPrivate(siteNames: string[]): Promise<any> {
return this.createSites(siteNames, SITE_VISIBILITY.PRIVATE)
}
async deleteSite(siteId: string, permanent: boolean = true) {
try {
await this.apiAuth();