Files
payload/test/helpers/adminUrlUtil.ts
Elliot DeNolf 90ba15f9bd feat: testing refactor (e2e/int) (#748)
Co-authored-by: James <james@trbl.design>
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2022-07-13 11:00:10 -07:00

18 lines
360 B
TypeScript

export class AdminUrlUtil {
admin: string;
collection: string;
create: string;
constructor(serverURL: string, slug: string) {
this.admin = `${serverURL}/admin`;
this.collection = `${this.admin}/collections/${slug}`;
this.create = `${this.collection}/create`;
}
doc(id: string): string {
return `${this.collection}/${id}`;
}
}