mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +01:00
Add test for tab
This commit is contained in:
parent
66ad21c0b1
commit
280059431c
@ -1065,6 +1065,8 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
'debugbar': this
|
||||
})});
|
||||
this.datasetTab.$tab.addClass(csscls('tab-history'));
|
||||
this.datasetTab.$tab.attr('data-collector', '__datasets');
|
||||
this.datasetTab.$el.attr('data-collector', '__datasets');
|
||||
this.datasetTab.$tab.insertAfter(this.$openbtn).hide();
|
||||
this.datasetTab.$tab.click(() => {
|
||||
if (!this.isMinimized() && self.activePanelName == '__datasets') {
|
||||
|
@ -66,6 +66,21 @@ class DebugbarTest extends AbstractBrowserTest
|
||||
|
||||
$client->waitForElementToContain('.phpdebugbar-datasets-switcher', 'ajax_exception.php');
|
||||
$client->waitForElementToContain('.phpdebugbar-panel[data-collector=exceptions] .phpdebugbar-widgets-message', 'Something failed!');
|
||||
|
||||
// Open network tab
|
||||
$client->click($this->getTabLink($crawler, '__datasets'));
|
||||
$client->waitForVisibility('.phpdebugbar-panel[data-collector=__datasets] .phpdebugbar-widgets-table-row');
|
||||
|
||||
$requests = $crawler->filter('.phpdebugbar-panel[data-collector=__datasets] .phpdebugbar-widgets-table-row')
|
||||
->each(function(WebDriverElement $node){
|
||||
return $node->getText();
|
||||
});
|
||||
$this->assertStringContainsString('GET /demo/', $requests[0]);
|
||||
$this->assertStringContainsString('GET /demo/ajax.php (ajax)', $requests[1]);
|
||||
$this->assertStringContainsString('GET /demo/ajax_exception.php (ajax)', $requests[2]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user