Skip to content

Commit

Permalink
Merge pull request #3663 from kbase/sep-2024-updates-js
Browse files Browse the repository at this point in the history
Fix WebdriverIO configs
  • Loading branch information
briehl authored Sep 24, 2024
2 parents 9fef1d0 + d4530b4 commit 1f28a09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions test/integration/specs/narrative_basic_test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';
const { login, makeURL } = require('../wdioUtils');
const { login } = require('../wdioUtils');
const env = process.env.ENV || 'ci';
const testData = require('./narrative_basic_data.json');
const testCases = testData.envs[env];

describe('Narrative tree page with login', () => {
beforeEach(async () => {
await browser.setTimeout({ implicit: 30000 });
await browser.setTimeout({ pageLoad: 30000 });
await browser.reloadSession();
await login();
});
Expand All @@ -16,7 +16,7 @@ describe('Narrative tree page with login', () => {
});

it('opens a narrative', async () => {
await browser.url(makeURL(`narrative/${testCases.CASE_1.narrativeId}`));
await browser.url(`/narrative/${testCases.CASE_1.narrativeId}`);
const loadingBlocker = await $('#kb-loading-blocker');
const loadingText = await loadingBlocker.getText();
await expect(loadingText).toContain('Connecting to KBase services...');
Expand Down
17 changes: 6 additions & 11 deletions test/integration/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
const testConfig = require('../testConfig');
const fs = require('fs');

const CHROME_BINARY = require('puppeteer').executablePath();

/**
* Given a preset key, return set set of common configuration keys for a given service, os, and browser
* This is useful because testing services support a limited number of browser dimensions, which differs
Expand Down Expand Up @@ -176,7 +174,6 @@ const serviceConfigs = {
logPath: 'selenium-standalone-logs',
// drivers
},
chromedriver: {},
browserstack: {
browserstackLocal: true,
opts: {},
Expand All @@ -196,21 +193,19 @@ function makeCapabilities(config) {
case 'chromedriver':
return (() => {
const args = [
'--disable-gpu',
'--no-sandbox',
'headless',
'disable-gpu',
`window-size=${config.WIDTH},${config.HEIGHT}`,
];
if (config.HEADLESS === 't') {
args.push('--headless');
}
return {
browserName: 'chrome',
browserVersion: '128',
acceptInsecureCerts: true,
maxInstances: 1,
'goog:chromeOptions': {
args,
binary: CHROME_BINARY,
},
'wdio:enforceWebDriverClassic': true
};
})();
case 'selenium-standalone':
Expand Down Expand Up @@ -322,7 +317,7 @@ const wdioConfig = {
// and 30 processes will get spawned. The property handles how many capabilities
// from the same test should run tests.
//
maxInstances: 10,
maxInstances: 1,
//
// If you have trouble getting all important capabilities together, check out the
// Sauce Labs platform configurator - a great tool to configure your capabilities:
Expand Down Expand Up @@ -392,7 +387,6 @@ const wdioConfig = {
// Services take over a specific job you don't want to take care of. They enhance
// your test setup with almost no effort. Unlike plugins, they don't add new
// commands. Instead, they hook themselves up into the test process.
services: [[testParams.SERVICE, serviceConfigs[testParams.SERVICE]]],

// Framework you want to run your specs with.
// The following are supported: Mocha, Jasmine, and Cucumber
Expand Down Expand Up @@ -428,6 +422,7 @@ const wdioConfig = {
// see also: https://webdriver.io/docs/dot-reporter.html
reporters: ['spec'],


//
// Options to be passed to Mocha.
// See the full list at http://mochajs.org/
Expand Down

0 comments on commit 1f28a09

Please sign in to comment.