| @@ 38-59 (lines=22) @@ | ||
| 35 | * @dataProvider widgetProvider |
|
| 36 | * @param $requestData |
|
| 37 | */ |
|
| 38 | public function testDateRangeBetweenFilter($requestData) |
|
| 39 | { |
|
| 40 | $this->configureWidget($this->widget, $requestData['widgetConfig']); |
|
| 41 | ||
| 42 | $crawler = $this->client->request( |
|
| 43 | 'GET', |
|
| 44 | $this->getUrl( |
|
| 45 | 'orocrm_campaign_dashboard_campaigns_leads_chart', |
|
| 46 | [ |
|
| 47 | 'widget' => 'campaigns_leads', |
|
| 48 | '_widgetId' => $this->widget->getId() |
|
| 49 | ] |
|
| 50 | ) |
|
| 51 | ); |
|
| 52 | $response = $this->client->getResponse(); |
|
| 53 | $this->assertEquals($response->getStatusCode(), 200, "Failed in getting widget view !"); |
|
| 54 | $this->assertNotEmpty($crawler->html()); |
|
| 55 | ||
| 56 | $data = $this->getChartData($crawler); |
|
| 57 | $this->assertEquals('Campaign', $data[0]->label); |
|
| 58 | $this->assertEquals($requestData['expectedResultCount'], $data[0]->value); |
|
| 59 | } |
|
| 60 | ||
| 61 | protected function getConfigureDialog() |
|
| 62 | { |
|
| @@ 38-57 (lines=20) @@ | ||
| 35 | * @dataProvider widgetProvider |
|
| 36 | * @param $requestData |
|
| 37 | */ |
|
| 38 | public function testDateRangeBetweenFilter($requestData) |
|
| 39 | { |
|
| 40 | $this->configureWidget($this->widget, $requestData['widgetConfig']); |
|
| 41 | $crawler = $this->client->request( |
|
| 42 | 'GET', |
|
| 43 | $this->getUrl( |
|
| 44 | 'orocrm_sales_dashboard_opportunity_by_state_chart', |
|
| 45 | [ |
|
| 46 | 'widget' => 'opportunities_by_state', |
|
| 47 | '_widgetId' => $this->widget->getId() |
|
| 48 | ] |
|
| 49 | ) |
|
| 50 | ); |
|
| 51 | $response = $this->client->getResponse(); |
|
| 52 | $this->assertEquals($response->getStatusCode(), 200, "Failed in getting widget view !"); |
|
| 53 | $this->assertNotEmpty($crawler->html()); |
|
| 54 | $data = $this->getChartData($crawler); |
|
| 55 | $this->assertEquals('Open', $data[0]->label); |
|
| 56 | $this->assertEquals($requestData['expectedResultCount'], $data[0]->value); |
|
| 57 | } |
|
| 58 | ||
| 59 | protected function getConfigureDialog() |
|
| 60 | { |
|