Пример #1
0
 public function testGetCustomize()
 {
     $customize = $this->api->app()->getCustomize($this->appId);
     self::assertEquals($customize['desktop'], ['js' => [], 'css' => []]);
     self::assertEquals($customize['mobile'], ['js' => []]);
     self::assertEquals($customize['scope'], 'ALL');
     $customize = $this->api->app()->getCustomize($this->guestAppId, $this->guestSpaceId);
     self::assertEquals($customize['desktop'], ['js' => [], 'css' => []]);
     self::assertEquals($customize['mobile'], ['js' => []]);
     self::assertEquals($customize['scope'], 'ALL');
 }
Пример #2
0
 public function testDeploy()
 {
     $this->space = $this->api->space()->get($this->spaceId);
     $appId = $this->api->preview()->post('test deploy app', $this->spaceId, $this->space['defaultThread'])['app'];
     $this->api->preview()->putSettings($appId, 'test deploy app', 'test deploy app description', ['type' => 'PRESET', 'key' => 'APP72'], 'WHITE');
     $putFields = KintoneTestHelper::getFields();
     $this->api->preview()->postFields($appId, $putFields);
     $putViews = KintoneTestHelper::getViews();
     $this->api->preview()->putViews($appId, $putViews)['views'];
     $this->api->preview()->deploy($appId);
     while (1) {
         if ('PROCESSING' != $this->api->preview()->getDeployStatus($appId)['status']) {
             break;
         }
     }
     $app = $this->api->app()->get($appId);
     self::assertEquals($app['name'], 'test deploy app');
     self::assertEquals($app['description'], 'test deploy app description');
     self::assertEquals($app['spaceId'], $this->spaceId);
     self::assertEquals($app['threadId'], $this->space['defaultThread']);
     $this->guestSpace = $this->api->space()->get($this->guestSpaceId, $this->guestSpaceId);
     $appId = $this->api->preview()->post('test deploy app', $this->guestSpaceId, $this->guestSpace['defaultThread'], $this->guestSpaceId)['app'];
     $this->api->preview()->putSettings($appId, 'test deploy app', 'test deploy app description', ['type' => 'PRESET', 'key' => 'APP72'], 'WHITE', $this->guestSpaceId);
     $putFields = KintoneTestHelper::getFields();
     $this->api->preview()->postFields($appId, $putFields, $this->guestSpaceId);
     $putViews = KintoneTestHelper::getViews();
     $this->api->preview()->putViews($appId, $putViews, $this->guestSpaceId)['views'];
     $this->api->preview()->deploy($appId, $this->guestSpaceId);
     while (1) {
         if ('PROCESSING' != $this->api->preview()->getDeployStatus($appId, $this->guestSpaceId)['status']) {
             break;
         }
     }
     $app = $this->api->app()->get($appId, $this->guestSpaceId);
     self::assertEquals($app['name'], 'test deploy app');
     self::assertEquals($app['description'], 'test deploy app description');
     self::assertEquals($app['spaceId'], $this->guestSpaceId);
     self::assertEquals($app['threadId'], $this->guestSpace['defaultThread']);
 }
Пример #3
0
 public function testApp()
 {
     self::assertTrue($this->api->app() instanceof App);
 }