Skip to content

Commit

Permalink
Explorer 2.0 frontend (wiringbits#329)
Browse files Browse the repository at this point in the history
This is a huge change, rewriting most of the UI, it has been in production for a while, hence, I'm merging the changes.

This involves quite a lot of changes mainly by Alexander and Midas.

Co-authored-by: Alexander <[email protected]>
Co-authored-by: Midas Dev <[email protected]>
  • Loading branch information
3 people authored Jun 20, 2021
1 parent 0085399 commit 40ef254
Show file tree
Hide file tree
Showing 210 changed files with 11,218 additions and 14,654 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Scala CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/sample-config/ for more details
#

version: 2
jobs:
build-web:
Expand All @@ -18,7 +18,7 @@ jobs:
paths:
- "web-ui/node_modules"
- run: cd web-ui && npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
- run: cd web-ui && npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js
# - run: cd web-ui && npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js

build-server:
machine:
Expand Down
1 change: 0 additions & 1 deletion web-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
Expand Down
3 changes: 2 additions & 1 deletion web-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"src/favicon.ico"
],
"styles": [
"src/styles.css"
"src/styles.css",
"./node_modules/ngx-ui-switch/ui-switch.component.css"
],
"scripts": []
},
Expand Down
13 changes: 11 additions & 2 deletions web-ui/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';

describe('web-ui App', () => {
let page: AppPage;
Expand All @@ -9,6 +10,14 @@ describe('web-ui App', () => {

it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
expect(page.getTitleText()).toEqual('Welcome to protractor-example!');
});
});

afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
8 changes: 4 additions & 4 deletions web-ui/e2e/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo() {
return browser.get('/');
return browser.get(browser.baseUrl) as Promise<any>;
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}
}
4 changes: 4 additions & 0 deletions web-ui/e2e/protractor-ci.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exports.config = {
// seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['app.e2e-spec.ts']
};
5 changes: 2 additions & 3 deletions web-ui/e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
Expand All @@ -11,4 +10,4 @@
"node"
]
}
}
}
Loading

0 comments on commit 40ef254

Please sign in to comment.