Compare commits

...

5 Commits

Author SHA1 Message Date
Daniel
721796a1e8 Test for chinese locales 2021-01-20 15:50:36 +01:00
Christian Georgi
5b966c503c Add hint for authentication
So that fewer users stumble over the basic authentication popup.
2021-01-18 14:40:24 +01:00
Christian Georgi
75628b6096 Use latest UI5 again 2021-01-18 14:31:57 +01:00
Daniel
c12e516f5d Prep for upcomming releases 2021-01-13 16:30:40 +01:00
Marius Obert
01073fd6a5 Restructure sentence 2021-01-11 10:54:59 +01:00
7 changed files with 47 additions and 12 deletions

View File

@@ -42,6 +42,8 @@ cds watch bookshop
After that open this link in your browser: [http://localhost:4004](http://localhost:4004)
When asked to log in, type `alice` as user and leave the password field blank, which is the [default user](https://cap.cloud.sap/docs/node.js/authentication#mocked).
### Testing
Run the provided tests with [_jest_](http://jestjs.io) or [_mocha_](http://mochajs.org), for example:
@@ -51,15 +53,15 @@ npx jest
> While mocha is a bit smaller and faster, jest runs tests in parallel and isolation, which allows to run all tests.
### Serve `npm`
### Serve `npm`
We've simple npm registry mock included which allows you to do an `npm install @capire/<package>` anywhere locally. Use it as follows:
We've included a simple npm registry mock which allows you to do an `npm install @capire/<package>` locally. Use it as follows:
1. Start the @capire registry:
```sh
npm run registry
```
> While running this will have `@capire:registry=http://localhost:4444` set with npmrc.
> While running this will have `@capire:registry=http://localhost:4444` set with npmrc.
2. Install one of the @capire packages wherever you like, e.g.:
```sh

View File

@@ -0,0 +1 @@
# this file is not used

View File

@@ -0,0 +1,14 @@
Books = Chinesische Bücher
Book = Chinesiches Buch
ID = CN ID
Title = Chinese Titel
Authors = Chinese Autoren
Author = Chinese Autor
AuthorID = Chinese ID des Autors
AuthorName = Chinese Name des Autors
Name = Chinese Name
Stock = Chinese Bestand
Order = Chinese Bestellung
Orders = Chinese Bestellungen
Price = Chinese Preis
Genre = Chinese Genre

View File

@@ -40,8 +40,7 @@
</script>
<script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
<!-- <script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" -->
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/1.78.6/resources/sap-ui-core.js"
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
data-sap-ui-compatVersion="edge"
data-sap-ui-theme="sap_fiori_3"

View File

@@ -7,8 +7,8 @@ using CatalogService from '@capire/bookshop';
annotate CatalogService.Books with @(
UI: {
HeaderInfo: {
TypeName: 'Book',
TypeNamePlural: 'Books',
TypeName: '{i18n>Book}',
TypeNamePlural: '{i18n>Books}',
Description: {Value: author}
},
HeaderFacets: [

View File

@@ -325,7 +325,26 @@ describe('cds.ql → cqn', () => {
})
// using CQL fragments -> uses cds.parse.expr
expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({
const is_v2 = !!cds.parse.expr('(1,2)').list
if (is_v2) expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({
SELECT: {
from: { ref: ['Foo'] },
where: [
{ ref: ['ID'] },
'=',
{ val: ID },
'and',
{ ref: ['x'] },
'in',
{list:[
{ ref: ['foo'] },
{ val: 'bar' },
{ val: 3 },
]}
],
},
})
else expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({
SELECT: {
from: { ref: ['Foo'] },
where: [

View File

@@ -42,16 +42,16 @@ describe('Messaging', ()=>{
// { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N },
// ),
srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N }
{ ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
),
srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N }
{ ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
),
srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N }
{ ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
),
srv.create ('Reviews') .entries (
{ ID: 111 + (++N), subject: "201", title: "Captivating", rating: N }
{ ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N }
),
]))