This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# if not in your .env file | |
os.environ['OPENAI_API_KEY'] = '' | |
from langchain_community.document_loaders import TextLoader | |
from langchain.tools.retriever import create_retriever_tool | |
from langchain import hub | |
from langchain.agents import AgentExecutor, create_openai_tools_agent | |
from langchain_openai import ChatOpenAI, OpenAIEmbeddings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { test as setup} from '@playwright/test' | |
import { LoginTapi } from '../tapis/login_tapi' | |
const authFile = './playwright/.auth/user.json' | |
setup('saves login state', async ({ page }) => { | |
const login_tapi = new LoginTapi(page) | |
await login_tapi.login() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { User } from '@/types/user_types' | |
import { CreateUserTapi } from '../tapis/create_user_tapi' | |
import { LoginTapi } from '../tapis/login_tapi' | |
import { test, type Page } from '@playwright/test' | |
import { openCreateUserTab } from '@/open_tabs' | |
test.describe.configure({ mode: 'serial' }) | |
let page: Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Page, expect } from '@playwright/test' | |
import { User } from '@/types/user_types' | |
export class CreateUserTapi { | |
constructor(protected user: User, public page: Page) { | |
this.page = page | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Page, expect } from "@playwright/test" | |
export class LoginTapi { | |
constructor(public page: Page) { | |
this.page = page | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import JestMockers from "@tests/jest_mockers" | |
import { Database } from "firebase/database" | |
namespace FirebaseMocks { | |
export function createAppInitMock() { | |
const app_mock = jest.fn() | |
const initializeAppMock = jest.fn() | |
initializeAppMock.mockReturnValue(app_mock) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DataTypes from "@/models/data_types" | |
import User, { UpdateFindType } from "@/models/user" | |
import SaleL3Types from "@blogic/sale_l3_types" | |
import L3DataGenerators from "@tests/l3_data_generators" | |
import * as user_model_creator from "@tests/shared/user_model_creator" | |
namespace UserTapi { | |
export function createQuickBooksUser() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createErrorServiceErrorMock } from "@tests/shared/error_service_mock" | |
const { | |
setApiKey, | |
send | |
} = createSendGridMock() | |
createErrorServiceErrorMock() | |
import EmailTypes from "@app/email_types" | |
import EmailSender from "@/use_cases/email/email_sender" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import createNqbMock from "@tests/shared/nqb_mock" | |
const nqb_mock = createNqbMock() | |
const qb_mock = { | |
sendRequest: nqb_mock.mockSendRequest, | |
} | |
import UnpaidInvoicesFromDateQueryTapi from "./unpaid_invoices_from_date_query_tapi" | |
import unpaidInvoicesFromDateQueryFactory, { UnpaidInvoicesFromDateQuery } from "@qb/query_wrappers/unpaid_invoices_from_date_query" | |
import { QbApiType } from "@qb/request" | |
import date_abstraction, { DateWrapper } from "@/libs/date_abstraction" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Wrapper } from "@vue/test-utils" | |
// https://gist.github.com/mandemeskel/2b109df0ad2665de4c4519f2ddd6d507 | |
import * as VueTestHelpers from "./vue_test_helpers" | |
export function expectElementNotToBeRequired( | |
it_or_page: Wrapper<any>, | |
selector?: string, | |
) { |
NewerOlder