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

Commit

Permalink
chore(tests): remove element explorer tests, enable unit tests, enabl…
Browse files Browse the repository at this point in the history
…e install tests

- clean up spec/install tests with async / await
- comment out angular2Conf from test.js
  • Loading branch information
cnishina committed Nov 28, 2018
1 parent 30d78a5 commit 9533c3c
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 280 deletions.
49 changes: 0 additions & 49 deletions scripts/interactive_tests/interactive_test.js

This file was deleted.

169 changes: 0 additions & 169 deletions scripts/interactive_tests/interactive_test_util.js

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/interactive_tests/with_base_url.js

This file was deleted.

13 changes: 5 additions & 8 deletions scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,19 @@ const passingTests = [
'node built/cli.js spec/controlLockConf.js',
'node built/cli.js spec/customFramework.js',
'node built/cli.js spec/noGlobalsConf.js',
'node built/cli.js spec/angular2Conf.js',
// 'node built/cli.js spec/angular2Conf.js',
'node built/cli.js spec/hybridConf.js',
'node built/cli.js spec/built/noCFBasicConf.js',
'node built/cli.js spec/built/noCFBasicConf.js --useBlockingProxy',
'node built/cli.js spec/built/noCFPluginConf.js',
// //'node scripts/driverProviderAttachSession.js',
// 'node scripts/errorTest.js',
// // Interactive Element Explorer tasks
// 'node scripts/interactive_tests/interactive_test.js',
// 'node scripts/interactive_tests/with_base_url.js',
// // Unit tests
// 'node node_modules/jasmine/bin/jasmine.js JASMINE_CONFIG_PATH=scripts/unit_test.json',
// // Dependency tests
// 'node node_modules/jasmine/bin/jasmine.js JASMINE_CONFIG_PATH=scripts/dependency_test.json',
// // Typings tests
// 'node spec/install/test.js'
// Dependency tests
'node node_modules/jasmine/bin/jasmine.js JASMINE_CONFIG_PATH=scripts/dependency_test.json',
// Typings tests
'node spec/install/test.js'
];

const executor = new Executor();
Expand Down
1 change: 1 addition & 0 deletions spec/install/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
npm-debug.log
tmp/
package-lock.json
35 changes: 14 additions & 21 deletions spec/install/browserjs_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,22 @@ describe('browser', () => {
let session1;
let session2;

afterEach(() => {
browser.restart();
afterEach(async () => {
await browser.restart();
});

it('should load a browser session', (done) => {
browser.get('http://angularjs.org');
browser.getSession().then(session => {
session1 = session.getId();
expect(session1).not.toBeUndefined();
}).catch(err => {
done.fail('session should be defined');
});
done();
it('should load a browser session', async () => {
await browser.get('http://angularjs.org');
const session = await browser.getSession();
session1 = session.getId();
expect(session1).not.toBeUndefined();
});
it('should have a new browser session', (done) => {
browser.get('http://angularjs.org');
browser.getSession().then(session => {
session2 = session.getId();
expect(session2).not.toBeUndefined();
expect(session1).not.toEqual(session2);
}).catch(err => {
done.fail('session should be defined');
});
done();

it('should have a new browser session', async () => {
await browser.get('http://angularjs.org');
const session = await browser.getSession();
session2 = session.getId();
expect(session2).not.toBeUndefined();
expect(session1).not.toEqual(session2);
});
});
35 changes: 14 additions & 21 deletions spec/install/browserts_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,22 @@ describe('browser', () => {
let session1: string;
let session2: string;

afterEach(() => {
browser.restart();
afterEach(async () => {
await browser.restart();
});

it('should load a browser session', (done) => {
browser.get('http://angularjs.org');
browser.getSession().then(session => {
session1 = session.getId();
expect(session1).not.toBeUndefined();
}).catch(err => {
done.fail('session should be defined');
});
done();
it('should load a browser session', async () => {
await browser.get('http://angularjs.org');
const session = await browser.getSession();
session1 = session.getId();
expect(session1).not.toBeUndefined();
});
it('should have a new browser session', (done) => {
browser.get('http://angularjs.org');
browser.getSession().then(session => {
session2 = session.getId();
expect(session2).not.toBeUndefined();
expect(session1).not.toEqual(session2);
}).catch(err => {
done.fail('session should be defined');
});
done();

it('should have a new browser session', async () => {
await browser.get('http://angularjs.org');
const session = await browser.getSession();
session2 = session.getId();
expect(session2).not.toBeUndefined();
expect(session1).not.toEqual(session2);
});
});

0 comments on commit 9533c3c

Please sign in to comment.