The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/tests/e2e/page-objects/admin-integrations.ts

43 lines
1.1 KiB

import type { Locator, Page } from '@playwright/test';
import { Admin } from './admin';
export class AdminIntegrations extends Admin {
constructor(page: Page) {
super(page);
}
get btnInstructions(): Locator {
return this.page.getByRole('button', { name: 'Instructions', exact: true });
}
codeExamplePayload(text: string): Locator {
return this.page.locator('code', { hasText: text });
}
get inputName(): Locator {
return this.page.getByRole('textbox', { name: 'Name' });
}
get inputPostToChannel(): Locator {
return this.page.getByRole('textbox', { name: 'Post to Channel' });
}
get inputPostAs(): Locator {
return this.page.getByRole('textbox', { name: 'Post as' });
}
getIntegrationByName(name: string): Locator {
return this.page.getByRole('table', { name: 'Integrations table' }).locator('tr', { hasText: name });
}
get inputWebhookUrl(): Locator {
return this.page.getByRole('textbox', { name: 'Webhook URL' });
}
async deleteIntegrationByName(name: string) {
await this.getIntegrationByName(name).click();
await this.btnDelete.click();
await this.deleteModal.confirmDelete();
}
}