Skip to content

Commit

Permalink
add secure token variable
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Oct 22, 2020
1 parent b7b74a9 commit b9ffff1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
- TRAVIS_NODE_VERSION="10.10.0"
- secure: "JPdkdywgQbUUixuDuATMXZHWpWImziRoGKd1tCjYd3+0lamLBlldmjhsZ+Bp7ZabKg2ExQZareGDp34cJdOwWBGb2gg0/emjy4UkWkbDH28zyoWNK1SFp6OTY8AeY/icPXKw3MBgKoXG+hemfcxhYc8rUNgUt7V2fA0JSAkCi4w="
- secure: "BrGlbfGLxZYCynh7LeIFyQeiTx4YX6fdMYK2UceVLoAFjOml9mvtJY5i4Oafc2iBDPQ0wAP/eIzZOTcddwc+12o1S0EAq3zZb5z+MOwRKjsiC+BGUXNzAGLaeJqFTC5Sn+vvqsaDGaR3jrdQ8APUL7XapuLUAkof7vqc1SPsn3I="
- secure: "YH4s6huZYW34XFlKDAg7yC8VGUjIiird3gDKOmHyhlPVoQa75tll3iqVBBxNFcj+5CfzlCU+ZZK/JTvRoLJ7+QBPrRm7eZ6+s44JaJK+eAz12AJKdEfZyp+blMQ26Y8uOz5AZQhnRsoYfbqDK3p/T8FW1MAKdvE+8nHDCdAh26k="

cache:
directories:
Expand Down
28 changes: 1 addition & 27 deletions test/integration/specs/narrative_basic_test.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,12 @@
/*global describe, it, browser, expect, $, afterEach, beforeEach*/
/*global describe, it, browser, expect, $*/
const Utils = require('../wdioUtils');

describe('Narrative tree page with login', () => {
'use strict';


// // async version
// it('should open the narrative tree page', async () => {
// await browser.url('/narrative/tree');
// await expect(browser).toHaveTitle('KBase Narrative');
// });

// // sync version
// it('sets the user token', () => {
// browser.url('/narrative/tree');
// $('.form-control').setValue(userToken);

// // find an anchor element with text = OK and click on it
// $('=OK').click();
// expect(browser.getCookies(['kbase_session'])[0].value).toBe(userToken);
// });

it('opens a narrative', async () => {
await Utils.login();
// await browser.url('/narrative/tree');
// await browser.setCookies({name: 'kbase_session', value: userToken, path: '/'});
// expect(browser.getCookies(['kbase_session'])[0].value).toBe(userToken);
await browser.url(Utils.makeURL('narrative/31932'));
// $('.form-control').setValue(userToken);
// $('=OK').click();
// expect(browser.getCookies(['kbase_session'])[0].value).toBe(TOKEN);
// browser.pause(1000);
// $('span*=ProkkaTest').click();
// browser.switchWindow('/narrative/notebooks/ws.31932.obj.1');
const loadingBlocker = await $('#kb-loading-blocker');
const loadingText = await loadingBlocker.getText();
expect(loadingText).toContain('Connecting to KBase services...');
Expand Down
4 changes: 2 additions & 2 deletions test/integration/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ if (process.env.BASE_URL) {
baseUrl = process.env.BASE_URL;
}
let authToken = 'fakeToken';
if (process.env.TOKEN) {
authToken = process.env.TOKEN;
if (process.env.KBASE_TOKEN) {
authToken = process.env.KBASE_TOKEN;
}

const wdioConfig = {
Expand Down

0 comments on commit b9ffff1

Please sign in to comment.