Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jorikfon committed May 8, 2024
1 parent 46869f5 commit 651834d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions tests/AdminCabinet/Lib/BrowserStackTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

use Facebook\WebDriver\Remote\RemoteWebDriver;
use GuzzleHttp\Exception\GuzzleException;
use MikoPBX\Tests\AdminCabinet\Tests\LoginTest;
use PHPUnit\Framework\TestCase;
use BrowserStack\Local as BrowserStackLocal;
use GuzzleHttp\Client as GuzzleHttpClient;
Expand Down Expand Up @@ -101,7 +100,7 @@ public static function setUpBeforeClass(): void
$caps['build'] = $GLOBALS['BUILD_NUMBER'];

// Create a new WebDriver instance with the specified URL and capabilities
self::$driver = RemoteWebDriver::create($url, $caps);
self::$driver = RemoteWebDriver::create($url, $caps, 120000, 120000);

// Set the initial test result and failure conditions variables
self::$testResult = true;
Expand Down
5 changes: 1 addition & 4 deletions tests/AdminCabinet/Tests/FillDataTimeSettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ public function testChangeDataTimeSettings(array $params): void
// Save the settings
$this->submitForm('time-settings-form');

// Wait for Nginx restarted
sleep(10);

$this->clickSidebarMenuItemByHref('/admin-cabinet/time-settings/modify/');

$this->assertMenuItemSelected(PbxSettingsConstants::PBX_TIMEZONE, $params['PBXTimezone']);
Expand All @@ -88,7 +85,7 @@ public function additionProvider(): array
[
PbxSettingsConstants::PBX_TIMEZONE => 'Europe/Riga',
PbxSettingsConstants::PBX_MANUAL_TIME_SETTINGS => true,
'ManualDateTime' => '01/01/2020, 1:01:01 PM',
'ManualDateTime' => date('d/m/Y, h:i:s A', strtotime('+2 hours')),
PbxSettingsConstants::NTP_SERVER => '',
],
];
Expand Down
11 changes: 8 additions & 3 deletions tests/AdminCabinet/config/local.conf.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@
"os" : "Windows",
"resolution" : "1680x1050",
"acceptSslCerts": true,
"acceptInsecureCerts": true,
"fixSessionCapabilities": true,
"remoteFiles": true,
"browserstack.networkLogs": true,
"seleniumVersion": "4.0.0",
"browserName": "Chrome",
"browserstack.local": false
"browserstack.local": false,
"browserstack.debug": true,
"browserstack.console": verbose,
"browserstack.networkLogs": true,
"browserstack.networkLogsOptions.captureContent": true
},
"MIKO_LICENSE_KEY": "",
"environments": [{
"browser": "chrome"
"browser": "chrome",
"browserVersion": "latest"
}]
}

0 comments on commit 651834d

Please sign in to comment.