From 555ac371f496992ac3dc14bdb149e89dc55527eb Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Thu, 23 Jan 2025 12:08:08 +0100 Subject: [PATCH] Update tests --- test/unit/chromedriver-specs.js | 48 --------------------------------- 1 file changed, 48 deletions(-) diff --git a/test/unit/chromedriver-specs.js b/test/unit/chromedriver-specs.js index 92d4cba7..43563b63 100644 --- a/test/unit/chromedriver-specs.js +++ b/test/unit/chromedriver-specs.js @@ -1,7 +1,5 @@ import {Chromedriver} from '../../lib/chromedriver'; -import * as utils from '../../lib/utils'; import sinon from 'sinon'; -import {PROTOCOLS} from '@appium/base-driver'; import {fs} from '@appium/support'; import * as tp from 'teen_process'; import path from 'path'; @@ -280,52 +278,6 @@ describe('chromedriver', function () { }); }); - describe('detectWebDriverProtocol', function () { - it('sync with chrome as mjsonwp', function () { - const cd = new Chromedriver({}); - cd.desiredProtocol.should.eql(PROTOCOLS.MJSONWP); - (cd.driverVersion === null).should.be.true; - cd.detectWebDriverProtocol( - 'Starting ChromeDriver 2.33.506106 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2) on port 9515' - ); - cd.desiredProtocol.should.eql(PROTOCOLS.MJSONWP); - cd.driverVersion.should.eql('2.33.506106'); - }); - - it('sync with chrome as w3c', function () { - const cd = new Chromedriver({}); - cd.desiredProtocol.should.eql(PROTOCOLS.MJSONWP); - (cd.driverVersion === null).should.be.true; - cd.detectWebDriverProtocol( - 'Starting ChromeDriver 111.0.1661.41 (8a06c39c4582fbfbab6966dbb1c38a9173bfb1a2) on port 9515' - ); - cd.desiredProtocol.should.eql(PROTOCOLS.W3C); - cd.driverVersion.should.eql('111.0.1661.41'); - }); - - it('sync with msedge', function () { - const cd = new Chromedriver({}); - cd.desiredProtocol.should.eql(PROTOCOLS.MJSONWP); - (cd.driverVersion === null).should.be.true; - cd.detectWebDriverProtocol( - 'Starting Microsoft Edge WebDriver 111.0.1661.41 (57be51b50d1be232a9e8186a10017d9e06b1fd16) on port 9515' - ); - cd.desiredProtocol.should.eql(PROTOCOLS.W3C); - cd.driverVersion.should.eql('111.0.1661.41'); - }); - - it('sync with unknown driver', function () { - const cd = new Chromedriver({}); - cd.desiredProtocol.should.eql(PROTOCOLS.MJSONWP); - (cd.driverVersion === null).should.be.true; - cd.detectWebDriverProtocol( - 'Starting Unknown WebDriver 111.0.1661.41 (57be51b50d1be232a9e8186a10017d9e06b1fd16) on port 9515' - ); - cd.desiredProtocol.should.eql(PROTOCOLS.MJSONWP); - (cd.driverVersion === null).should.be.true; - }); - }); - describe('getMostRecentChromedriver', function () { it('should get a value by default', function () { utils.getMostRecentChromedriver().should.be.a.string;