P5-7496: orders tests (#3)

* P5-7495: added more db data and more designer tests

* P5-7496: rebuild for sql export, added better test control values

* changed order rows - edge from int to string

* added tests for designer order rows

* remove sql inserts

* Some cleanup and moving files

* package

* removed comments

* added base sql files to pass tests on github CI
This commit is contained in:
Arwid Thornström
2021-07-02 11:17:59 +02:00
committed by GitHub
parent 84d62c6b8a
commit c92482777d
44 changed files with 3965 additions and 62 deletions
+4 -1
View File
@@ -204,7 +204,10 @@ export class OrderAPI extends BaseSQLDataSource {
`;
const from = input?.dates?.from ? input.dates.from : new Date('2000-01-01');
const to = input?.dates?.to ? input.dates.to : new Date();
const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
const to = input?.dates?.to ? input.dates.to : tomorrow; // Tomorrow
const rows = await this.knex
.raw(query, [designerId, this.getSQLDate(from), this.getSQLDate(to)])
+1 -1
View File
@@ -93,7 +93,7 @@ export interface OrderRow {
discountValue: number;
displayHeight: number;
displayWidth: number;
edge: number;
edge: string;
frameColor: string;
framed: number;
group: string;