Skip to content

Commit

Permalink
update tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmachadorj committed Jul 14, 2024
1 parent 52f0952 commit ff906c0
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es6"],
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"types": ["node"],
"resolveJsonModule": true,
"paths": {
"@dddforum/backend/*": ["./packages/backend/*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es6"],
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"types": ["node"],
"resolveJsonModule": true,
"paths": {
"@dddforum/backend/*": ["./packages/backend/*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es6"],
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"types": ["node"],
"resolveJsonModule": true,
"paths": {
"@dddforum/backend/*": ["./packages/backend/*"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { defineFeature, loadFeature } from 'jest-cucumber';
import { sharedTestRoot } from '@dddforum/shared/src/paths';
import { CreateUserBuilder } from "@dddforum/shared/tests/support/builders/createUserBuilder";
import { UserBuilder } from "@dddforum/shared/tests/support/builders/users";
import { CreateUserParams } from "@dddforum/shared/src/api/users";
import { Pages } from '../support/pages/pages';

Expand Down Expand Up @@ -50,7 +50,8 @@ defineFeature(feature, (test) => {
test('Successful registration with marketing emails accepted', ({ given, when, then, and }) => {

given('I am a new user', async () => {
user = new CreateUserBuilder()
user = new UserBuilder()
.makeCreateUserCommandBuilder()
.withAllRandomDetails()
.build();

Expand All @@ -75,7 +76,8 @@ defineFeature(feature, (test) => {

test('Invalid or missing registration details', ({ given, when, then, and }) => {
given('I am a new user', async () => {
user = new CreateUserBuilder()
user = new UserBuilder()
.makeCreateUserCommandBuilder()
.withAllRandomDetails()
.withEmail('skj')
.build();
Expand All @@ -102,7 +104,8 @@ defineFeature(feature, (test) => {
test('Account already created with email', ({ given, when, then, and }) => {
given('a set of users already created accounts', async (table: CreateUserParams[]) => {
users = table.map((user) => {
return new CreateUserBuilder()
return new UserBuilder()
.makeCreateUserCommandBuilder()
.withAllRandomDetails()
.withEmail(user.email)
.withFirstName(user.firstName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export class HeaderComponent extends Component {
}

async getUsernameFromHeader () {
const usernameElement = await this.elements.get('header');
return usernameElement?.evaluate((e) => e.textContent);
const usernameElement = await this.elements.get('header') as any;
return usernameElement?.evaluate((e: any) => e.textContent);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ export class TextUtil {
const randomSequence = Math.floor(Math.random() * 1000000);
return `testemail-${randomSequence}@gmail.com`;
}

public static isBetweenLength(text: string, minLength: number, maxLength: number): boolean {
return text.length >= minLength && text.length <= maxLength;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es6"],
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"types": ["node"],
"resolveJsonModule": true,
"paths": {
"@dddforum/backend/*": ["./packages/backend/*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es6"],
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"types": ["node"],
"resolveJsonModule": true,
"paths": {
"@dddforum/backend/*": ["./packages/backend/*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es6"],
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"types": ["node"],
"resolveJsonModule": true,
"paths": {
"@dddforum/backend/*": ["./packages/backend/*"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lib": ["es6"],
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"types": ["node"],
"resolveJsonModule": true,
"paths": {
"@dddforum/backend/*": ["./packages/backend/*"],
Expand Down

0 comments on commit ff906c0

Please sign in to comment.