Skip to content

Commit

Permalink
#555
Browse files Browse the repository at this point in the history
  • Loading branch information
paxtonhare committed Nov 7, 2017
1 parent 0eff593 commit 4ac1f10
Show file tree
Hide file tree
Showing 23 changed files with 143 additions and 896 deletions.
59 changes: 59 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,65 @@ cd /path/to/data-hub-project

Now open your browser to [http://localhost:4200](http://localhost:4200) to use the debug version of the Quickstart UI.

### Troubleshooting
Did the `gradle runui` command fail for you? Here's a quick checklist to troubleshoot.

#### Do you have Gradle 3.4 or newer?
Using straight up gradle:
```
gradle -v
```
or if you are using the wrapper:
```
./gradlew -v
```
If your gradle wrapper is older than `3.4` then do this:
```
gradle wrapper --gradle-version 3.4
```
#### Are you on the develop branch?
_hint: you should be_
Check like so:
```bash
git branch
```

To switch to the develop branch:
```bash
git checkout develop
```

#### Do you have the latest code?
Better make sure...

##### You clone from the github.com/marklogic-community/marklogic-data-hub repo

```bash
git pull origin develop
```
##### Your forked then cloned your fork
Make sure you have the upstream set:
```bash
$ git remote add upstream git://github.com/marklogic-community/marklogic-data-hub.git
```

Then fetch the upstream:
```bash
git fetch upstream develop
```

Now merge it in:
```bash
git rebase upstream/develop
```

#### Try removing the `quick-start/node_modules` directory.
If you are seeing a bunch of javascript errors you might have a messed up node_modules directory. Try to remove it then run again.

```bash
rm -rf quick-start/node_modules
```

## Submission Guidelines

### Submitting an Issue
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Wed Sep 06 15:50:41 EDT 2017
#Tue Nov 07 13:28:23 EST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
Empty file modified gradlew.bat
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions quick-start/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ testem.log
# e2e
/e2e/*.js
/e2e/*.map
/e2e/reports/*

#System Files
.DS_Store
Expand Down
41 changes: 40 additions & 1 deletion quick-start/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors

buildscript {
ext {
springBootVersion = '1.5.6.RELEASE'
Expand All @@ -15,7 +18,7 @@ plugins {
id 'java'
id 'eclipse'
id 'idea'
id 'com.moowork.node' version '1.1.1'
id 'com.moowork.node' version '1.2.0'
id 'org.springframework.boot' version '1.5.3.RELEASE'
}

Expand Down Expand Up @@ -46,6 +49,7 @@ ext.junitJupiterVersion = '5.0.0-RC3'

dependencies {
compile("org.springframework.boot:spring-boot-starter:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-websocket:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-security:${springBootVersion}")
Expand Down Expand Up @@ -134,6 +138,39 @@ task runUI(type: NpmTask) {
dependsOn tasks.npmInstallUI
}

task startRest {
doFirst {
def executorService = Executors.newSingleThreadExecutor()
executorService.submit({
tasks.findMainClass.execute()
pid = tasks.bootRun.execute()

} as Runnable)
}
}

task e2eLaunch(type: NpmTask) {
args = ['run', 'e2e-ng-cli']
dependsOn tasks.startRest
}

task e2eUI {
dependsOn tasks.e2eLaunch
}

task stopBootrun {
doLast {
println("STOPPING Spring Boot")
def connection = new URL("http://localhost:8080/shutdown").openConnection()
connection.setRequestMethod("POST")
connection.connect()
println 'Shutting down application...'
println connection.inputStream.text
}
}

e2eUI.finalizedBy stopBootrun

if (!(
gradle.startParameter.taskNames*.toLowerCase().contains("bootrun") ||
gradle.startParameter.taskNames*.toLowerCase().contains("test") ||
Expand All @@ -146,6 +183,8 @@ if (!(
processResources.dependsOn copyIndexHtml
}

test.dependsOn e2eUI

bootRun {
addResources = true
environment 'spring.profiles.active', 'dev'
Expand Down
2 changes: 1 addition & 1 deletion quick-start/e2e/page-objects/auth/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class LoginPage extends AppPage {
}

get installProgress() {
return element(by.css('section.install-status pre'));
return element(by.css('.install-progress mdl-progress'));
}

get installComplete() {
Expand Down
Loading

0 comments on commit 4ac1f10

Please sign in to comment.