Beispiel #1
0
 public function fillInCommercialAddress()
 {
     $I = $this;
     $I->click(AddAdvert::$regionField);
     $I->fillField(AddAdvert::$typeRegion, Commercial::region);
     $I->click(AddAdvert::$region0);
     $I->click(AddAdvert::$cityField);
     $I->fillField(AddAdvert::$typeCity, Commercial::city);
     $I->click(AddAdvert::$chooseCity);
     $I->click(AddAdvert::$district);
     $I->fillField(AddAdvert::$typeDistrict, Commercial::district);
     $I->click(AddAdvert::$chooseDistrict);
     $I->click(AddAdvert::$street);
     $I->fillField(AddAdvert::$typeStreet, Commercial::street);
     $I->click(AddAdvert::$chooseStreet);
     $I->fillField(AddAdvert::$house_number, Commercial::uniqueCommercialNumber());
     $I->click(AddAdvert::$buttonSubmit);
     $I->wait(2);
 }
Beispiel #2
0
 function realtyCommercialsEdit()
 {
     $adminToken = file_get_contents(codecept_data_dir('admin_token.json'));
     $schema = file_get_contents(codecept_data_dir('schema_id.json'));
     $realtyCommercialID = file_get_contents(codecept_data_dir('realtyCommercialId.json'));
     $this->restModule->haveHttpHeader('token', $adminToken);
     $this->restModule->haveHttpHeader('Content-Type', 'application/json');
     $this->restModule->sendPUT('/realties/commercials/edit/' . $realtyCommercialID, ['status' => 1, 'region' => $this->getRegion(21), 'city' => $this->getCity(4), 'district' => $this->getDistrict(2), 'street' => $this->getStreet(94), 'houseNumber' => Commercial::uniqueCommercialNumber(), 'latitude' => Commercial::editLatitude, 'longitude' => Commercial::editLongitude, 'area' => Commercial::editGeneralArea, 'areaUnit' => $this->getAreaUnits(0), 'effectiveArea' => Commercial::editEffectiveArea, 'wallMaterial' => $this->getWallMaterials(1), 'roomCount' => Commercial::editRoomCount, 'floor' => Commercial::editFloorNumber, 'floorNumber' => Commercial::editFloor, 'buildYear' => Commercial::editBuildYear, 'wc' => $this->getWC(1), 'heating' => $this->getHeatings(1), 'waterHeating' => $this->getWaterHeatings(1), '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)], 'schema' => $schema]);
     $realtyCommercial = $this->restModule->grabResponse();
     $realtyCommercialEditId = json_decode($realtyCommercial)->id;
     if ($realtyCommercialEditId === $realtyCommercialID) {
         file_put_contents(codecept_data_dir('realtyCommercialId.json'), $realtyCommercialEditId);
     }
     $this->debugSection('realtyCommercialEditId', $realtyCommercialEditId);
     $this->restModule->seeResponseCodeIs(200);
     $this->restModule->seeResponseIsJson();
 }
 public function editCommercialObject()
 {
     $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, Commercial::region);
     $I->click(AdmRealtyObject::$region0);
     $I->click(AdmRealtyObject::$cityField);
     $I->fillField(AdmRealtyObject::$typeCity, Commercial::city);
     $I->click(AdmRealtyObject::$city0);
     $I->click(AdmRealtyObject::$districtField);
     $I->click(AdmRealtyObject::$district3);
     $I->click(AdmRealtyObject::$street);
     $I->fillField(AdmRealtyObject::$typeStreet, Commercial::editStreet);
     $I->click(AdmRealtyObject::$chooseStreet);
     $I->fillField(AdmRealtyObject::$house_number, Commercial::uniqueCommercialNumber());
     $I->fillField(AdmRealtyObject::$generalArea, Commercial::editGeneralArea);
     $I->click(AdmRealtyObject::$areaUnitField);
     $I->click(AdmRealtyObject::$areaUnit0);
     $I->fillField(AdmRealtyObject::$effectiveArea, Commercial::editEffectiveArea);
     $I->click(AdmRealtyObject::$wallMaterialField);
     $I->click(AdmRealtyObject::$wallMaterial1);
     $I->fillField(AdmRealtyObject::$roomСount, Commercial::editRoomCount);
     $I->fillField(AdmRealtyObject::$floors, Commercial::editFloor);
     $I->fillField(AdmRealtyObject::$floorNumber, Commercial::editFloorNumber);
     $I->fillField(AdmRealtyObject::$buildYear, Commercial::editBuildYear);
     $I->click(AdmRealtyObject::$wcField);
     $I->click(AdmRealtyObject::$wc1);
     $I->click(AdmRealtyObject::$heatingField);
     $I->click(AdmRealtyObject::$heating1);
     $I->click(AdmRealtyObject::$waterHeatingField);
     $I->click(AdmRealtyObject::$waterHeat1);
     $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->attachFile(AdmRealtyObject::$schema, '/img/commerc_3.jpg');
     $I->wait(2);
     $I->click(AdmRealtyObject::$submitBtn);
     $I->wait(2);
 }