Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jan 23, 2025
1 parent 93ecc57 commit 555ac37
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions test/unit/chromedriver-specs.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 555ac37

Please sign in to comment.