Skip to content

Commit

Permalink
Increment included versions of existdb-launcher and existdb-usermanag…
Browse files Browse the repository at this point in the history
…er once more
  • Loading branch information
wolfgangmm committed Apr 26, 2020
1 parent 7bca2bc commit 1a07672
Show file tree
Hide file tree
Showing 22 changed files with 7,270 additions and 29 deletions.
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"paper-item": "PolymerElements/paper-item#^2.0.0",
"app-route": "PolymerElements/app-route#^2.0.0",
"paper-ripple": "PolymerElements/paper-ripple#^2.0.0",
"existdb-launcher": "https://github.com/eXist-db/launcher.git#^1.2.3",
"existdb-usermanager": "https://github.com/eXist-db/usermanager.git#^v0.16.6",
"existdb-launcher": "https://github.com/eXist-db/launcher.git#^1.2.4",
"existdb-usermanager": "https://github.com/eXist-db/usermanager.git#^v0.16.7",
"existdb-backup": "https://github.com/eXist-db/existdb-backup.git#^1.1.0",
"repo-elements": "https://github.com/eXist-db/repo-elements/archive/master.zip",
"iron-lazy-pages": "^2.1.1",
Expand All @@ -35,4 +35,4 @@
"resolutions": {
"polymer": "^2.0.0"
}
}
}
10 changes: 5 additions & 5 deletions bower_components/existdb-launcher/.bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
],
"private": true,
"homepage": "https://github.com/eXist-db/launcher",
"version": "1.2.2",
"_release": "1.2.2",
"version": "1.2.4",
"_release": "1.2.4",
"_resolution": {
"type": "version",
"tag": "v1.2.2",
"commit": "780d30183d78736cac060622cc18a8fd50ad8351"
"tag": "v1.2.4",
"commit": "b9b0e574d7026b5ca836b019599fc098f4116129"
},
"_source": "https://github.com/eXist-db/launcher.git",
"_target": "^1.2.2",
"_target": "^1.2.4",
"_originalSource": "https://github.com/eXist-db/launcher.git"
}
7 changes: 7 additions & 0 deletions bower_components/existdb-launcher/existdb-login.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ <h2>Login</h2>
this.$.checkLogin.generateRequest();
}
});
document.addEventListener('checkUser', (ev) => {
console.log('checkUser event received: %o', ev.detail);
if (ev.detail.user === this.user) {
this.password = ev.detail.password;
this._confirmLogin();
}
});
}

ready(){
Expand Down
10 changes: 5 additions & 5 deletions bower_components/existdb-usermanager/.bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
],
"private": true,
"homepage": "https://github.com/eXist-db/usermanager",
"version": "0.16.5",
"_release": "0.16.5",
"version": "0.16.7",
"_release": "0.16.7",
"_resolution": {
"type": "version",
"tag": "v0.16.5",
"commit": "ae449609b86e863591a91cbf6aa06c8e65d2590d"
"tag": "v0.16.7",
"commit": "5897bf0403e20c8202a678025e9c618678cdc45b"
},
"_source": "https://github.com/eXist-db/usermanager.git",
"_target": "^v0.16.5",
"_target": "^v0.16.7",
"_originalSource": "https://github.com/eXist-db/usermanager.git"
}
19 changes: 8 additions & 11 deletions bower_components/existdb-usermanager/controller.xql
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ declare function local:delete-group($group as xs:string) as element(deleted) {
declare function local:update-user($user as xs:string, $request-body as xs:string) as element() {
if(usermanager:update-user($user, jsjson:parse-json($request-body)))then
(
response:set-header("Location", local:get-user-location($user)),
response:set-status-code($local:HTTP_OK),
(: response:set-header("Location", local:get-user-location($user)),
response:set-status-code($local:HTTP_OK), :)

(: TODO ideally would like to set 204 above and not return and content in the body
however the controller.xql is not capable of doing that, as there is no dispatch/ignore
Expand All @@ -158,8 +158,8 @@ declare function local:update-user($user as xs:string, $request-body as xs:strin
declare function local:update-group($group as xs:string, $request-body) as element() {
if(usermanager:update-group($group, jsjson:parse-json($request-body)))then
(
response:set-header("Location", local:get-group-location($group)),
response:set-status-code($local:HTTP_OK),
(: response:set-header("Location", local:get-group-location($group)),
response:set-status-code($local:HTTP_OK), :)

(: TODO ideally would like to set 204 above and not return and content in the body
however the controller.xql is not capable of doing that, as there is no dispatch/ignore
Expand All @@ -180,8 +180,8 @@ declare function local:create-user($user as xs:string, $request-body) as element

if($user)then
(
response:set-header("Location", local:get-user-location($user)),
response:set-status-code($local:HTTP_CREATED),
(: response:set-header("Location", local:get-user-location($user)),
response:set-status-code($local:HTTP_CREATED), :)

(: send back updated user json :)
usermanager:get-user($user)
Expand All @@ -195,8 +195,8 @@ declare function local:create-group($user as xs:string, $request-body) as elemen
let $group := usermanager:create-group(jsjson:parse-json($request-body)) return
if($group)then
(
response:set-header("Location", local:get-group-location($group)),
response:set-status-code($local:HTTP_CREATED),
(: response:set-header("Location", local:get-group-location($group)),
response:set-status-code($local:HTTP_CREATED), :)

(: send back updated group json :)
usermanager:get-group($group)
Expand Down Expand Up @@ -226,13 +226,10 @@ declare function local:get-group($group as xs:string) as element() {
)
};

(:
let $log := util:log("info", "exist path: " || $exist:path)
let $log := util:log("info", "request URI: " || request:get-uri())
let $log := util:log("info", "resource: " || $exist:resource)
return
:)

if ($exist:path eq '') then
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<redirect url="{request:get-uri()}/"/>
Expand Down
4 changes: 4 additions & 0 deletions bower_components/existdb-usermanager/cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"baseUrl": "http://localhost:8080/exist/apps",
"projectId": "6d2b23"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/// <reference types="cypress" />

describe('User Manager', function() {
describe('log in', function() {
before(function() {
cy.visit('/dashboard/login.html')
cy.get('#user').type('admin')
cy.get('.button').click()
})
describe('create and delete users', function() {
it('should create and delete users', function() {
cy.visit('/dashboard/admin#/usermanager')
cy.shadowGet('#addUser').shadowClick()
.shadowGet('#userInput').shadowTrigger('input', 'rudi')
cy.shadowGet('input[type=password]').shadowTrigger('input', 'pass')
cy.shadowGet('#confirm').shadowTrigger('input', 'pass')
cy.shadowGet('#memberOf > paper-item:nth-child(1)').shadowClick()
cy.shadowGet('#save').shadowClick()
cy.shadowGet('.user-entry .user:contains("rudi")').shadowShould('have.length', 1)

cy.shadowGet('.user-entry .user:contains("rudi")').shadowClick()
cy.shadowGet('#userForm > form > paper-button:nth-child(11)').shadowClick().wait(500)

cy.shadowGet('.user-entry')
.shadowFind('span.user')
.shadowShould('not.have.text', 'rudi')
})
})
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/// <reference types="cypress" />

describe('User Manager', function() {
describe('log in', function() {
before(function() {
cy.visit('/dashboard/login.html')
cy.get('#user').type('admin')
cy.get('.button').click()
})
describe('create and delete users', function() {
it('should create and delete users', function() {
cy.visit('/dashboard/admin#/usermanager')
cy.shadowGet('#addUser').shadowClick()
.shadowGet('#userInput').shadowTrigger('input', 'rudi')
cy.shadowGet('input[type=password]').shadowTrigger('input', 'pass')
cy.shadowGet('#confirm').shadowTrigger('input', 'pass')
cy.shadowGet('#memberOf > paper-item:nth-child(1)').shadowClick()
cy.shadowGet('#save').shadowClick()
cy.shadowGet('.user-entry .user:contains("rudi")').shadowShould('have.length', 1)

cy.shadowGet('.user-entry .user:contains("rudi")').shadowClick()
cy.shadowGet('#userForm > form > paper-button:nth-child(11)').shadowClick().wait(500)

cy.shadowGet('.user-entry')
.shadowFind('span.user')
.shadowShould('not.have.text', 'rudi')
})
})
})
})
17 changes: 17 additions & 0 deletions bower_components/existdb-usermanager/cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
Loading

0 comments on commit 1a07672

Please sign in to comment.