Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
Fixed failing jest tests (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdadn authored Mar 8, 2024
1 parent a0eac08 commit b77b4ae
Showing 1 changed file with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ describe('getCapabilities', () => {

const defaultWebpackPath = path.resolve(process.cwd(), 'webpack.config.js');
const capabilities = getCapabilities(options.browsers, !!options.gridUrl);

const url = `http://${options.externalHost}:${options.externalPort}`;
const expectedConfig = {
baseUrl: `http://${options.externalHost}:${options.externalPort}`,
baseUrl: url,
capabilities,
hostname: options.gridUrl,
port: 80,
Expand All @@ -47,6 +47,7 @@ describe('getCapabilities', () => {
buildType: BUILD_TYPE.branchEventCause,
buildUrl: 'www.buildurl.com',
disableSeleniumService: true,
disableServer: undefined,
formFactor: options.formFactor,
gitApiUrl: 'www.gitapiurl.com',
gitToken: '12345',
Expand All @@ -59,6 +60,8 @@ describe('getCapabilities', () => {
site: options.site,
theme: options.theme,
overrideTheme: options.theme,
url,
useHttps: undefined,
updateScreenshots: true,
useRemoteReferenceScreenshots: true,
webpackConfig: defaultWebpackPath,
Expand Down Expand Up @@ -111,6 +114,7 @@ describe('getCapabilities', () => {
buildType: BUILD_TYPE.branchEventCause,
buildUrl: 'www.buildurl.com',
disableSeleniumService: true,
disableServer: undefined,
formFactor: options.formFactor,
gitApiUrl: 'www.gitapiurl.com',
gitToken: '12345',
Expand All @@ -124,6 +128,8 @@ describe('getCapabilities', () => {
theme: options.theme,
overrideTheme: options.theme,
updateScreenshots: true,
url: 'http://externalHost:3000',
useHttps: undefined,
useRemoteReferenceScreenshots: false,
webpackConfig: defaultWebpackPath,
},
Expand All @@ -137,9 +143,9 @@ describe('getCapabilities', () => {
it('should get configuration with empty options', async () => {
const defaultWebpackPath = path.resolve(process.cwd(), 'webpack.config.js');
const capabilities = getCapabilities(undefined, !!undefined);

const url = `http://${getIpAddress()}:8080`;
const expectedConfig = {
baseUrl: `http://${getIpAddress()}:8080`,
baseUrl: url,
capabilities,
hostname: 'localhost',
port: 4444,
Expand All @@ -148,6 +154,7 @@ describe('getCapabilities', () => {
buildType: undefined,
buildUrl: undefined,
disableSeleniumService: false,
disableServer: undefined,
formFactor: undefined,
gitApiUrl: undefined,
gitToken: undefined,
Expand All @@ -156,11 +163,13 @@ describe('getCapabilities', () => {
issueNumber: undefined,
keepAliveSeleniumDockerService: undefined,
locale: undefined,
overrideTheme: undefined,
port: undefined,
site: undefined,
theme: 'terra-default-theme',
overrideTheme: undefined,
updateScreenshots: undefined,
url,
useHttps: undefined,
useRemoteReferenceScreenshots: undefined,
webpackConfig: defaultWebpackPath,
},
Expand Down

0 comments on commit b77b4ae

Please sign in to comment.