Skip to content

Commit

Permalink
Improve UI test suite
Browse files Browse the repository at this point in the history
- Upgraded `chromedriver` to latest compatible version according to chrome version.
- Upgraded peer webdriver dependencies.
- Reduced "noise" in test cases (removed unneeded logging, and deprecation warnings).
- Skip `cpp-change-build-config.ui-spec.ts` test case since it no longer works properly.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
  • Loading branch information
vince-fugnitto committed Jan 24, 2019
1 parent 19c8f42 commit 9abc375
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 209 deletions.
4 changes: 3 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ build_script:
- yarn

test_script:
- yarn run test
- appveyor-retry yarn test:theia
- appveyor-retry yarn test:electron
- appveyor-retry yarn test:browser

notifications:
- provider: Webhook
Expand Down
36 changes: 19 additions & 17 deletions examples/browser/test/cpp/cpp-change-build-config.ui-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,6 @@ let topPanel: TopPanel;
let leftPanel: LeftPanel;
let bottomPanel: BottomPanel;

before(() => {
const driver = browser;

driver.url('/');
driver.localStorage('DELETE');
driver.refresh();

mainPage = new MainPage(driver);
topPanel = new TopPanel(driver);
leftPanel = new LeftPanel(driver);
bottomPanel = new BottomPanel(driver);

mainPage.waitForStartup();
});

/**
* Prepare some test files in the workspace.
*/
Expand Down Expand Up @@ -124,8 +109,25 @@ function changeBuildConfig(name: string, driver: WebdriverIO.Client<void>) {
driver.pause(300);
}

describe('cpp extension', function () {
it('should be able to change build config', function () {
// skip the cpp tests for the moment since they are broken.
describe.skip('cpp extension', function () {

before(() => {
const driver = browser;

driver.url('/');
driver.localStorage('DELETE');
driver.refresh();

mainPage = new MainPage(driver);
topPanel = new TopPanel(driver);
leftPanel = new LeftPanel(driver);
bottomPanel = new BottomPanel(driver);

mainPage.waitForStartup();
});

it.skip('should be able to change build config', function () {
if (!hasClangd()) {
this.skip();
return;
Expand Down
13 changes: 8 additions & 5 deletions examples/browser/wdio.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function makeConfig(headless) {
sync: true,
//
// Level of logging verbosity: silent | verbose | command | data | result | error
logLevel: 'result',
logLevel: 'error',
//
// Enables colors for log output.
coloredLogs: true,
Expand All @@ -103,12 +103,15 @@ function makeConfig(headless) {
// Saves a screenshot to a given path if a command fails.
screenshotPath: './errorShots/',
//
// Dismiss deprecation warning messages when running tests.
deprecationWarnings: false,
//
// Set a base URL in order to shorten url command calls. If your url parameter starts
// with "/", then the base url gets prepended.
baseUrl: `http://${host}:${port}`,
//
// Default timeout for all waitFor* commands.
waitforTimeout: 30000,
waitforTimeout: 60000,
//
// Default timeout in milliseconds for request
// if Selenium Grid doesn't send response
Expand Down Expand Up @@ -145,14 +148,14 @@ function makeConfig(headless) {
javaArgs: ["-Xmx1024m", "-Djna.nosys=true"],
drivers: {
chrome: {
version: '2.33'
version: '2.35'
}
}
},
seleniumInstallArgs: {
drivers: {
chrome: {
version: '2.33'
version: '2.35'
}
}
},
Expand All @@ -177,7 +180,7 @@ function makeConfig(headless) {
ui: 'bdd',
requires: ['reflect-metadata/Reflect'],
watch: 'js',
timeout: 30000,
timeout: 60000,
},
//
// =====
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"typedoc": "^0.13.0",
"typescript": "^3.1.3",
"uuid": "^3.1.0",
"wdio-mocha-framework": "0.5.9",
"wdio-selenium-standalone-service": "0.0.8",
"wdio-spec-reporter": "0.1.0",
"webdriverio": "4.9.2"
"wdio-mocha-framework": "0.5.13",
"wdio-selenium-standalone-service": "0.0.12",
"wdio-spec-reporter": "0.1.5",
"webdriverio": "4.14.1"
},
"scripts": {
"prepare": "yarn prepare:travis && yarn rebuild:clean && yarn build:clean && yarn prepare:hoisting",
Expand Down
Loading

0 comments on commit 9abc375

Please sign in to comment.