Добавил позитивные сценарии для UI, API регистрации организации
This commit is contained in:
@@ -51,10 +51,14 @@ export class RegisterPage {
|
||||
}
|
||||
|
||||
async clickNextButton() {
|
||||
await this.page.locator('button[type="submit"]', { hasText: 'Далее' }).click();
|
||||
await this.page.locator('button[type="submit"]', { hasText: 'Далее' }).first().click();
|
||||
}
|
||||
|
||||
async submitGraduate() {
|
||||
async clickNextButtonOrg() {
|
||||
await this.page.locator('button[type="submit"]', { hasText: 'Далее' }).last().click();
|
||||
}
|
||||
|
||||
async submitGeneral() {
|
||||
await this.page.locator('button[type="submit"]', { hasText: 'Зарегистрироваться' }).click();
|
||||
}
|
||||
|
||||
@@ -62,10 +66,9 @@ export class RegisterPage {
|
||||
await this.page.locator('button[data-testid="btn-save"]').click();
|
||||
}
|
||||
|
||||
// --- Этап 2: Образование выпускника ---
|
||||
async selectGraduateRole() {
|
||||
await this.page.locator('button.Registration_button_menu__AfPox', { hasText: 'Выпускник' }).click();
|
||||
}
|
||||
async selectRole(roleName: 'Абитуриент' | 'Выпускник' | 'Организация') {
|
||||
await this.page.getByRole('button', { name: roleName }).click();
|
||||
}
|
||||
|
||||
async selectDepartment() {
|
||||
await this.page.locator('input[name="department"]').click();
|
||||
@@ -93,4 +96,61 @@ export class RegisterPage {
|
||||
await this.page.locator('input[name="educationForm"]').click();
|
||||
await this.page.getByText('Очная', { exact: true }).click();
|
||||
}
|
||||
|
||||
//Для организации
|
||||
|
||||
async fillShortName(shortName: string) {
|
||||
await this.page.fill('input[name="shortName"]', shortName);
|
||||
}
|
||||
|
||||
async fillFullName(fullName: string){
|
||||
await this.page.fill('input[name="fullName"]', fullName);
|
||||
}
|
||||
|
||||
async fillAddress(address: string) {
|
||||
await this.page.fill('input[name="address"]', address);
|
||||
}
|
||||
|
||||
async fillKPP(kpp: string) {
|
||||
await this.page.fill('input[name="kpp"]', kpp);
|
||||
}
|
||||
|
||||
async fillINN(inn: string) {
|
||||
await this.page.fill('input[name="inn"]', inn);
|
||||
}
|
||||
|
||||
async fillSite(site: string) {
|
||||
await this.page.fill('input[name="site"]', site);
|
||||
}
|
||||
|
||||
async fillDescription(description: string) {
|
||||
await this.page.fill('textarea[name="description"]', description);
|
||||
}
|
||||
|
||||
// Step 3
|
||||
async fillDirectorFIO(fio: string) {
|
||||
await this.page.fill('input[name="directorFIO"]', fio);
|
||||
}
|
||||
|
||||
async fillPosition(position: string) {
|
||||
await this.page.fill('input[name="position"]', position);
|
||||
}
|
||||
|
||||
async fillBasis(basis: string) {
|
||||
await this.page.fill('input[name="basis"]', basis);
|
||||
}
|
||||
|
||||
async fillTelegram(tg: string) {
|
||||
await this.page.fill('input[name="tg"]', tg);
|
||||
}
|
||||
|
||||
async fillVK(vk: string) {
|
||||
await this.page.fill('input[name="vk"]', vk);
|
||||
}
|
||||
|
||||
async expectSuccessModal() {
|
||||
await this.page.getByRole('heading', { name: 'Ваши данные отправлены на проверку!' }).waitFor();
|
||||
await this.page.getByRole('button', { name: 'На главную' }).click();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user