Merge pull request #10967 from Budibase/fix/app-url-failure

Quick fix for integration test intermittent failure
This commit is contained in:
Michael Drury 2023-06-20 12:52:49 +01:00 committed by GitHub
commit 73209454db
1 changed files with 8 additions and 4 deletions

View File

@ -1,19 +1,23 @@
import { generator } from "../../shared"
import { CreateAppRequest } from "../../types"
function uniqueWord() {
return generator.word() + generator.hash()
}
export const generateApp = (
overrides: Partial<CreateAppRequest> = {}
): CreateAppRequest => ({
name: generator.word() + generator.hash(),
url: `/${generator.word() + generator.hash()}`,
name: uniqueWord(),
url: `/${uniqueWord()}`,
...overrides,
})
// Applications type doesn't work here, save to add useTemplate parameter?
export const appFromTemplate = (): CreateAppRequest => {
return {
name: generator.word(),
url: `/${generator.word()}`,
name: uniqueWord(),
url: `/${uniqueWord()}`,
// @ts-ignore
useTemplate: "true",
templateName: "Near Miss Register",