Beispiel #1
0
 public function fillInParcelAddress()
 {
     $I = $this;
     $I->click(AddAdvert::$regionField);
     $I->fillField(AddAdvert::$typeRegion, Parcel::region);
     $I->click(AddAdvert::$region0);
     $I->click(AddAdvert::$cityField);
     $I->fillField(AddAdvert::$typeCity, Parcel::city);
     $I->click(AddAdvert::$chooseCity);
     $I->click(AddAdvert::$district);
     $I->fillField(AddAdvert::$typeDistrict, Parcel::district);
     $I->click(AddAdvert::$chooseDistrict);
     $I->click(AddAdvert::$street);
     $I->fillField(AddAdvert::$typeStreet, Parcel::street);
     $I->click(AddAdvert::$chooseStreet);
     $I->fillField(AddAdvert::$cadastr_number, Parcel::uniqueCadastralNumber());
     $I->click(AddAdvert::$buttonSubmit);
     $I->wait(2);
 }
Beispiel #2
0
 function realtyParcelsEdit()
 {
     $adminToken = file_get_contents(codecept_data_dir('admin_token.json'));
     $schema = file_get_contents(codecept_data_dir('schema_id.json'));
     $realtyParcelID = file_get_contents(codecept_data_dir('realtyParcelId.json'));
     $this->restModule->haveHttpHeader('token', $adminToken);
     $this->restModule->haveHttpHeader('Content-Type', 'application/json');
     $this->restModule->sendPUT('/realties/parcels/edit/' . $realtyParcelID, ['status' => 1, 'region' => $this->getRegion(21), 'city' => $this->getCity(4), 'district' => $this->getDistrict(7), 'street' => $this->getStreet(21), 'cadastralNumber' => Parcel::uniqueCadastralNumber(), 'latitude' => Parcel::editLatitude, 'longitude' => Parcel::editLongitude, 'area' => Parcel::editGeneralArea, 'areaUnit' => $this->getAreaUnits(2), 'communication' => [$this->getCommunications(0), $this->getCommunications(1), $this->getCommunications(2), $this->getCommunications(3), $this->getCommunications(4), $this->getCommunications(5), $this->getCommunications(6), $this->getCommunications(7)], 'nearObjects' => [$this->getNearObjects(0), $this->getNearObjects(1), $this->getNearObjects(2), $this->getNearObjects(3), $this->getNearObjects(4), $this->getNearObjects(5), $this->getNearObjects(6), $this->getNearObjects(7), $this->getNearObjects(8), $this->getNearObjects(9)], 'schema' => $schema]);
     $realtyParcel = $this->restModule->grabResponse();
     $realtyParcelEditId = json_decode($realtyParcel)->id;
     if ($realtyParcelEditId === $realtyParcelID) {
         file_put_contents(codecept_data_dir('realtyParcelId.json'), $realtyParcelEditId);
     }
     $this->debugSection('realtyParcelId', $realtyParcelEditId);
     $this->restModule->seeResponseCodeIs(200);
     $this->restModule->seeResponseIsJson();
 }
 public function editParcelObject()
 {
     $I = $this;
     $I->waitForElement(AdmRealtyObject::$yandexMap);
     $I->click(AdmRealtyObject::$statusField);
     $I->waitForElement(AdmRealtyObject::$objStatus1);
     $I->click(AdmRealtyObject::$objStatus1);
     $I->click(AdmRealtyObject::$regionField);
     $I->fillField(AdmRealtyObject::$typeRegion, Parcel::region);
     $I->click(AdmRealtyObject::$region0);
     $I->click(AdmRealtyObject::$cityField);
     $I->fillField(AdmRealtyObject::$typeCity, Parcel::city);
     $I->click(AdmRealtyObject::$city0);
     $I->click(AdmRealtyObject::$districtField);
     $I->click(AdmRealtyObject::$district7);
     $I->click(AdmRealtyObject::$street);
     $I->fillField(AdmRealtyObject::$typeStreet, Parcel::editStreet);
     $I->click(AdmRealtyObject::$chooseStreet);
     $I->fillField(AdmRealtyObject::$cadastrNumber, Parcel::uniqueCadastralNumber());
     $I->fillField(AdmRealtyObject::$generalArea, Parcel::editGeneralArea);
     $I->click(AdmRealtyObject::$areaUnitField);
     $I->click(AdmRealtyObject::$areaUnit1);
     $I->click(AdmRealtyObject::$communication0);
     $I->click(AdmRealtyObject::$communication1);
     $I->click(AdmRealtyObject::$communication2);
     $I->click(AdmRealtyObject::$communication3);
     $I->click(AdmRealtyObject::$communication4);
     $I->click(AdmRealtyObject::$communication5);
     $I->click(AdmRealtyObject::$communication6);
     $I->click(AdmRealtyObject::$communication7);
     $I->click(AdmRealtyObject::$nearObject0);
     $I->click(AdmRealtyObject::$nearObject1);
     $I->click(AdmRealtyObject::$nearObject2);
     $I->click(AdmRealtyObject::$nearObject3);
     $I->click(AdmRealtyObject::$nearObject4);
     $I->click(AdmRealtyObject::$nearObject5);
     $I->click(AdmRealtyObject::$nearObject6);
     $I->click(AdmRealtyObject::$nearObject7);
     $I->click(AdmRealtyObject::$nearObject8);
     $I->click(AdmRealtyObject::$nearObject9);
     $I->attachFile(AdmRealtyObject::$schema, '/img/parcel_2.jpg');
     $I->wait(4);
     $I->click(AdmRealtyObject::$submitBtn);
     $I->wait(2);
 }