Skip to content

Commit

Permalink
lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Nov 29, 2024
1 parent 3826fad commit 362b5b6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions e2e/tests/ui-driven/src/create-flow-with-geospatial.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ test.describe("Flow creation, publish and preview", () => {
userId: context.user!.id!,
});
// publish flow
await navigateToService(page, serviceProps.slug)
await navigateToService(page, serviceProps.slug);
await publishService(page);

let previewLink = page.getByRole("link", {
name: "Open published service",
});
await expect(previewLink).toBeVisible();

await navigateToService(page, serviceProps.slug)
await navigateToService(page, serviceProps.slug);
await turnServiceOnline(page);

// Exit back to main Editor page
Expand Down
17 changes: 11 additions & 6 deletions e2e/tests/ui-driven/src/helpers/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Flow, TestContext } from "./types";

export const contextDefaults: TestContext = {
user: {
id:0,
id: 0,
firstName: "Test",
lastName: "Test",
email: "[email protected]",
Expand All @@ -34,8 +34,13 @@ export async function setUpTestContext(
): Promise<TestContext> {
const context: TestContext = { ...initialContext };
if (context.user) {
const {firstName, lastName, email, isPlatformAdmin} = context.user
context.user.id = await $admin.user.create({firstName, lastName, email, isPlatformAdmin});
const { firstName, lastName, email, isPlatformAdmin } = context.user;
context.user.id = await $admin.user.create({
firstName,
lastName,
email,
isPlatformAdmin,
});
}
if (context.team) {
context.team.id = await $admin.team.create({
Expand Down Expand Up @@ -76,9 +81,9 @@ export async function setUpTestContext(
}

export async function tearDownTestContext() {
await $admin.flow._destroyAll();
await $admin.user._destroyAll()
await $admin.team._destroyAll()
await $admin.flow._destroyAll();
await $admin.user._destroyAll();
await $admin.team._destroyAll();
}

export function generateAuthenticationToken(userId: string) {
Expand Down
5 changes: 4 additions & 1 deletion e2e/tests/ui-driven/src/helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export interface Flow {
}

export interface TestContext {
user: Pick<User, "firstName" | "lastName" | "email" | "isPlatformAdmin" | "id">
user: Pick<
User,
"firstName" | "lastName" | "email" | "isPlatformAdmin" | "id"
>;
team: { id?: number } & NewTeam;
flow?: Flow;
externalPortalFlow?: Flow;
Expand Down

0 comments on commit 362b5b6

Please sign in to comment.