fix server unit tests
This commit is contained in:
parent
80970ba035
commit
6f71870afd
|
@ -10,10 +10,10 @@
|
|||
|
||||
<section>
|
||||
<div class="content">
|
||||
<heading>
|
||||
<header>
|
||||
<i class="ri-information-line alert" />
|
||||
<h4 class="budibase__title--4">Delete Record</h4>
|
||||
</heading>
|
||||
</header>
|
||||
<p>
|
||||
Are you sure you want to delete this record? All of your data will be
|
||||
permanently removed. This action cannot be undone.
|
||||
|
@ -47,7 +47,7 @@
|
|||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
heading {
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
|
||||
<section>
|
||||
<div class="content">
|
||||
<heading>
|
||||
<header>
|
||||
<i class="ri-information-line alert" />
|
||||
<h4 class="budibase__title--4">Delete Table</h4>
|
||||
</heading>
|
||||
</header>
|
||||
<p>
|
||||
Are you sure you want to delete this table? All of your data will be
|
||||
permanently removed. This action cannot be undone.
|
||||
|
@ -50,7 +50,7 @@
|
|||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
heading {
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
<section>
|
||||
<div class="content">
|
||||
<heading>
|
||||
<header>
|
||||
<i class="ri-information-line alert" />
|
||||
<h4 class="budibase__title--4">Delete View</h4>
|
||||
</heading>
|
||||
</header>
|
||||
<p>
|
||||
Are you sure you want to delete this view? All of your data will be
|
||||
permanently removed. This action cannot be undone.
|
||||
|
@ -48,7 +48,7 @@
|
|||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
heading {
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<script>
|
||||
import { Popover, TextButton, Button, Icon, Input, Select } from "@budibase/bbui"
|
||||
import {
|
||||
Popover,
|
||||
TextButton,
|
||||
Button,
|
||||
Icon,
|
||||
Input,
|
||||
Select,
|
||||
} from "@budibase/bbui"
|
||||
import { backendUiStore } from "builderStore"
|
||||
import { notifier } from "builderStore/store/notifications"
|
||||
import CreateEditRecord from "../modals/CreateEditRecord.svelte"
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<script>
|
||||
import { backendUiStore } from "builderStore"
|
||||
import { DropdownMenu, TextButton as Button, Icon, Input, Select } from "@budibase/bbui"
|
||||
import {
|
||||
DropdownMenu,
|
||||
TextButton as Button,
|
||||
Icon,
|
||||
Input,
|
||||
Select,
|
||||
} from "@budibase/bbui"
|
||||
import { FIELDS } from "constants/backend"
|
||||
import CreateEditColumn from "../modals/CreateEditColumn.svelte"
|
||||
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<script>
|
||||
import { Popover, TextButton, Button, Icon, Input, Select } from "@budibase/bbui"
|
||||
import {
|
||||
Popover,
|
||||
TextButton,
|
||||
Button,
|
||||
Icon,
|
||||
Input,
|
||||
Select,
|
||||
} from "@budibase/bbui"
|
||||
import { backendUiStore } from "builderStore"
|
||||
import { notifier } from "builderStore/store/notifications"
|
||||
import CreateEditRecord from "../modals/CreateEditRecord.svelte"
|
||||
|
@ -39,7 +46,7 @@
|
|||
<div class="input-group-row">
|
||||
<p>Group By</p>
|
||||
<Select secondary thin bind:value={view.groupBy}>
|
||||
<option value={false}/>
|
||||
<option value={false} />
|
||||
{#each fields as field}
|
||||
<option value={field}>{field}</option>
|
||||
{/each}
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<script>
|
||||
import { Popover, TextButton, Button, Icon, Input, Select } from "@budibase/bbui"
|
||||
import {
|
||||
Popover,
|
||||
TextButton,
|
||||
Button,
|
||||
Icon,
|
||||
Input,
|
||||
Select,
|
||||
} from "@budibase/bbui"
|
||||
import { goto } from "@sveltech/routify"
|
||||
import { backendUiStore } from "builderStore"
|
||||
import { notifier } from "builderStore/store/notifications"
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
export let indented
|
||||
</script>
|
||||
|
||||
<div data-cy="model-nav-item" class:indented class:selected on:click class={className}>
|
||||
<div
|
||||
data-cy="model-nav-item"
|
||||
class:indented
|
||||
class:selected
|
||||
on:click
|
||||
class={className}>
|
||||
<i class={icon} />
|
||||
<span>{title}</span>
|
||||
<slot />
|
||||
|
|
|
@ -65,7 +65,15 @@ describe("/views", () => {
|
|||
expect(updatedModel.views).toEqual({
|
||||
TestView: {
|
||||
field: "Price",
|
||||
modelId: model._id
|
||||
modelId: model._id,
|
||||
schema: {
|
||||
sum: "number",
|
||||
min: "number",
|
||||
max: "number",
|
||||
count: "number",
|
||||
sumsqr: "number",
|
||||
avg: "number"
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
@ -108,10 +116,7 @@ describe("/views", () => {
|
|||
Price: 4000
|
||||
})
|
||||
const res = await request
|
||||
.post(`/api/views/query/TestView`)
|
||||
.send({
|
||||
meta: {}
|
||||
})
|
||||
.get(`/api/views/TestView?stats=true`)
|
||||
.set(defaultHeaders(app._id, instance._id))
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200)
|
||||
|
@ -142,12 +147,7 @@ describe("/views", () => {
|
|||
Category: "Two"
|
||||
})
|
||||
const res = await request
|
||||
.post(`/api/views/query/TestView`)
|
||||
.send({
|
||||
meta: {
|
||||
groupBy: "Category"
|
||||
}
|
||||
})
|
||||
.get(`/api/views/TestView?stats=true&group=Category`)
|
||||
.set(defaultHeaders(app._id, instance._id))
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200)
|
||||
|
|
|
@ -14,10 +14,6 @@ module.exports = async (ctx, next) => {
|
|||
return
|
||||
}
|
||||
|
||||
// ctx.user = {
|
||||
// instanceId: "inst_4e6f424_970ca7f2b9e24ec8896eb10862d7f22b"
|
||||
// }
|
||||
|
||||
const appToken = ctx.cookies.get("budibase:token")
|
||||
const builderToken = ctx.cookies.get("builder:token")
|
||||
|
||||
|
|
Loading…
Reference in New Issue