0

私はシングルページのJavaScriptアプリケーションをテストする必要があります。 WebDriverクリアクッキーのような完全なテストアクションの後。それを防ぐことはできますか?私はお互いから分離せずにテストを実行する必要があります。クッキーの脆弱性を防ぐwebdriver

私のテストファイル:

<?php 


class ClientGroenCest 
{ 
    protected $selectors = [ 
     'clientTableElements' => '.b-content__clients > div:first-child > div:first-child .b-table-v2.b-table__clients tbody .nano tr', 
     'clientTableFirstElement' => '.b-content__clients > div:first-child > div:first-child .b-table-v2.b-table__clients tbody .nano tr:first-child', 
    ]; 

    public function _before(AcceptanceTester $I) 
    { 
    } 

    public function _after(AcceptanceTester $I) 
    { 
    } 

     // tests 
public function login(AcceptanceTester $I) 
{ 
    $I->amOnPage('/'); 
    $I->fillField('#loginform-email', '[email protected]'); 
    $I->fillField('#loginform-password', 'qweewq'); 
    $I->wait(1); 
    $I->click('button[type="submit"]'); 
    $I->dontSeeCurrentUrlEquals('/login'); 
    $I->dontSeeCurrentUrlEquals('/site/login'); 
    $I->dontSeeCurrentUrlEquals('/'); 
} 

public function checkNumberOfClients(AcceptanceTester $I) 
{ 
    $I->click($this->selectors['clientTableFirstElement']); 
    $I->wait(5); 
} 

acceptance.suite.yml:

class_name: AcceptanceTester 
modules: 
    enabled: 
     - WebDriver: 
      url: https://crm.loc 
      browser: chrome 
      delay: 5000 
      window_size: maximize 
      capabilities: 
       acceptSslCerts: true 
       trustAllSSLCertificates: true 
     - \Helper\Acceptance 
     - Yii2: 
      configFile: 'config/test.php' 
      part: ORM # allow to use AR methods 
      cleanup: false # don't wrap test in transaction 
      entryScript: index-test.php 

答えて