From 317eeb3c8fba65bb18599bba56ecc6e06ef8ed9f Mon Sep 17 00:00:00 2001 From: Bob Qiu Date: Mon, 2 Nov 2026 18:22:49 +0800 Subject: [PATCH] style(insomnia-test): sort imports after switching to @package alias Co-Authored-By: Claude Sonnet 5.5 --- packages/insomnia-test/misc/fixtures.ts | 6 +++--- packages/insomnia-test/misc/git-fixtures.ts | 1 + packages/insomnia-test/misc/upgrade-fixture.ts | 3 +-- .../tests/app/cancel-pre-request-script.spec.ts | 3 +-- .../tests/app/database-backup-on-launch.spec.ts | 3 +-- .../tests/app/hidden-window-closed-recovers.spec.ts | 3 +-- .../tests/app/hidden-window-hangs-recovers.spec.ts | 3 +-- packages/insomnia-test/tests/app/scratch-pad-mode.spec.ts | 3 +-- packages/insomnia-test/tests/app/stdout-epipe.spec.ts | 3 +-- .../branch-history-isolation-across-workspaces.spec.ts | 3 +-- packages/insomnia-test/tests/cloud-sync/branches.spec.ts | 3 +-- .../cloud-sync/concurrent-workspace-creation-race.spec.ts | 4 ++-- .../tests/cloud-sync/delete-unsynced-remote-file.spec.ts | 4 ++-- .../tests/cloud-sync/delete-workspace-log-signature.spec.ts | 3 +-- .../insomnia-test/tests/cloud-sync/delete-workspace.spec.ts | 3 +-- .../discard-changes-isolation-across-workspaces.spec.ts | 3 +-- .../cloud-sync/discard-commit-push-and-restore.spec.ts | 3 +-- .../tests/cloud-sync/invalid-branch-names.spec.ts | 3 +-- .../tests/cloud-sync/merge-conflict-resolution.spec.ts | 3 +-- .../cloud-sync/new-collection-own-backend-project.spec.ts | 3 +-- .../cloud-sync/new-collection-survives-restart.spec.ts | 3 +-- .../tests/cloud-sync/pull-remote-changes.spec.ts | 3 +-- .../restore-snapshot-removes-added-request.spec.ts | 3 +-- .../sidebar-drag-drop-into-empty-collection.spec.ts | 3 +-- .../unrelated-action-during-collection-creation.spec.ts | 4 ++-- .../unsynced-file-delete-button-visibility.spec.ts | 3 +-- .../tests/cookie/cookie-path-mismatch-not-sent.spec.ts | 3 +-- .../tests/cookie/cookie-same-key-overwrite.spec.ts | 3 +-- .../tests/cookie/expired-cookie-not-sent.spec.ts | 3 +-- packages/insomnia-test/tests/cookie/happy-path.spec.ts | 3 +-- .../cookie/host-prefix-cookie-requires-host-only.spec.ts | 3 +-- .../tests/cookie/http-only-cookie-always-sent.spec.ts | 3 +-- .../tests/cookie/raw-cookie-string-editor.spec.ts | 3 +-- .../tests/cookie/secure-cookie-not-sent-over-http.spec.ts | 3 +-- .../tests/data/export/export-openapi-spec.spec.ts | 3 +-- packages/insomnia-test/tests/data/export/happy-path.spec.ts | 3 +-- .../import/clipboard/import-by-wsdl/import-by-wsdl.spec.ts | 3 +-- .../tests/data/import/curl/import-by-curl.spec.ts | 3 +-- .../tests/data/import/curl/import-curl-basic-auth.spec.ts | 3 +-- .../tests/data/import/curl/import-curl-cookie.spec.ts | 3 +-- .../import/curl/import-curl-data-raw-and-binary.spec.ts | 3 +-- .../data/import/curl/import-curl-escaped-multiline.spec.ts | 3 +-- .../data/import/curl/import-curl-get-data-urlencode.spec.ts | 3 +-- .../curl/import-curl-insecure-and-compressed-flags.spec.ts | 3 +-- .../data/import/curl/import-curl-multipart-form.spec.ts | 3 +-- .../curl/import-curl-repeated-headers-and-data.spec.ts | 3 +-- .../tests/data/import/curl/import-curl-user-agent.spec.ts | 3 +-- .../curl/multiple-commands-semicolon-separated.spec.ts | 3 +-- .../import-content-type-from-postman.spec.ts | 3 +-- .../import-multiple-workspaces.spec.ts | 3 +-- .../import/file/import-open-api/import-open-api.spec.ts | 3 +-- .../tests/data/import/mcp/import-mcp-client.spec.ts | 3 +-- .../tests/data/import/url/import-swagger-api.spec.ts | 3 +-- .../custom-lint-ruleset/custom-lint-ruleset.spec.ts | 3 +-- .../insomnia-test/tests/document/delete-test-suite.spec.ts | 3 +-- packages/insomnia-test/tests/document/happy-path.spec.ts | 3 +-- .../tests/document/legacy-unit-tests-default-off.spec.ts | 3 +-- .../tests/document/spec-editor-toolbar.spec.ts | 3 +-- .../tests/document/spec-outline-navigation.spec.ts | 3 +-- .../tests/document/spectral-lint-errors.spec.ts | 3 +-- .../tests/document/unit-test-suite/unit-test-suite.spec.ts | 3 +-- .../tests/environment/case-sensitive-variable-names.spec.ts | 3 +-- .../tests/environment/circular-variable-reference.spec.ts | 3 +-- .../create-and-duplicate-global-environment.spec.ts | 3 +-- ...bled-sub-environment-variable-falls-back-to-base.spec.ts | 3 +-- .../tests/environment/disabled-variable-mid-chain.spec.ts | 3 +-- .../environment/environment-pickers-and-creation.spec.ts | 3 +-- .../folder-environment-overrides-sub-and-base.spec.ts | 3 +-- .../insomnia-test/tests/environment/json-raw-editor.spec.ts | 3 +-- .../tests/environment/key-value-editor-blank-row.spec.ts | 3 +-- .../tests/environment/mixed-variables-in-value.spec.ts | 3 +-- .../tests/environment/nested-variable-resolution.spec.ts | 3 +-- .../environment/private-environment-secret-variable.spec.ts | 3 +-- .../tests/environment/self-referencing-variable.spec.ts | 3 +-- .../sub-environment-empty-falls-back-to-base.spec.ts | 3 +-- .../environment/sub-environment-variable-priority.spec.ts | 3 +-- .../tests/environment/table-editor-disable-row.spec.ts | 3 +-- .../tests/environment/unlinked-environment-variable.spec.ts | 3 +-- .../variable-source-levels.spec.ts | 3 +-- .../variable-source-modal-editing.spec.ts | 3 +-- .../variable-source-tooltip-behavior.spec.ts | 3 +-- .../variable-source-tooltip-open.spec.ts | 3 +-- .../vault-legacy-format-environment-variables.spec.ts | 3 +-- .../event-stream-request/api-key-authentication.spec.ts | 3 +-- .../tests/event-stream-request/basic-authentication.spec.ts | 3 +-- .../event-stream-request/bearer-authentication.spec.ts | 3 +-- .../tests/event-stream-request/cancel-open-stream.spec.ts | 3 +-- .../event-stream-request/cookie-sent-with-request.spec.ts | 3 +-- .../tests/event-stream-request/duplicate-request.spec.ts | 3 +-- .../tests/event-stream-request/happy-path.spec.ts | 3 +-- .../oauth2-client-credentials-authentication.spec.ts | 3 +-- .../tests/event-stream-request/proxy-settings.spec.ts | 3 +-- .../event-stream-request/template-tag-in-header.spec.ts | 3 +-- .../tests/event-stream-request/tls-connection.spec.ts | 3 +-- .../unresolved-environment-variable.spec.ts | 3 +-- .../tests/git-sync/checkout-remote-branch.spec.ts | 3 +-- .../tests/git-sync/commit-and-check-history.spec.ts | 3 +-- .../commit-needs-staged-changes-and-message.spec.ts | 3 +-- .../tests/git-sync/create-branch-and-switch.spec.ts | 3 +-- .../tests/git-sync/create-branch-validation.spec.ts | 3 +-- packages/insomnia-test/tests/git-sync/delete-branch.spec.ts | 3 +-- .../tests/git-sync/disabled-via-feature-flag.spec.ts | 3 +-- .../tests/git-sync/disabled-via-storage-rule.spec.ts | 3 +-- .../tests/git-sync/discard-unstaged-changes.spec.ts | 3 +-- packages/insomnia-test/tests/git-sync/merge-branch.spec.ts | 3 +-- .../tests/git-sync/merge-conflict-resolution.spec.ts | 3 +-- .../tests/git-sync/open-local-folder-collision.spec.ts | 3 +-- .../insomnia-test/tests/git-sync/open-local-folder.spec.ts | 3 +-- .../tests/git-sync/pull-conflict-resolution.spec.ts | 3 +-- .../tests/git-sync/pull-remote-changes.spec.ts | 3 +-- .../insomnia-test/tests/git-sync/push-to-remote.spec.ts | 3 +-- .../tests/git-sync/relocate-repository-collision.spec.ts | 3 +-- .../tests/git-sync/relocate-repository.spec.ts | 3 +-- .../sidebar-drag-drop-into-empty-collection.spec.ts | 3 +-- .../git-sync/stage-and-unstage-individual-changes.spec.ts | 3 +-- .../tests/graphql-request/api-key-authentication.spec.ts | 3 +-- .../tests/graphql-request/basic-authentication.spec.ts | 3 +-- .../tests/graphql-request/bearer-authentication.spec.ts | 3 +-- .../tests/graphql-request/cancel-in-flight-request.spec.ts | 3 +-- .../tests/graphql-request/cookie-sent-with-request.spec.ts | 3 +-- .../tests/graphql-request/duplicate-request.spec.ts | 3 +-- .../tests/graphql-request/generate-code.spec.ts | 3 +-- .../insomnia-test/tests/graphql-request/happy-path.spec.ts | 3 +-- .../graphql-request/numeric-environment-variable.spec.ts | 3 +-- .../oauth2-client-credentials-authentication.spec.ts | 3 +-- .../tests/graphql-request/object-variables.spec.ts | 3 +-- .../tests/graphql-request/pre-request-script-header.spec.ts | 3 +-- .../tests/graphql-request/proxy-settings.spec.ts | 3 +-- .../tests/graphql-request/schema-documentation.spec.ts | 3 +-- .../tests/graphql-request/template-tag-in-header.spec.ts | 3 +-- .../tests/graphql-request/tls-connection.spec.ts | 3 +-- .../graphql-request/unlinked-environment-variable.spec.ts | 3 +-- .../body-environment-variable-interpolation.spec.ts | 3 +-- .../cancel-in-flight-server-streaming-call.spec.ts | 3 +-- .../grpc-request/cancel-open-client-streaming-call.spec.ts | 3 +-- .../tests/grpc-request/commit-empty-stream.spec.ts | 3 +-- .../tests/grpc-request/custom-metadata-headers.spec.ts | 3 +-- .../duplicate-grpc-request-with-streaming-method.spec.ts | 3 +-- .../insomnia-test/tests/grpc-request/happy-path.spec.ts | 3 +-- .../tests/grpc-request/mtls-client-certificate.spec.ts | 3 +-- .../insomnia-test/tests/grpc-request/proxy-settings.spec.ts | 3 +-- .../reflection-fails-on-unreachable-server.spec.ts | 3 +-- .../tests/grpc-request/resend-after-completion.spec.ts | 3 +-- .../server-returns-business-error-status.spec.ts | 3 +-- .../grpc-request/switch-method-resets-response.spec.ts | 3 +-- .../tests/grpc-request/template-tag-in-body.spec.ts | 3 +-- .../insomnia-test/tests/grpc-request/tls-connection.spec.ts | 3 +-- .../http-request/after-response-script-test-results.spec.ts | 3 +-- .../insomnia-test/tests/http-request/body-types.spec.ts | 3 +-- .../tests/http-request/cancel-in-flight-request.spec.ts | 3 +-- .../tests/http-request/chained-response-tag.spec.ts | 3 +-- .../tests/http-request/custom-ca-root-certificate.spec.ts | 3 +-- .../http-request/folder-level-replace-in-utility.spec.ts | 3 +-- .../http-request/generate-code-target-client-switch.spec.ts | 3 +-- .../insomnia-test/tests/http-request/generate-code.spec.ts | 3 +-- .../tests/http-request/import-params-from-url-http.spec.ts | 3 +-- .../tests/http-request/ipv6-local-address.spec.ts | 3 +-- .../tests/http-request/key-value-editor-blank-row.spec.ts | 3 +-- .../tests/http-request/liquid-template-isolation.spec.ts | 3 +-- .../tests/http-request/mtls-client-certificate.spec.ts | 3 +-- .../tests/http-request/oauth1-authentication.spec.ts | 3 +-- .../http-request/oauth2-authorization-code-pkce.spec.ts | 3 +-- .../tests/http-request/oauth2-authorization-code.spec.ts | 3 +-- .../tests/http-request/oauth2-client-credentials.spec.ts | 3 +-- .../tests/http-request/oauth2-folder-inherited-auth.spec.ts | 3 +-- .../tests/http-request/oauth2-implicit.spec.ts | 3 +-- .../tests/http-request/oauth2-password.spec.ts | 3 +-- .../tests/http-request/oauth2-token-refresh-clear.spec.ts | 3 +-- .../pre-request-script-async-completion.spec.ts | 3 +-- .../pre-request-script-client-certificate-update.spec.ts | 3 +-- .../tests/http-request/pre-request-script-cookies.spec.ts | 3 +-- .../http-request/pre-request-script-custom-error.spec.ts | 3 +-- .../pre-request-script-environment-variables.spec.ts | 3 +-- .../pre-request-script-eval-and-modules.spec.ts | 3 +-- .../http-request/pre-request-script-proxy-update.spec.ts | 3 +-- .../pre-request-script-request-manipulation.spec.ts | 3 +-- .../pre-request-script-send-request-body-modes.spec.ts | 3 +-- .../insomnia-test/tests/http-request/query-method.spec.ts | 3 +-- .../http-request/query-params-transformed-correctly.spec.ts | 3 +-- .../http-request/replace-in-synchronous-behavior.spec.ts | 3 +-- .../tests/http-request/response-downloads.spec.ts | 3 +-- .../insomnia-test/tests/konnect/configure-and-sync.spec.ts | 3 +-- .../tests/konnect/hidden-via-feature-flag.spec.ts | 3 +-- .../tests/mcp-client/api-key-authentication.spec.ts | 3 +-- .../tests/mcp-client/basic-authentication.spec.ts | 3 +-- .../tests/mcp-client/bearer-authentication.spec.ts | 3 +-- .../tests/mcp-client/disconnect-and-reconnect.spec.ts | 3 +-- .../tests/mcp-client/environment-variable-in-url.spec.ts | 3 +-- packages/insomnia-test/tests/mcp-client/happy-path.spec.ts | 3 +-- .../oauth2-client-credentials-authentication.spec.ts | 3 +-- .../insomnia-test/tests/mcp-client/proxy-settings.spec.ts | 3 +-- .../insomnia-test/tests/mcp-client/tls-connection.spec.ts | 3 +-- .../tests/mcp-client/unreachable-server.spec.ts | 3 +-- .../tests/migration/git-repo-onboarding.spec.ts | 3 +-- .../legacy-db-migration/legacy-db-migration.spec.ts | 3 +-- .../legacy-unit-tests-default-on.spec.ts | 3 +-- packages/insomnia-test/tests/mock-server/auto-push.spec.ts | 3 +-- .../tests/mock-server/create-mock-server.spec.ts | 3 +-- .../tests/mock-server/create-route-from-response.spec.ts | 3 +-- .../tests/mock-server/duplicate-mock-server.spec.ts | 3 +-- .../tests/mock-server/export-import-mock-server.spec.ts | 3 +-- .../tests/mock-server/overwrite-route-from-response.spec.ts | 3 +-- .../insomnia-test/tests/mock-server/request-log.spec.ts | 3 +-- .../tests/mock-server/response-definition.spec.ts | 3 +-- packages/insomnia-test/tests/mock-server/route-crud.spec.ts | 3 +-- .../insomnia-test/tests/mock-server/test-endpoint.spec.ts | 3 +-- .../tests/organization/invite-collaborators.spec.ts | 3 +-- packages/insomnia-test/tests/plugin/bundled-plugins.spec.ts | 3 +-- .../collection-context-menu-action.spec.ts | 3 +-- .../request-context-menu-action.spec.ts | 3 +-- packages/insomnia-test/tests/plugin/plugin-bridge.spec.ts | 3 +-- .../tests/plugin/plugin-name-validation.spec.ts | 3 +-- .../tests/plugin/script-sandbox-rule-toggles.spec.ts | 3 +-- .../plugin/template-tag-sandbox-execution-context.spec.ts | 3 +-- .../tests/preferences/ai-backend-settings.spec.ts | 3 +-- .../preferences/filter-responses-by-environment.spec.ts | 3 +-- .../insomnia-test/tests/preferences/proxy-settings.spec.ts | 3 +-- .../tests/preferences/vault-key-generation.spec.ts | 3 +-- .../preferences/vault-key-reset-and-invalid-key.spec.ts | 3 +-- .../insomnia-test/tests/runner/bail-stops-on-error.spec.ts | 3 +-- .../insomnia-test/tests/runner/cancel-and-skip-run.spec.ts | 3 +-- .../tests/runner/config-persists-after-reopen.spec.ts | 3 +-- .../tests/runner/cross-request-variable-read.spec.ts | 3 +-- .../tests/runner/delay-between-requests.spec.ts | 3 +-- packages/insomnia-test/tests/runner/happy-path.spec.ts | 3 +-- .../tests/runner/set-next-request-skips-forward.spec.ts | 3 +-- .../upload-data-csv-edge-cases.spec.ts | 3 +-- .../upload-data-driven-iteration.spec.ts | 3 +-- .../disconnect-before-server-reply.spec.ts | 3 +-- .../tests/socket-io-request/duplicate-request.spec.ts | 3 +-- .../tests/socket-io-request/happy-path.spec.ts | 3 +-- .../tests/socket-io-request/proxy-settings.spec.ts | 3 +-- .../tests/socket-io-request/template-tag-in-message.spec.ts | 3 +-- .../tests/socket-io-request/tls-connection.spec.ts | 3 +-- .../tests/socket-io-request/token-authentication.spec.ts | 3 +-- .../tests/socket-io-request/unreachable-server.spec.ts | 3 +-- .../template-tag/cookie-tag-reads-linked-cookie.spec.ts | 3 +-- .../tests/template-tag/edit-existing-tag-argument.spec.ts | 3 +-- .../tests/template-tag/external-vault-credentials.spec.ts | 5 ++--- .../file-tag-reads-allowed-file.spec.ts | 3 +-- .../insomnia-test/tests/template-tag/happy-path.spec.ts | 3 +-- .../template-tag/header-name-template-tag-resolves.spec.ts | 3 +-- .../tests/template-tag/header-templates.spec.ts | 3 +-- .../prompt-tag-caches-value-until-cleared.spec.ts | 3 +-- .../template-tag/response-tag-trigger-behaviors.spec.ts | 3 +-- .../tests/web-socket-request/api-key-authentication.spec.ts | 3 +-- .../tests/web-socket-request/basic-authentication.spec.ts | 3 +-- .../tests/web-socket-request/bearer-authentication.spec.ts | 3 +-- .../web-socket-request/cookie-sent-with-connection.spec.ts | 3 +-- .../disconnect-before-server-reply.spec.ts | 3 +-- .../web-socket-request/environment-variable-in-url.spec.ts | 3 +-- .../tests/web-socket-request/happy-path.spec.ts | 3 +-- .../import-params-from-url-websocket.spec.ts | 3 +-- .../tests/web-socket-request/proxy-settings.spec.ts | 3 +-- .../web-socket-request/send-multiple-message-types.spec.ts | 3 +-- .../template-tag-in-header-and-message.spec.ts | 3 +-- .../tests/web-socket-request/tls-connection.spec.ts | 3 +-- .../unresolved-environment-variable.spec.ts | 3 +-- .../insomnia-test/tests/workspace/auto-focus-rules.spec.ts | 3 +-- .../insomnia-test/tests/workspace/command-palette.spec.ts | 3 +-- .../tests/workspace/create-delete-while-offline.spec.ts | 3 +-- .../workspace/cross-project-drag-drop-cloud-git.spec.ts | 3 +-- .../workspace/cross-project-drag-drop-cloud-local.spec.ts | 3 +-- .../workspace/cross-project-drag-drop-local-git.spec.ts | 3 +-- .../tests/workspace/editor-undo-survives-tab-toggle.spec.ts | 3 +-- .../tests/workspace/folder-keyboard-navigation.spec.ts | 3 +-- packages/insomnia-test/tests/workspace/happy-path.spec.ts | 3 +-- .../tests/workspace/no-document-creation-entry.spec.ts | 3 +-- .../tests/workspace/rename-and-delete-project.spec.ts | 3 +-- .../tests/workspace/request-pane-tab-order.spec.ts | 3 +-- .../tests/workspace/sidebar-drag-drop-beside-folder.spec.ts | 3 +-- .../sidebar-drag-drop-empty-folder-placeholder.spec.ts | 3 +-- .../tests/workspace/sidebar-drag-drop-into-folder.spec.ts | 3 +-- .../workspace/sidebar-drag-drop-invalid-target.spec.ts | 3 +-- .../workspace/sidebar-drag-drop-nested-boundary.spec.ts | 3 +-- .../sidebar-drag-drop-persists-across-views.spec.ts | 3 +-- .../tests/workspace/sidebar-filter-and-pin.spec.ts | 3 +-- .../tests/workspace/sidebar-focus-mode-onboarding.spec.ts | 3 +-- .../workspace/sidebar-settings-and-inline-rename.spec.ts | 3 +-- .../tests/workspace/sidebar-tree-hierarchy.spec.ts | 3 +-- .../tests/workspace/tabs-name-and-method-sync.spec.ts | 3 +-- .../tests/workspace/tabs-open-pin-switch-close.spec.ts | 3 +-- .../tests/workspace/url-bar-editor-characterization.spec.ts | 3 +-- .../workspace/url-bar-undo-survives-tab-switch.spec.ts | 3 +-- 284 files changed, 290 insertions(+), 568 deletions(-) diff --git a/packages/insomnia-test/misc/fixtures.ts b/packages/insomnia-test/misc/fixtures.ts index 65701f9429..2e8a39bec1 100644 --- a/packages/insomnia-test/misc/fixtures.ts +++ b/packages/insomnia-test/misc/fixtures.ts @@ -3,14 +3,14 @@ import * as fs from "node:fs"; import * as os from "node:os"; import path from "node:path"; +import { FlowManager } from "@package/flows/flow-manager"; +import { SessionContext } from "@package/flows/session-context"; +import { PageManager } from "@package/pages/page-manager"; import type { ElectronApplication, Page} from "@playwright/test"; import { test as base } from "@playwright/test"; -import { FlowManager } from "@package/flows/flow-manager"; -import { SessionContext } from "@package/flows/session-context"; -import { PageManager } from "@package/pages/page-manager"; import { ACTION_TIMEOUT, DEFAULT_TIMEOUT, MOCK_API_SERVER } from "./constants"; import { collectHiddenWindowCoverage, diff --git a/packages/insomnia-test/misc/git-fixtures.ts b/packages/insomnia-test/misc/git-fixtures.ts index 9ef8770753..db618c26b7 100644 --- a/packages/insomnia-test/misc/git-fixtures.ts +++ b/packages/insomnia-test/misc/git-fixtures.ts @@ -1,6 +1,7 @@ import * as crypto from "node:crypto"; import type { GitCredential } from "@package/models/git-credential"; + import { GIT_SERVER as GIT_SERVER_URL,test as base } from "./fixtures"; // The most recently created repo (set by the `gitRepo` fixture), used as diff --git a/packages/insomnia-test/misc/upgrade-fixture.ts b/packages/insomnia-test/misc/upgrade-fixture.ts index 920ed5c72f..5043ab0d6e 100644 --- a/packages/insomnia-test/misc/upgrade-fixture.ts +++ b/packages/insomnia-test/misc/upgrade-fixture.ts @@ -3,9 +3,8 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; -import type { TestInfo } from '@playwright/test'; - import { UpgradePhase } from '@package/enums/upgrade-phase'; +import type { TestInfo } from '@playwright/test'; const TEST_PACKAGE = path.resolve(import.meta.dirname, '..'); const REPO_ROOT = path.resolve(TEST_PACKAGE, '..', '..'); diff --git a/packages/insomnia-test/tests/app/cancel-pre-request-script.spec.ts b/packages/insomnia-test/tests/app/cancel-pre-request-script.spec.ts index ad4447485f..61d41070ae 100644 --- a/packages/insomnia-test/tests/app/cancel-pre-request-script.spec.ts +++ b/packages/insomnia-test/tests/app/cancel-pre-request-script.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { RequestState } from "@package/enums/request-state"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const LONG_DELAY_PRE_REQUEST_SCRIPT = ` function delay(ms) { diff --git a/packages/insomnia-test/tests/app/database-backup-on-launch.spec.ts b/packages/insomnia-test/tests/app/database-backup-on-launch.spec.ts index 1d50be5744..c28e886c21 100644 --- a/packages/insomnia-test/tests/app/database-backup-on-launch.spec.ts +++ b/packages/insomnia-test/tests/app/database-backup-on-launch.spec.ts @@ -1,9 +1,8 @@ import * as fs from "node:fs"; import path from "node:path"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify Main Process Backs Up NeDB Files On Launch", async ({ user, diff --git a/packages/insomnia-test/tests/app/hidden-window-closed-recovers.spec.ts b/packages/insomnia-test/tests/app/hidden-window-closed-recovers.spec.ts index 5ee5e76ea6..f7f9fe8f58 100644 --- a/packages/insomnia-test/tests/app/hidden-window-closed-recovers.spec.ts +++ b/packages/insomnia-test/tests/app/hidden-window-closed-recovers.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const LONG_DELAY_AFTER_RESPONSE_SCRIPT = ` function delay(ms) { diff --git a/packages/insomnia-test/tests/app/hidden-window-hangs-recovers.spec.ts b/packages/insomnia-test/tests/app/hidden-window-hangs-recovers.spec.ts index 48835e9479..80571cb217 100644 --- a/packages/insomnia-test/tests/app/hidden-window-hangs-recovers.spec.ts +++ b/packages/insomnia-test/tests/app/hidden-window-hangs-recovers.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the hidden script window automatically restarts after an infinite-loop script hangs it, and a later request still succeeds", async ({ user, diff --git a/packages/insomnia-test/tests/app/scratch-pad-mode.spec.ts b/packages/insomnia-test/tests/app/scratch-pad-mode.spec.ts index 5443ca23f8..9b587a5135 100644 --- a/packages/insomnia-test/tests/app/scratch-pad-mode.spec.ts +++ b/packages/insomnia-test/tests/app/scratch-pad-mode.spec.ts @@ -1,6 +1,5 @@ -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify logging out shows the Scratch Pad and other login entry points, and choosing Scratch Pad opens its workspace with no Document creation entry", async ({ user, diff --git a/packages/insomnia-test/tests/app/stdout-epipe.spec.ts b/packages/insomnia-test/tests/app/stdout-epipe.spec.ts index eec6faa785..b86b25f032 100644 --- a/packages/insomnia-test/tests/app/stdout-epipe.spec.ts +++ b/packages/insomnia-test/tests/app/stdout-epipe.spec.ts @@ -1,6 +1,5 @@ -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify Main Process Survives An Async EPIPE Error On stdout", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/branch-history-isolation-across-workspaces.spec.ts b/packages/insomnia-test/tests/cloud-sync/branch-history-isolation-across-workspaces.spec.ts index f9ca703418..3d6c1f9af5 100644 --- a/packages/insomnia-test/tests/cloud-sync/branch-history-isolation-across-workspaces.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/branch-history-isolation-across-workspaces.spec.ts @@ -1,7 +1,6 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify branch, commit, merge, and restore actions on one Cloud-synced workspace do not affect another workspace's branches or content", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/branches.spec.ts b/packages/insomnia-test/tests/cloud-sync/branches.spec.ts index f0723e7f84..e5090454fb 100644 --- a/packages/insomnia-test/tests/cloud-sync/branches.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/branches.spec.ts @@ -1,7 +1,6 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { DEFAULT_TIMEOUT, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify fetching a remote branch, checking out, deleting a local branch, and creating a new branch on a Cloud-synced workspace", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/concurrent-workspace-creation-race.spec.ts b/packages/insomnia-test/tests/cloud-sync/concurrent-workspace-creation-race.spec.ts index c933247ee4..764a3e3643 100644 --- a/packages/insomnia-test/tests/cloud-sync/concurrent-workspace-creation-race.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/concurrent-workspace-creation-race.spec.ts @@ -2,10 +2,10 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { MOCK_API_SERVER, resetCloudSyncState, SESSION_ID, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; +import { expect } from "@playwright/test"; + import { getCloudSyncGraphQLRequestLog, setCloudSyncGraphQLDelay } from "./support/cloud-sync-mock"; // Every Cloud Sync workspace used to share one VCS singleton, so creating a sibling diff --git a/packages/insomnia-test/tests/cloud-sync/delete-unsynced-remote-file.spec.ts b/packages/insomnia-test/tests/cloud-sync/delete-unsynced-remote-file.spec.ts index f6ca3f0595..c5a580c9ce 100644 --- a/packages/insomnia-test/tests/cloud-sync/delete-unsynced-remote-file.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/delete-unsynced-remote-file.spec.ts @@ -2,11 +2,11 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { HTTP_SERVER, resetCloudSyncState, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; +import { expect } from "@playwright/test"; + import { getCloudSyncProjectInfo, setCloudSyncArchiveFailure } from "./support/cloud-sync-mock"; test.afterAll(async () => { diff --git a/packages/insomnia-test/tests/cloud-sync/delete-workspace-log-signature.spec.ts b/packages/insomnia-test/tests/cloud-sync/delete-workspace-log-signature.spec.ts index c1d64350c3..0127e85816 100644 --- a/packages/insomnia-test/tests/cloud-sync/delete-workspace-log-signature.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/delete-workspace-log-signature.spec.ts @@ -1,10 +1,9 @@ import * as fs from "node:fs"; import path from "node:path"; -import { expect } from "@playwright/test"; - import { DeleteMode } from "@package/enums/delete-mode"; import { resetCloudSyncState, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test.afterAll(async () => { await resetCloudSyncState(); diff --git a/packages/insomnia-test/tests/cloud-sync/delete-workspace.spec.ts b/packages/insomnia-test/tests/cloud-sync/delete-workspace.spec.ts index 45691fdbc1..0ed1f9aece 100644 --- a/packages/insomnia-test/tests/cloud-sync/delete-workspace.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/delete-workspace.spec.ts @@ -1,8 +1,7 @@ -import { expect } from "@playwright/test"; - import { DeleteMode } from "@package/enums/delete-mode"; import { SyncStatus } from "@package/enums/sync-status"; import { DEFAULT_TIMEOUT, resetCloudSyncState, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test.afterAll(async () => { await resetCloudSyncState(); diff --git a/packages/insomnia-test/tests/cloud-sync/discard-changes-isolation-across-workspaces.spec.ts b/packages/insomnia-test/tests/cloud-sync/discard-changes-isolation-across-workspaces.spec.ts index c1338a8826..859a0e1078 100644 --- a/packages/insomnia-test/tests/cloud-sync/discard-changes-isolation-across-workspaces.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/discard-changes-isolation-across-workspaces.spec.ts @@ -1,7 +1,6 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify discarding changes on one Cloud-synced workspace does not affect another workspace's uncommitted edits", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/discard-commit-push-and-restore.spec.ts b/packages/insomnia-test/tests/cloud-sync/discard-commit-push-and-restore.spec.ts index f9d3bca8f4..825ae57e80 100644 --- a/packages/insomnia-test/tests/cloud-sync/discard-commit-push-and-restore.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/discard-commit-push-and-restore.spec.ts @@ -1,8 +1,7 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { DEFAULT_TIMEOUT, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify discarding changes, committing and pushing, and restoring an earlier snapshot on a Cloud-synced workspace", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/invalid-branch-names.spec.ts b/packages/insomnia-test/tests/cloud-sync/invalid-branch-names.spec.ts index cbfbf07177..c983c75de7 100644 --- a/packages/insomnia-test/tests/cloud-sync/invalid-branch-names.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/invalid-branch-names.spec.ts @@ -1,7 +1,6 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; const CHARSET_ERROR = "Branch names must be at least 3 characters long and can only contain English letters, numbers, period (.), hyphen (-), underscore (_) and forward slash (/)"; diff --git a/packages/insomnia-test/tests/cloud-sync/merge-conflict-resolution.spec.ts b/packages/insomnia-test/tests/cloud-sync/merge-conflict-resolution.spec.ts index cd4e10f798..fb2b90c265 100644 --- a/packages/insomnia-test/tests/cloud-sync/merge-conflict-resolution.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/merge-conflict-resolution.spec.ts @@ -1,8 +1,7 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { DEFAULT_TIMEOUT, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; for (const { version, chosenIndex } of [ { version: "Current", chosenIndex: 0 }, diff --git a/packages/insomnia-test/tests/cloud-sync/new-collection-own-backend-project.spec.ts b/packages/insomnia-test/tests/cloud-sync/new-collection-own-backend-project.spec.ts index 4829e5f24a..ea1afe8205 100644 --- a/packages/insomnia-test/tests/cloud-sync/new-collection-own-backend-project.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/new-collection-own-backend-project.spec.ts @@ -2,12 +2,11 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { SyncStatus } from "@package/enums/sync-status"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; +import { expect } from "@playwright/test"; test("Verify a new collection commits and pushes under its own backend project", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/new-collection-survives-restart.spec.ts b/packages/insomnia-test/tests/cloud-sync/new-collection-survives-restart.spec.ts index 9db349c641..80feafdd9e 100644 --- a/packages/insomnia-test/tests/cloud-sync/new-collection-survives-restart.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/new-collection-survives-restart.spec.ts @@ -2,12 +2,11 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { SyncStatus } from "@package/enums/sync-status"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; +import { expect } from "@playwright/test"; test("Verify a new collection is not left in an unsynced state after an app restart", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/pull-remote-changes.spec.ts b/packages/insomnia-test/tests/cloud-sync/pull-remote-changes.spec.ts index 5295a87ae2..58dc7d1390 100644 --- a/packages/insomnia-test/tests/cloud-sync/pull-remote-changes.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/pull-remote-changes.spec.ts @@ -1,6 +1,5 @@ -import { expect } from "@playwright/test"; - import { MOCK_API_SERVER, SESSION_ID, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify a new remote commit becomes pullable on a Cloud-synced workspace after a main-window focus change", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/restore-snapshot-removes-added-request.spec.ts b/packages/insomnia-test/tests/cloud-sync/restore-snapshot-removes-added-request.spec.ts index 53b0b3d1c0..42697bc244 100644 --- a/packages/insomnia-test/tests/cloud-sync/restore-snapshot-removes-added-request.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/restore-snapshot-removes-added-request.spec.ts @@ -1,9 +1,8 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import type { Collection } from "@package/models/collection"; +import { expect } from "@playwright/test"; test("Verify restoring an earlier snapshot removes a request added and committed after it on a Cloud-synced workspace", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/sidebar-drag-drop-into-empty-collection.spec.ts b/packages/insomnia-test/tests/cloud-sync/sidebar-drag-drop-into-empty-collection.spec.ts index 9833e7934d..bc017f7ea8 100644 --- a/packages/insomnia-test/tests/cloud-sync/sidebar-drag-drop-into-empty-collection.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/sidebar-drag-drop-into-empty-collection.spec.ts @@ -1,9 +1,8 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { TreeNodeType } from "@package/enums/tree-node-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; +import { expect } from "@playwright/test"; test("Verify dragging a request out of a Cloud Sync collection into an empty Cloud Sync collection", async ({ user, diff --git a/packages/insomnia-test/tests/cloud-sync/unrelated-action-during-collection-creation.spec.ts b/packages/insomnia-test/tests/cloud-sync/unrelated-action-during-collection-creation.spec.ts index a4a1072e27..a11bbc9d17 100644 --- a/packages/insomnia-test/tests/cloud-sync/unrelated-action-during-collection-creation.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/unrelated-action-during-collection-creation.spec.ts @@ -2,11 +2,11 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { MOCK_API_SERVER, resetCloudSyncState, SESSION_ID, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { Environment } from "@package/models/environment"; +import { expect } from "@playwright/test"; + import { getCloudSyncGraphQLRequestLog, setCloudSyncGraphQLDelay } from "./support/cloud-sync-mock"; test.afterAll(async () => { diff --git a/packages/insomnia-test/tests/cloud-sync/unsynced-file-delete-button-visibility.spec.ts b/packages/insomnia-test/tests/cloud-sync/unsynced-file-delete-button-visibility.spec.ts index 73325ed43c..4aa720bff7 100644 --- a/packages/insomnia-test/tests/cloud-sync/unsynced-file-delete-button-visibility.spec.ts +++ b/packages/insomnia-test/tests/cloud-sync/unsynced-file-delete-button-visibility.spec.ts @@ -1,9 +1,8 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { DialogDismissMethod } from "@package/pages/cloud-sync-file-delete.page"; +import { expect } from "@playwright/test"; test("Verify the dashboard's unsynced-file delete button only appears on unsynced cards, is revealed on hover and keyboard focus, and cancelling its dialog leaves the file intact", async ({ user, diff --git a/packages/insomnia-test/tests/cookie/cookie-path-mismatch-not-sent.spec.ts b/packages/insomnia-test/tests/cookie/cookie-path-mismatch-not-sent.spec.ts index 8441b72adf..55a5d3aa7c 100644 --- a/packages/insomnia-test/tests/cookie/cookie-path-mismatch-not-sent.spec.ts +++ b/packages/insomnia-test/tests/cookie/cookie-path-mismatch-not-sent.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/cookies`; diff --git a/packages/insomnia-test/tests/cookie/cookie-same-key-overwrite.spec.ts b/packages/insomnia-test/tests/cookie/cookie-same-key-overwrite.spec.ts index d02e59e858..6156315830 100644 --- a/packages/insomnia-test/tests/cookie/cookie-same-key-overwrite.spec.ts +++ b/packages/insomnia-test/tests/cookie/cookie-same-key-overwrite.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/cookies`; diff --git a/packages/insomnia-test/tests/cookie/expired-cookie-not-sent.spec.ts b/packages/insomnia-test/tests/cookie/expired-cookie-not-sent.spec.ts index fd4823d7e7..a34e4ff5fe 100644 --- a/packages/insomnia-test/tests/cookie/expired-cookie-not-sent.spec.ts +++ b/packages/insomnia-test/tests/cookie/expired-cookie-not-sent.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/cookies`; diff --git a/packages/insomnia-test/tests/cookie/happy-path.spec.ts b/packages/insomnia-test/tests/cookie/happy-path.spec.ts index 5009ed286a..aec4ffc583 100644 --- a/packages/insomnia-test/tests/cookie/happy-path.spec.ts +++ b/packages/insomnia-test/tests/cookie/happy-path.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/cookies`; diff --git a/packages/insomnia-test/tests/cookie/host-prefix-cookie-requires-host-only.spec.ts b/packages/insomnia-test/tests/cookie/host-prefix-cookie-requires-host-only.spec.ts index a26b97d2fd..fda37d67fd 100644 --- a/packages/insomnia-test/tests/cookie/host-prefix-cookie-requires-host-only.spec.ts +++ b/packages/insomnia-test/tests/cookie/host-prefix-cookie-requires-host-only.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/cookies`; diff --git a/packages/insomnia-test/tests/cookie/http-only-cookie-always-sent.spec.ts b/packages/insomnia-test/tests/cookie/http-only-cookie-always-sent.spec.ts index 9016579eb2..14a30c5488 100644 --- a/packages/insomnia-test/tests/cookie/http-only-cookie-always-sent.spec.ts +++ b/packages/insomnia-test/tests/cookie/http-only-cookie-always-sent.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, HTTP_SERVER_HTTPS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify HttpOnly Cookie Flag Persists And Cookie Is Always Sent Over HTTP And HTTPS", async ({ user, diff --git a/packages/insomnia-test/tests/cookie/raw-cookie-string-editor.spec.ts b/packages/insomnia-test/tests/cookie/raw-cookie-string-editor.spec.ts index 9df469cd10..2d99b95f0f 100644 --- a/packages/insomnia-test/tests/cookie/raw-cookie-string-editor.spec.ts +++ b/packages/insomnia-test/tests/cookie/raw-cookie-string-editor.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/cookies`; diff --git a/packages/insomnia-test/tests/cookie/secure-cookie-not-sent-over-http.spec.ts b/packages/insomnia-test/tests/cookie/secure-cookie-not-sent-over-http.spec.ts index 39ab26563e..7558ac520b 100644 --- a/packages/insomnia-test/tests/cookie/secure-cookie-not-sent-over-http.spec.ts +++ b/packages/insomnia-test/tests/cookie/secure-cookie-not-sent-over-http.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, HTTP_SERVER_HTTPS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Secure Cookie Is Sent Over HTTPS But Not Over Plain HTTP", async ({ user, diff --git a/packages/insomnia-test/tests/data/export/export-openapi-spec.spec.ts b/packages/insomnia-test/tests/data/export/export-openapi-spec.spec.ts index fa60415159..ad5de5a6cd 100644 --- a/packages/insomnia-test/tests/data/export/export-openapi-spec.spec.ts +++ b/packages/insomnia-test/tests/data/export/export-openapi-spec.spec.ts @@ -2,14 +2,13 @@ import * as os from 'node:os'; import path from 'node:path'; import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ApiSpecExportFormat } from '@package/enums/api-spec-export-format'; import { ProjectType } from '@package/enums/project-types'; import { waitForExportedFile } from '@package/misc/export-file'; import { test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const petStoreSpec = (title: string) => `openapi: 3.0.4 diff --git a/packages/insomnia-test/tests/data/export/happy-path.spec.ts b/packages/insomnia-test/tests/data/export/happy-path.spec.ts index a1a5cc0da8..99ecd9315c 100644 --- a/packages/insomnia-test/tests/data/export/happy-path.spec.ts +++ b/packages/insomnia-test/tests/data/export/happy-path.spec.ts @@ -3,8 +3,6 @@ import * as os from "node:os"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ExportFormat } from "@package/enums/export-format"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -13,6 +11,7 @@ import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify exporting a Collection via its context menu (HAR and Insomnia v5) and a Project via Preferences -> Data each write the expected files", async ({ user, diff --git a/packages/insomnia-test/tests/data/import/clipboard/import-by-wsdl/import-by-wsdl.spec.ts b/packages/insomnia-test/tests/data/import/clipboard/import-by-wsdl/import-by-wsdl.spec.ts index bf24bffbf2..7eaa267ac8 100644 --- a/packages/insomnia-test/tests/data/import/clipboard/import-by-wsdl/import-by-wsdl.spec.ts +++ b/packages/insomnia-test/tests/data/import/clipboard/import-by-wsdl/import-by-wsdl.spec.ts @@ -2,12 +2,11 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const wsdl = fs.readFileSync(path.join(import.meta.dirname, "calculator.wsdl"), "utf8"); const soapBody = fs.readFileSync(path.join(import.meta.dirname, "soap-body.xml"), "utf8"); diff --git a/packages/insomnia-test/tests/data/import/curl/import-by-curl.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-by-curl.spec.ts index 9bdaf608d6..ec09361e38 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-by-curl.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-by-curl.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -9,6 +7,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/posts`; const body = `{"title": "title", "body": "body", "userId": 1}`; diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-basic-auth.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-basic-auth.spec.ts index 4a7d2da44c..d05e9bac55 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-basic-auth.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-basic-auth.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const username = faker.string.alphanumeric(8); diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-cookie.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-cookie.spec.ts index d80aa905a6..174b3e7656 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-cookie.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-cookie.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/cookies`; const cookieName = `cookie_${faker.string.alphanumeric(6)}`; diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-data-raw-and-binary.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-data-raw-and-binary.spec.ts index 3a5fa8ebb2..7727a89791 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-data-raw-and-binary.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-data-raw-and-binary.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -9,6 +7,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const rawUrl = `${HTTP_SERVER}/post`; const binaryUrl = `${HTTP_SERVER}/posts`; diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-escaped-multiline.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-escaped-multiline.spec.ts index b3b9391540..7a93328762 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-escaped-multiline.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-escaped-multiline.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -9,6 +7,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const headerName = "X-Custom"; diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-get-data-urlencode.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-get-data-urlencode.spec.ts index 6786ad5570..811275ddf9 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-get-data-urlencode.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-get-data-urlencode.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const paramName = faker.string.alpha(6); diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-insecure-and-compressed-flags.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-insecure-and-compressed-flags.spec.ts index 0e7048518b..4f5351458d 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-insecure-and-compressed-flags.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-insecure-and-compressed-flags.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER_HTTPS, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER_HTTPS}/post`; const dataKey = faker.string.alpha(4); diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-multipart-form.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-multipart-form.spec.ts index 8563e768d0..7715baf272 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-multipart-form.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-multipart-form.spec.ts @@ -3,8 +3,6 @@ import os from "node:os"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -13,6 +11,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const title = faker.string.alphanumeric(8); diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-repeated-headers-and-data.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-repeated-headers-and-data.spec.ts index f737b87596..0591474bb5 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-repeated-headers-and-data.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-repeated-headers-and-data.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const headerName = "X-Custom"; diff --git a/packages/insomnia-test/tests/data/import/curl/import-curl-user-agent.spec.ts b/packages/insomnia-test/tests/data/import/curl/import-curl-user-agent.spec.ts index c3a7803204..ab79c980c3 100644 --- a/packages/insomnia-test/tests/data/import/curl/import-curl-user-agent.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/import-curl-user-agent.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/data/import/curl/multiple-commands-semicolon-separated.spec.ts b/packages/insomnia-test/tests/data/import/curl/multiple-commands-semicolon-separated.spec.ts index 8806afd7d7..3df4ed02f6 100644 --- a/packages/insomnia-test/tests/data/import/curl/multiple-commands-semicolon-separated.spec.ts +++ b/packages/insomnia-test/tests/data/import/curl/multiple-commands-semicolon-separated.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const firstUrl = `${HTTP_SERVER}/${faker.string.alphanumeric(10)}`; const secondUrl = `${HTTP_SERVER}/${faker.string.alphanumeric(10)}`; diff --git a/packages/insomnia-test/tests/data/import/file/import-content-type-from-postman/import-content-type-from-postman.spec.ts b/packages/insomnia-test/tests/data/import/file/import-content-type-from-postman/import-content-type-from-postman.spec.ts index 52227cc1e5..e1d10bd682 100644 --- a/packages/insomnia-test/tests/data/import/file/import-content-type-from-postman/import-content-type-from-postman.spec.ts +++ b/packages/insomnia-test/tests/data/import/file/import-content-type-from-postman/import-content-type-from-postman.spec.ts @@ -1,13 +1,12 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Import Generates Content-Type Header From Postman File", async ({ user, diff --git a/packages/insomnia-test/tests/data/import/file/import-multiple-workspaces/import-multiple-workspaces.spec.ts b/packages/insomnia-test/tests/data/import/file/import-multiple-workspaces/import-multiple-workspaces.spec.ts index 402cb310f6..5a38be0508 100644 --- a/packages/insomnia-test/tests/data/import/file/import-multiple-workspaces/import-multiple-workspaces.spec.ts +++ b/packages/insomnia-test/tests/data/import/file/import-multiple-workspaces/import-multiple-workspaces.spec.ts @@ -1,11 +1,10 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Import Multiple Workspaces From Single File", async ({ user }) => { const { httpRequestFlow, importFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/data/import/file/import-open-api/import-open-api.spec.ts b/packages/insomnia-test/tests/data/import/file/import-open-api/import-open-api.spec.ts index 158c8a7804..d53c9c1fd8 100644 --- a/packages/insomnia-test/tests/data/import/file/import-open-api/import-open-api.spec.ts +++ b/packages/insomnia-test/tests/data/import/file/import-open-api/import-open-api.spec.ts @@ -1,11 +1,10 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Import OpenAPI Spec by File", async ({ user }) => { const { importFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/data/import/mcp/import-mcp-client.spec.ts b/packages/insomnia-test/tests/data/import/mcp/import-mcp-client.spec.ts index b8060957c3..dd706f5b34 100644 --- a/packages/insomnia-test/tests/data/import/mcp/import-mcp-client.spec.ts +++ b/packages/insomnia-test/tests/data/import/mcp/import-mcp-client.spec.ts @@ -1,9 +1,8 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, MCP_SERVER, test } from "@package/misc/fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const mcp = "Imported MCP Client"; const tool = "read_wiki_structure"; diff --git a/packages/insomnia-test/tests/data/import/url/import-swagger-api.spec.ts b/packages/insomnia-test/tests/data/import/url/import-swagger-api.spec.ts index 60e6c69588..e4e035d23b 100644 --- a/packages/insomnia-test/tests/data/import/url/import-swagger-api.spec.ts +++ b/packages/insomnia-test/tests/data/import/url/import-swagger-api.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Import OpenAPI Spec by Url", async ({ user }, testInfo) => { // This test's later cookie-persistence check (CookieFlow.link -> diff --git a/packages/insomnia-test/tests/document/custom-lint-ruleset/custom-lint-ruleset.spec.ts b/packages/insomnia-test/tests/document/custom-lint-ruleset/custom-lint-ruleset.spec.ts index e3847463f1..72bd929683 100644 --- a/packages/insomnia-test/tests/document/custom-lint-ruleset/custom-lint-ruleset.spec.ts +++ b/packages/insomnia-test/tests/document/custom-lint-ruleset/custom-lint-ruleset.spec.ts @@ -1,13 +1,12 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { RulesetType } from "@package/enums/ruleset-type"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const VALID_RULESET = path.join(import.meta.dirname, "custom.spectral.yaml"); const INVALID_RULESET = path.join(import.meta.dirname, "invalid.spectral.yaml"); diff --git a/packages/insomnia-test/tests/document/delete-test-suite.spec.ts b/packages/insomnia-test/tests/document/delete-test-suite.spec.ts index 9686fe2184..a70f16f83b 100644 --- a/packages/insomnia-test/tests/document/delete-test-suite.spec.ts +++ b/packages/insomnia-test/tests/document/delete-test-suite.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Deleting A Test Suite Via Its Confirm Modal", async ({ user }) => { const { workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/document/happy-path.spec.ts b/packages/insomnia-test/tests/document/happy-path.spec.ts index 1c20c2c9f9..97d9a81ded 100644 --- a/packages/insomnia-test/tests/document/happy-path.spec.ts +++ b/packages/insomnia-test/tests/document/happy-path.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, SOCKET_SERVER, test } from "@package/misc/fixtures"; @@ -13,6 +11,7 @@ import { import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; import type { SocketIORequest } from "@package/models/socket-io-request"; +import { expect } from "@playwright/test"; const socketIoUrl = SOCKET_SERVER; diff --git a/packages/insomnia-test/tests/document/legacy-unit-tests-default-off.spec.ts b/packages/insomnia-test/tests/document/legacy-unit-tests-default-off.spec.ts index 6f359213a3..94d291a466 100644 --- a/packages/insomnia-test/tests/document/legacy-unit-tests-default-off.spec.ts +++ b/packages/insomnia-test/tests/document/legacy-unit-tests-default-off.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the legacy unit test setting defaults off and hides the Tests tab for a profile with no existing test suites", async ({ user, diff --git a/packages/insomnia-test/tests/document/spec-editor-toolbar.spec.ts b/packages/insomnia-test/tests/document/spec-editor-toolbar.spec.ts index 7ac36d4121..28dff442c5 100644 --- a/packages/insomnia-test/tests/document/spec-editor-toolbar.spec.ts +++ b/packages/insomnia-test/tests/document/spec-editor-toolbar.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { SpecFormat } from "@package/enums/spec-format"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Spec Editor Toolbar's Generate Menu, Format Switch, And Preview Toggle", async ({ user, diff --git a/packages/insomnia-test/tests/document/spec-outline-navigation.spec.ts b/packages/insomnia-test/tests/document/spec-outline-navigation.spec.ts index e7f50203d2..f1f3bee379 100644 --- a/packages/insomnia-test/tests/document/spec-outline-navigation.spec.ts +++ b/packages/insomnia-test/tests/document/spec-outline-navigation.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const buildSpec = () => ({ title: faker.commerce.productName(), diff --git a/packages/insomnia-test/tests/document/spectral-lint-errors.spec.ts b/packages/insomnia-test/tests/document/spectral-lint-errors.spec.ts index 8ba8fa1ec5..8ca6a7e85d 100644 --- a/packages/insomnia-test/tests/document/spectral-lint-errors.spec.ts +++ b/packages/insomnia-test/tests/document/spectral-lint-errors.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { LintSeverity } from "@package/enums/lint-severity"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Spectral Lint Errors Surface With A Line Reference", async ({ user, diff --git a/packages/insomnia-test/tests/document/unit-test-suite/unit-test-suite.spec.ts b/packages/insomnia-test/tests/document/unit-test-suite/unit-test-suite.spec.ts index cf08debe90..d2fb725d92 100644 --- a/packages/insomnia-test/tests/document/unit-test-suite/unit-test-suite.spec.ts +++ b/packages/insomnia-test/tests/document/unit-test-suite/unit-test-suite.spec.ts @@ -2,11 +2,10 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const UNIT_TEST_FIXTURE = fs.readFileSync( path.join(import.meta.dirname, "unit-test.yaml"), diff --git a/packages/insomnia-test/tests/environment/case-sensitive-variable-names.spec.ts b/packages/insomnia-test/tests/environment/case-sensitive-variable-names.spec.ts index bde0f115c0..06d844a2a1 100644 --- a/packages/insomnia-test/tests/environment/case-sensitive-variable-names.spec.ts +++ b/packages/insomnia-test/tests/environment/case-sensitive-variable-names.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const lowerCaseVariable = "caseVar"; const upperCaseVariable = "CaseVar"; diff --git a/packages/insomnia-test/tests/environment/circular-variable-reference.spec.ts b/packages/insomnia-test/tests/environment/circular-variable-reference.spec.ts index 93e98561e2..1eec4ccbfd 100644 --- a/packages/insomnia-test/tests/environment/circular-variable-reference.spec.ts +++ b/packages/insomnia-test/tests/environment/circular-variable-reference.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const variableA = "a"; const variableB = "b"; diff --git a/packages/insomnia-test/tests/environment/create-and-duplicate-global-environment.spec.ts b/packages/insomnia-test/tests/environment/create-and-duplicate-global-environment.spec.ts index c41b6ee4d4..6a869ae564 100644 --- a/packages/insomnia-test/tests/environment/create-and-duplicate-global-environment.spec.ts +++ b/packages/insomnia-test/tests/environment/create-and-duplicate-global-environment.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify creating and duplicating a global environment", async ({ user, diff --git a/packages/insomnia-test/tests/environment/disabled-sub-environment-variable-falls-back-to-base.spec.ts b/packages/insomnia-test/tests/environment/disabled-sub-environment-variable-falls-back-to-base.spec.ts index 9c786d92d9..a30d976b6d 100644 --- a/packages/insomnia-test/tests/environment/disabled-sub-environment-variable-falls-back-to-base.spec.ts +++ b/packages/insomnia-test/tests/environment/disabled-sub-environment-variable-falls-back-to-base.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const sharedVariable = "shared"; diff --git a/packages/insomnia-test/tests/environment/disabled-variable-mid-chain.spec.ts b/packages/insomnia-test/tests/environment/disabled-variable-mid-chain.spec.ts index 5834fe09f6..00e652aa90 100644 --- a/packages/insomnia-test/tests/environment/disabled-variable-mid-chain.spec.ts +++ b/packages/insomnia-test/tests/environment/disabled-variable-mid-chain.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const leafVariable = "leaf"; const midVariable = "mid"; diff --git a/packages/insomnia-test/tests/environment/environment-pickers-and-creation.spec.ts b/packages/insomnia-test/tests/environment/environment-pickers-and-creation.spec.ts index f43cdafd81..34d4b4ec73 100644 --- a/packages/insomnia-test/tests/environment/environment-pickers-and-creation.spec.ts +++ b/packages/insomnia-test/tests/environment/environment-pickers-and-creation.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the project and collection environment pickers open and close independently", async ({ user, diff --git a/packages/insomnia-test/tests/environment/folder-environment-overrides-sub-and-base.spec.ts b/packages/insomnia-test/tests/environment/folder-environment-overrides-sub-and-base.spec.ts index 76fbeae899..6627f1e2b9 100644 --- a/packages/insomnia-test/tests/environment/folder-environment-overrides-sub-and-base.spec.ts +++ b/packages/insomnia-test/tests/environment/folder-environment-overrides-sub-and-base.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const sharedVariable = faker.string.alpha(8); const subOnlyVariable = faker.string.alpha(9); diff --git a/packages/insomnia-test/tests/environment/json-raw-editor.spec.ts b/packages/insomnia-test/tests/environment/json-raw-editor.spec.ts index f191203d84..8b601e5474 100644 --- a/packages/insomnia-test/tests/environment/json-raw-editor.spec.ts +++ b/packages/insomnia-test/tests/environment/json-raw-editor.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import type { @@ -9,6 +7,7 @@ import { EnvironmentKvPairDataType, } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Environment Raw JSON Editor Reads Back And Persists Edits", async ({ user, diff --git a/packages/insomnia-test/tests/environment/key-value-editor-blank-row.spec.ts b/packages/insomnia-test/tests/environment/key-value-editor-blank-row.spec.ts index cb2c1ece36..5e44cbe905 100644 --- a/packages/insomnia-test/tests/environment/key-value-editor-blank-row.spec.ts +++ b/packages/insomnia-test/tests/environment/key-value-editor-blank-row.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import type { @@ -9,6 +7,7 @@ import { EnvironmentKvPairDataType, } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Environment Table Editor's Blank Row Is Not Persisted And Deleting A Row Leaves No Stale Text", async ({ user, diff --git a/packages/insomnia-test/tests/environment/mixed-variables-in-value.spec.ts b/packages/insomnia-test/tests/environment/mixed-variables-in-value.spec.ts index b3ac4cfaed..b4a4fb3e58 100644 --- a/packages/insomnia-test/tests/environment/mixed-variables-in-value.spec.ts +++ b/packages/insomnia-test/tests/environment/mixed-variables-in-value.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const firstVariable = "a"; const secondVariable = "b"; diff --git a/packages/insomnia-test/tests/environment/nested-variable-resolution.spec.ts b/packages/insomnia-test/tests/environment/nested-variable-resolution.spec.ts index adbeaa8f61..3b5a86ee82 100644 --- a/packages/insomnia-test/tests/environment/nested-variable-resolution.spec.ts +++ b/packages/insomnia-test/tests/environment/nested-variable-resolution.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const leafVariable = "leaf"; const midVariable = "mid"; diff --git a/packages/insomnia-test/tests/environment/private-environment-secret-variable.spec.ts b/packages/insomnia-test/tests/environment/private-environment-secret-variable.spec.ts index 5851ffe886..b0f0b1ca66 100644 --- a/packages/insomnia-test/tests/environment/private-environment-secret-variable.spec.ts +++ b/packages/insomnia-test/tests/environment/private-environment-secret-variable.spec.ts @@ -1,8 +1,6 @@ import * as crypto from "node:crypto"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -13,6 +11,7 @@ import { EnvironmentKvPairDataType, } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const testWithVaultKey = test.extend({ vaultKey: async ({}, use) => { diff --git a/packages/insomnia-test/tests/environment/self-referencing-variable.spec.ts b/packages/insomnia-test/tests/environment/self-referencing-variable.spec.ts index 6cb00a26c1..fb756f55a7 100644 --- a/packages/insomnia-test/tests/environment/self-referencing-variable.spec.ts +++ b/packages/insomnia-test/tests/environment/self-referencing-variable.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const selfVariable = "a"; diff --git a/packages/insomnia-test/tests/environment/sub-environment-empty-falls-back-to-base.spec.ts b/packages/insomnia-test/tests/environment/sub-environment-empty-falls-back-to-base.spec.ts index 57e19839d2..fc7ecdde33 100644 --- a/packages/insomnia-test/tests/environment/sub-environment-empty-falls-back-to-base.spec.ts +++ b/packages/insomnia-test/tests/environment/sub-environment-empty-falls-back-to-base.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const sharedVariable = "shared"; diff --git a/packages/insomnia-test/tests/environment/sub-environment-variable-priority.spec.ts b/packages/insomnia-test/tests/environment/sub-environment-variable-priority.spec.ts index 327a1dc006..f3a7307544 100644 --- a/packages/insomnia-test/tests/environment/sub-environment-variable-priority.spec.ts +++ b/packages/insomnia-test/tests/environment/sub-environment-variable-priority.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const sharedVariable = "shared"; diff --git a/packages/insomnia-test/tests/environment/table-editor-disable-row.spec.ts b/packages/insomnia-test/tests/environment/table-editor-disable-row.spec.ts index e5c1a3aba7..69a1bdf3d3 100644 --- a/packages/insomnia-test/tests/environment/table-editor-disable-row.spec.ts +++ b/packages/insomnia-test/tests/environment/table-editor-disable-row.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import type { @@ -9,6 +7,7 @@ import { EnvironmentKvPairDataType, } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Disabling A Row In The Table Editor Is Reflected On Read-Back", async ({ user, diff --git a/packages/insomnia-test/tests/environment/unlinked-environment-variable.spec.ts b/packages/insomnia-test/tests/environment/unlinked-environment-variable.spec.ts index 21cf1931b3..0b1f5ba92e 100644 --- a/packages/insomnia-test/tests/environment/unlinked-environment-variable.spec.ts +++ b/packages/insomnia-test/tests/environment/unlinked-environment-variable.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { MOCK_API_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const variableName = "unlinked"; diff --git a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-levels.spec.ts b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-levels.spec.ts index 8839b1d37f..8e10f612c2 100644 --- a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-levels.spec.ts +++ b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-levels.spec.ts @@ -1,14 +1,13 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import type { FlowManager } from "@package/flows/flow-manager"; import type { VariableSourceLanding } from "@package/flows/variable-source.flow"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const cascadeFixture = path.join(import.meta.dirname, "environment-cascade-collection.yaml"); const globalCollectionFixture = path.join(import.meta.dirname, "collection-for-global-environments.yaml"); diff --git a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-modal-editing.spec.ts b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-modal-editing.spec.ts index ddc3485800..6c34b1d414 100644 --- a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-modal-editing.spec.ts +++ b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-modal-editing.spec.ts @@ -1,12 +1,11 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the tag modal's source follows the edited template and hides for non-variable content", async ({ user, diff --git a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-behavior.spec.ts b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-behavior.spec.ts index f541a6b88c..8ead0d488f 100644 --- a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-behavior.spec.ts +++ b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-behavior.spec.ts @@ -1,12 +1,11 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify hovering an undefined variable swaps the tooltip to the render error instead of vanishing", async ({ user, diff --git a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-open.spec.ts b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-open.spec.ts index 19596f20c3..fb57ca4154 100644 --- a/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-open.spec.ts +++ b/packages/insomnia-test/tests/environment/variable-source-live-preview/variable-source-tooltip-open.spec.ts @@ -1,12 +1,11 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const cascadeFixture = path.join(import.meta.dirname, "environment-cascade-collection.yaml"); const globalCollectionFixture = path.join(import.meta.dirname, "collection-for-global-environments.yaml"); diff --git a/packages/insomnia-test/tests/environment/vault-legacy-format-environment-variables/vault-legacy-format-environment-variables.spec.ts b/packages/insomnia-test/tests/environment/vault-legacy-format-environment-variables/vault-legacy-format-environment-variables.spec.ts index e4bc30cf92..66852fb28a 100644 --- a/packages/insomnia-test/tests/environment/vault-legacy-format-environment-variables/vault-legacy-format-environment-variables.spec.ts +++ b/packages/insomnia-test/tests/environment/vault-legacy-format-environment-variables/vault-legacy-format-environment-variables.spec.ts @@ -2,8 +2,6 @@ import * as crypto from "node:crypto"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; @@ -12,6 +10,7 @@ import { EnvironmentKvPairDataType, } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const testWithVaultKey = test.extend({ vaultKey: async ({}, use) => { diff --git a/packages/insomnia-test/tests/event-stream-request/api-key-authentication.spec.ts b/packages/insomnia-test/tests/event-stream-request/api-key-authentication.spec.ts index 260b56e89c..f0d4fe6426 100644 --- a/packages/insomnia-test/tests/event-stream-request/api-key-authentication.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/api-key-authentication.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { EventStreamMethod } from '@package/models/event-stream-request'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify Event Stream Request Sends the API Key Header Until Authentication Is Set to None', async ({ user }) => { const { eventStreamRequestFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/event-stream-request/basic-authentication.spec.ts b/packages/insomnia-test/tests/event-stream-request/basic-authentication.spec.ts index 50e24193ed..c4ba8d8f6f 100644 --- a/packages/insomnia-test/tests/event-stream-request/basic-authentication.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/basic-authentication.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { EventStreamMethod } from '@package/models/event-stream-request'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify Event Stream Request Sends the Basic Authentication Header Until Authentication Is Set to None', async ({ user, diff --git a/packages/insomnia-test/tests/event-stream-request/bearer-authentication.spec.ts b/packages/insomnia-test/tests/event-stream-request/bearer-authentication.spec.ts index 83fd7fe25a..e33ac32667 100644 --- a/packages/insomnia-test/tests/event-stream-request/bearer-authentication.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/bearer-authentication.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Event Stream Request Sends the Bearer Token Header Until Authentication Is Set to None", async ({ user, diff --git a/packages/insomnia-test/tests/event-stream-request/cancel-open-stream.spec.ts b/packages/insomnia-test/tests/event-stream-request/cancel-open-stream.spec.ts index e8efc89142..3c7f585ebf 100644 --- a/packages/insomnia-test/tests/event-stream-request/cancel-open-stream.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/cancel-open-stream.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { RequestState } from "@package/enums/request-state"; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const eventCount = 20; diff --git a/packages/insomnia-test/tests/event-stream-request/cookie-sent-with-request.spec.ts b/packages/insomnia-test/tests/event-stream-request/cookie-sent-with-request.spec.ts index 1b8217f396..31d2ef307f 100644 --- a/packages/insomnia-test/tests/event-stream-request/cookie-sent-with-request.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/cookie-sent-with-request.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Linked Cookie Is Sent With Event Stream Request", async ({ user, diff --git a/packages/insomnia-test/tests/event-stream-request/duplicate-request.spec.ts b/packages/insomnia-test/tests/event-stream-request/duplicate-request.spec.ts index d3b6585292..794ce213de 100644 --- a/packages/insomnia-test/tests/event-stream-request/duplicate-request.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/duplicate-request.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Duplicated Event Stream Request Keeps Url, Method and Headers", async ({ user, diff --git a/packages/insomnia-test/tests/event-stream-request/happy-path.spec.ts b/packages/insomnia-test/tests/event-stream-request/happy-path.spec.ts index 31ec099c75..8e8f1d5af4 100644 --- a/packages/insomnia-test/tests/event-stream-request/happy-path.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/happy-path.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { RequestState } from "@package/enums/request-state"; import { EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const eventStreamUrl = "http://{{url}}/sse-events/5"; diff --git a/packages/insomnia-test/tests/event-stream-request/oauth2-client-credentials-authentication.spec.ts b/packages/insomnia-test/tests/event-stream-request/oauth2-client-credentials-authentication.spec.ts index 874de3bf0f..c7a7d174d2 100644 --- a/packages/insomnia-test/tests/event-stream-request/oauth2-client-credentials-authentication.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/oauth2-client-credentials-authentication.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { EventStreamMethod } from '@package/models/event-stream-request'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify Event Stream Request Sends the OAuth 2.0 Header Until Authentication Is Set to None', async ({ user }) => { const { eventStreamRequestFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/event-stream-request/proxy-settings.spec.ts b/packages/insomnia-test/tests/event-stream-request/proxy-settings.spec.ts index 6f1c538000..a4f95d49b7 100644 --- a/packages/insomnia-test/tests/event-stream-request/proxy-settings.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/proxy-settings.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Enabling a Proxy Routes Event Stream Requests Through It", async ({ user, diff --git a/packages/insomnia-test/tests/event-stream-request/template-tag-in-header.spec.ts b/packages/insomnia-test/tests/event-stream-request/template-tag-in-header.spec.ts index a47ca8d20d..37ded9d7cf 100644 --- a/packages/insomnia-test/tests/event-stream-request/template-tag-in-header.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/template-tag-in-header.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Template Tag in Event Stream Request Header Is Resolved", async ({ user, diff --git a/packages/insomnia-test/tests/event-stream-request/tls-connection.spec.ts b/packages/insomnia-test/tests/event-stream-request/tls-connection.spec.ts index b628c534dc..e8f1f86b14 100644 --- a/packages/insomnia-test/tests/event-stream-request/tls-connection.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/tls-connection.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, EVENT_STREAM_SERVER_HTTPS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Event Stream Request Over a TLS Connection", async ({ user }) => { const { eventStreamRequestFlow, preferencesFlow, workspaceFlow } = diff --git a/packages/insomnia-test/tests/event-stream-request/unresolved-environment-variable.spec.ts b/packages/insomnia-test/tests/event-stream-request/unresolved-environment-variable.spec.ts index f39c650899..3034d0fb44 100644 --- a/packages/insomnia-test/tests/event-stream-request/unresolved-environment-variable.spec.ts +++ b/packages/insomnia-test/tests/event-stream-request/unresolved-environment-variable.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { EVENT_STREAM_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { EventStreamMethod } from "@package/models/event-stream-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const variableName = "unlinked"; diff --git a/packages/insomnia-test/tests/git-sync/checkout-remote-branch.spec.ts b/packages/insomnia-test/tests/git-sync/checkout-remote-branch.spec.ts index 77decedb59..6be39b9620 100644 --- a/packages/insomnia-test/tests/git-sync/checkout-remote-branch.spec.ts +++ b/packages/insomnia-test/tests/git-sync/checkout-remote-branch.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { buildCollectionFile, GIT_CREDENTIAL, pushServerFile, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify a branch that exists only on the remote is listed after Fetch and can be checked out', async ({ user }) => { const { gitSyncFlow, preferencesFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/git-sync/commit-and-check-history.spec.ts b/packages/insomnia-test/tests/git-sync/commit-and-check-history.spec.ts index 6ec742c427..74f952f84f 100644 --- a/packages/insomnia-test/tests/git-sync/commit-and-check-history.spec.ts +++ b/packages/insomnia-test/tests/git-sync/commit-and-check-history.spec.ts @@ -1,12 +1,11 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER } from '@package/misc/fixtures'; import { getServerCommits, GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify committing a new collection and then a new request in a Git Sync project appears in History', async ({ user, diff --git a/packages/insomnia-test/tests/git-sync/commit-needs-staged-changes-and-message.spec.ts b/packages/insomnia-test/tests/git-sync/commit-needs-staged-changes-and-message.spec.ts index c8323b985c..128680f342 100644 --- a/packages/insomnia-test/tests/git-sync/commit-needs-staged-changes-and-message.spec.ts +++ b/packages/insomnia-test/tests/git-sync/commit-needs-staged-changes-and-message.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify committing with nothing staged prompts to stage all, and cancelling or omitting the message creates no commit', async ({ user, diff --git a/packages/insomnia-test/tests/git-sync/create-branch-and-switch.spec.ts b/packages/insomnia-test/tests/git-sync/create-branch-and-switch.spec.ts index 88b36fd2fa..97c602447b 100644 --- a/packages/insomnia-test/tests/git-sync/create-branch-and-switch.spec.ts +++ b/packages/insomnia-test/tests/git-sync/create-branch-and-switch.spec.ts @@ -1,9 +1,8 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { getServerBranches, GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify creating a new branch in a Git Sync project switches to it', async ({ user }) => { const { gitSyncFlow, preferencesFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/git-sync/create-branch-validation.spec.ts b/packages/insomnia-test/tests/git-sync/create-branch-validation.spec.ts index 92bf049281..d1c8d14666 100644 --- a/packages/insomnia-test/tests/git-sync/create-branch-validation.spec.ts +++ b/packages/insomnia-test/tests/git-sync/create-branch-validation.spec.ts @@ -1,9 +1,8 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify creating a branch with a duplicate or invalid name shows an error and keeps the current branch', async ({ user, diff --git a/packages/insomnia-test/tests/git-sync/delete-branch.spec.ts b/packages/insomnia-test/tests/git-sync/delete-branch.spec.ts index f030ddd76e..0f06fe2cda 100644 --- a/packages/insomnia-test/tests/git-sync/delete-branch.spec.ts +++ b/packages/insomnia-test/tests/git-sync/delete-branch.spec.ts @@ -1,9 +1,8 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { getServerBranches, GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( 'Verify deleting a branch checks out master and removes it from the list', diff --git a/packages/insomnia-test/tests/git-sync/disabled-via-feature-flag.spec.ts b/packages/insomnia-test/tests/git-sync/disabled-via-feature-flag.spec.ts index 60f58a4169..acea47a52a 100644 --- a/packages/insomnia-test/tests/git-sync/disabled-via-feature-flag.spec.ts +++ b/packages/insomnia-test/tests/git-sync/disabled-via-feature-flag.spec.ts @@ -1,8 +1,7 @@ -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, setGitSyncFeatureFlag } from "@package/misc/fixtures"; import { test } from "@package/misc/git-fixtures"; +import { expect } from "@playwright/test"; test.beforeAll(async () => { await setGitSyncFeatureFlag(false); diff --git a/packages/insomnia-test/tests/git-sync/disabled-via-storage-rule.spec.ts b/packages/insomnia-test/tests/git-sync/disabled-via-storage-rule.spec.ts index b05b536ab2..0c663e57fb 100644 --- a/packages/insomnia-test/tests/git-sync/disabled-via-storage-rule.spec.ts +++ b/packages/insomnia-test/tests/git-sync/disabled-via-storage-rule.spec.ts @@ -1,8 +1,7 @@ -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, setGitSyncStorageRule } from "@package/misc/fixtures"; import { test } from "@package/misc/git-fixtures"; +import { expect } from "@playwright/test"; test.beforeAll(async () => { await setGitSyncStorageRule(false); diff --git a/packages/insomnia-test/tests/git-sync/discard-unstaged-changes.spec.ts b/packages/insomnia-test/tests/git-sync/discard-unstaged-changes.spec.ts index df009fe16f..9b45715ec6 100644 --- a/packages/insomnia-test/tests/git-sync/discard-unstaged-changes.spec.ts +++ b/packages/insomnia-test/tests/git-sync/discard-unstaged-changes.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, getServerCommits, GIT_CREDENTIAL, test } from "@package/misc/git-fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test( "Verify discarding all unstaged changes removes the uncommitted collection and keeps the committed one", diff --git a/packages/insomnia-test/tests/git-sync/merge-branch.spec.ts b/packages/insomnia-test/tests/git-sync/merge-branch.spec.ts index d51a9c9e54..4d16fad24a 100644 --- a/packages/insomnia-test/tests/git-sync/merge-branch.spec.ts +++ b/packages/insomnia-test/tests/git-sync/merge-branch.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { getServerBranches, GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( 'Verify merging a branch carries its committed changes into the current branch', diff --git a/packages/insomnia-test/tests/git-sync/merge-conflict-resolution.spec.ts b/packages/insomnia-test/tests/git-sync/merge-conflict-resolution.spec.ts index 8e1226104e..858c7344e4 100644 --- a/packages/insomnia-test/tests/git-sync/merge-conflict-resolution.spec.ts +++ b/packages/insomnia-test/tests/git-sync/merge-conflict-resolution.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; for (const { version, chosenIndex } of [ { version: 'Current', chosenIndex: 0 }, diff --git a/packages/insomnia-test/tests/git-sync/open-local-folder-collision.spec.ts b/packages/insomnia-test/tests/git-sync/open-local-folder-collision.spec.ts index 960e5ebe01..7005db81e2 100644 --- a/packages/insomnia-test/tests/git-sync/open-local-folder-collision.spec.ts +++ b/packages/insomnia-test/tests/git-sync/open-local-folder-collision.spec.ts @@ -3,11 +3,10 @@ import * as os from "node:os"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/git-fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test( "Verify opening a folder already adopted by another project shows a collision warning and disables Open", diff --git a/packages/insomnia-test/tests/git-sync/open-local-folder.spec.ts b/packages/insomnia-test/tests/git-sync/open-local-folder.spec.ts index 1f72f6af9e..caadf7bcf5 100644 --- a/packages/insomnia-test/tests/git-sync/open-local-folder.spec.ts +++ b/packages/insomnia-test/tests/git-sync/open-local-folder.spec.ts @@ -3,11 +3,10 @@ import * as os from 'node:os'; import path from 'node:path'; import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { test } from '@package/misc/git-fixtures'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( 'Verify adopting an existing local folder as a Git project runs git init in it', diff --git a/packages/insomnia-test/tests/git-sync/pull-conflict-resolution.spec.ts b/packages/insomnia-test/tests/git-sync/pull-conflict-resolution.spec.ts index 70bc8ddf72..38e0988ed6 100644 --- a/packages/insomnia-test/tests/git-sync/pull-conflict-resolution.spec.ts +++ b/packages/insomnia-test/tests/git-sync/pull-conflict-resolution.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { buildCollectionFile, DEFAULT_TIMEOUT, GIT_CREDENTIAL, pushServerFile, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; for (const { version, keepsLocal } of [ { version: 'Current', keepsLocal: true }, diff --git a/packages/insomnia-test/tests/git-sync/pull-remote-changes.spec.ts b/packages/insomnia-test/tests/git-sync/pull-remote-changes.spec.ts index ea05b8f110..38da6e565e 100644 --- a/packages/insomnia-test/tests/git-sync/pull-remote-changes.spec.ts +++ b/packages/insomnia-test/tests/git-sync/pull-remote-changes.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, GIT_CREDENTIAL, pushServerFile, test } from '@package/misc/git-fixtures'; import { buildCollectionFile } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify pulling brings in a collection that was pushed to the remote by another client', async ({ user }) => { const { gitSyncFlow, preferencesFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/git-sync/push-to-remote.spec.ts b/packages/insomnia-test/tests/git-sync/push-to-remote.spec.ts index 00ddf89e5f..784bf5a478 100644 --- a/packages/insomnia-test/tests/git-sync/push-to-remote.spec.ts +++ b/packages/insomnia-test/tests/git-sync/push-to-remote.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { getServerBranches, getServerCommits, GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify pushing committed changes to the remote succeeds', async ({ user }) => { const { gitSyncFlow, preferencesFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/git-sync/relocate-repository-collision.spec.ts b/packages/insomnia-test/tests/git-sync/relocate-repository-collision.spec.ts index 2bc02dec5e..50d1df5df2 100644 --- a/packages/insomnia-test/tests/git-sync/relocate-repository-collision.spec.ts +++ b/packages/insomnia-test/tests/git-sync/relocate-repository-collision.spec.ts @@ -3,12 +3,11 @@ import * as os from 'node:os'; import path from 'node:path'; import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT } from '@package/misc/fixtures'; import { GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( "Verify relocating a Git Sync project's repository shows an error when the destination folder already exists", diff --git a/packages/insomnia-test/tests/git-sync/relocate-repository.spec.ts b/packages/insomnia-test/tests/git-sync/relocate-repository.spec.ts index d9d9e7b867..2d62e9f5a8 100644 --- a/packages/insomnia-test/tests/git-sync/relocate-repository.spec.ts +++ b/packages/insomnia-test/tests/git-sync/relocate-repository.spec.ts @@ -3,12 +3,11 @@ import * as os from "node:os"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT } from "@package/misc/fixtures"; import { GIT_CREDENTIAL, test } from "@package/misc/git-fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test( "Verify relocating a Git Sync project's repository to a new folder updates the displayed path", diff --git a/packages/insomnia-test/tests/git-sync/sidebar-drag-drop-into-empty-collection.spec.ts b/packages/insomnia-test/tests/git-sync/sidebar-drag-drop-into-empty-collection.spec.ts index 86defda21a..e967651de1 100644 --- a/packages/insomnia-test/tests/git-sync/sidebar-drag-drop-into-empty-collection.spec.ts +++ b/packages/insomnia-test/tests/git-sync/sidebar-drag-drop-into-empty-collection.spec.ts @@ -1,6 +1,4 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { TreeNodeType } from '@package/enums/tree-node-types'; @@ -8,6 +6,7 @@ import { HTTP_SERVER } from '@package/misc/fixtures'; import { GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( 'Verify dragging a request out of a Git Sync collection into an empty Git Sync collection', diff --git a/packages/insomnia-test/tests/git-sync/stage-and-unstage-individual-changes.spec.ts b/packages/insomnia-test/tests/git-sync/stage-and-unstage-individual-changes.spec.ts index 72d9485cc2..a604a58d57 100644 --- a/packages/insomnia-test/tests/git-sync/stage-and-unstage-individual-changes.spec.ts +++ b/packages/insomnia-test/tests/git-sync/stage-and-unstage-individual-changes.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify staging and unstaging individual changes only commits the staged file', async ({ user }) => { const { gitSyncFlow, preferencesFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/graphql-request/api-key-authentication.spec.ts b/packages/insomnia-test/tests/graphql-request/api-key-authentication.spec.ts index 2a27b27bd4..8224dd9e7c 100644 --- a/packages/insomnia-test/tests/graphql-request/api-key-authentication.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/api-key-authentication.spec.ts @@ -1,12 +1,11 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ContentType } from '@package/enums/content-type'; import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const query = '{ characters { results { name } } }'; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/basic-authentication.spec.ts b/packages/insomnia-test/tests/graphql-request/basic-authentication.spec.ts index 4a69d0984d..583d557543 100644 --- a/packages/insomnia-test/tests/graphql-request/basic-authentication.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/basic-authentication.spec.ts @@ -1,12 +1,11 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ContentType } from '@package/enums/content-type'; import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const query = '{ characters { results { name } } }'; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/bearer-authentication.spec.ts b/packages/insomnia-test/tests/graphql-request/bearer-authentication.spec.ts index 7477515b00..3e6c5f62df 100644 --- a/packages/insomnia-test/tests/graphql-request/bearer-authentication.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/bearer-authentication.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/cancel-in-flight-request.spec.ts b/packages/insomnia-test/tests/graphql-request/cancel-in-flight-request.spec.ts index 2a5487e027..05e0b803b7 100644 --- a/packages/insomnia-test/tests/graphql-request/cancel-in-flight-request.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/cancel-in-flight-request.spec.ts @@ -1,6 +1,4 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ContentType } from '@package/enums/content-type'; import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; @@ -8,6 +6,7 @@ import { RequestState } from '@package/enums/request-state'; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const query = '{ characters { results { name } } }'; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/cookie-sent-with-request.spec.ts b/packages/insomnia-test/tests/graphql-request/cookie-sent-with-request.spec.ts index 55caddd2b2..ff4a768461 100644 --- a/packages/insomnia-test/tests/graphql-request/cookie-sent-with-request.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/cookie-sent-with-request.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/duplicate-request.spec.ts b/packages/insomnia-test/tests/graphql-request/duplicate-request.spec.ts index 557d69d484..663adf41aa 100644 --- a/packages/insomnia-test/tests/graphql-request/duplicate-request.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/duplicate-request.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/generate-code.spec.ts b/packages/insomnia-test/tests/graphql-request/generate-code.spec.ts index b1d7b6de2f..3d928be1c2 100644 --- a/packages/insomnia-test/tests/graphql-request/generate-code.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/generate-code.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/happy-path.spec.ts b/packages/insomnia-test/tests/graphql-request/happy-path.spec.ts index 96a54e6922..8bf8418fca 100644 --- a/packages/insomnia-test/tests/graphql-request/happy-path.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/happy-path.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/graphql`; const query = '{ characters(filter: {status: "Alive"}) { results { name } } }'; diff --git a/packages/insomnia-test/tests/graphql-request/numeric-environment-variable.spec.ts b/packages/insomnia-test/tests/graphql-request/numeric-environment-variable.spec.ts index ee45fab78d..13e7a8866a 100644 --- a/packages/insomnia-test/tests/graphql-request/numeric-environment-variable.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/numeric-environment-variable.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -8,6 +6,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/graphql`; const query = "query Ep($id: Int!) { episode(id: $id) { id name } }"; diff --git a/packages/insomnia-test/tests/graphql-request/oauth2-client-credentials-authentication.spec.ts b/packages/insomnia-test/tests/graphql-request/oauth2-client-credentials-authentication.spec.ts index 49d99c8651..84ed569dbf 100644 --- a/packages/insomnia-test/tests/graphql-request/oauth2-client-credentials-authentication.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/oauth2-client-credentials-authentication.spec.ts @@ -1,12 +1,11 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ContentType } from '@package/enums/content-type'; import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const query = '{ characters { results { name } } }'; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/object-variables.spec.ts b/packages/insomnia-test/tests/graphql-request/object-variables.spec.ts index 33cce28419..c0f0ff972e 100644 --- a/packages/insomnia-test/tests/graphql-request/object-variables.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/object-variables.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/graphql`; const query = diff --git a/packages/insomnia-test/tests/graphql-request/pre-request-script-header.spec.ts b/packages/insomnia-test/tests/graphql-request/pre-request-script-header.spec.ts index 00ac93f8bb..975af41845 100644 --- a/packages/insomnia-test/tests/graphql-request/pre-request-script-header.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/pre-request-script-header.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/proxy-settings.spec.ts b/packages/insomnia-test/tests/graphql-request/proxy-settings.spec.ts index 2d353dd86b..32755b4696 100644 --- a/packages/insomnia-test/tests/graphql-request/proxy-settings.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/proxy-settings.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/schema-documentation.spec.ts b/packages/insomnia-test/tests/graphql-request/schema-documentation.spec.ts index 201012e68e..4e95816a07 100644 --- a/packages/insomnia-test/tests/graphql-request/schema-documentation.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/schema-documentation.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/graphql`; const query = "{ characters { results { name } } }"; diff --git a/packages/insomnia-test/tests/graphql-request/template-tag-in-header.spec.ts b/packages/insomnia-test/tests/graphql-request/template-tag-in-header.spec.ts index 54b42a555f..8fae1513e2 100644 --- a/packages/insomnia-test/tests/graphql-request/template-tag-in-header.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/template-tag-in-header.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/tls-connection.spec.ts b/packages/insomnia-test/tests/graphql-request/tls-connection.spec.ts index 71b5431a84..4a981e93ba 100644 --- a/packages/insomnia-test/tests/graphql-request/tls-connection.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/tls-connection.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER_HTTPS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/graphql-request/unlinked-environment-variable.spec.ts b/packages/insomnia-test/tests/graphql-request/unlinked-environment-variable.spec.ts index 1b1ba2c3f8..218e11da58 100644 --- a/packages/insomnia-test/tests/graphql-request/unlinked-environment-variable.spec.ts +++ b/packages/insomnia-test/tests/graphql-request/unlinked-environment-variable.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -8,6 +6,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const query = "{ characters { results { name } } }"; const body = { mimeType: ContentType.JSON, text: JSON.stringify({ query }) }; diff --git a/packages/insomnia-test/tests/grpc-request/body-environment-variable-interpolation.spec.ts b/packages/insomnia-test/tests/grpc-request/body-environment-variable-interpolation.spec.ts index 66ab84cb43..417239cf03 100644 --- a/packages/insomnia-test/tests/grpc-request/body-environment-variable-interpolation.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/body-environment-variable-interpolation.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Environment Variable Interpolation Inside a gRPC Request Body", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/cancel-in-flight-server-streaming-call.spec.ts b/packages/insomnia-test/tests/grpc-request/cancel-in-flight-server-streaming-call.spec.ts index 708ca142a7..b6f18f31e9 100644 --- a/packages/insomnia-test/tests/grpc-request/cancel-in-flight-server-streaming-call.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/cancel-in-flight-server-streaming-call.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Cancelling an In-Flight gRPC Server Streaming Call", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/cancel-open-client-streaming-call.spec.ts b/packages/insomnia-test/tests/grpc-request/cancel-open-client-streaming-call.spec.ts index 4b377ecef9..a8ffd7bf57 100644 --- a/packages/insomnia-test/tests/grpc-request/cancel-open-client-streaming-call.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/cancel-open-client-streaming-call.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Cancelling an Open gRPC Client Streaming Call", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/commit-empty-stream.spec.ts b/packages/insomnia-test/tests/grpc-request/commit-empty-stream.spec.ts index 2c7edd31e1..12748a12df 100644 --- a/packages/insomnia-test/tests/grpc-request/commit-empty-stream.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/commit-empty-stream.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Committing a gRPC Client Streaming Call With No Messages Sent", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/custom-metadata-headers.spec.ts b/packages/insomnia-test/tests/grpc-request/custom-metadata-headers.spec.ts index 43eb3dc53c..4cf0ba9d17 100644 --- a/packages/insomnia-test/tests/grpc-request/custom-metadata-headers.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/custom-metadata-headers.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Custom gRPC Metadata Headers Are Sent to the Server", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/duplicate-grpc-request-with-streaming-method.spec.ts b/packages/insomnia-test/tests/grpc-request/duplicate-grpc-request-with-streaming-method.spec.ts index 668db97746..545b92013f 100644 --- a/packages/insomnia-test/tests/grpc-request/duplicate-grpc-request-with-streaming-method.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/duplicate-grpc-request-with-streaming-method.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Duplicating a gRPC Request With a Bidirectional Streaming Method Selected", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/happy-path.spec.ts b/packages/insomnia-test/tests/grpc-request/happy-path.spec.ts index 5b9116fcdf..1b01c42d5c 100644 --- a/packages/insomnia-test/tests/grpc-request/happy-path.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/happy-path.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Create gRPC Request", async ({ user }) => { const { environmentFlow, grpcRequestFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/grpc-request/mtls-client-certificate.spec.ts b/packages/insomnia-test/tests/grpc-request/mtls-client-certificate.spec.ts index 398cb4eab2..98c0bdc75e 100644 --- a/packages/insomnia-test/tests/grpc-request/mtls-client-certificate.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/mtls-client-certificate.spec.ts @@ -1,13 +1,12 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { certPath } from "@package/misc/certs"; import { GRPC_SERVER_MTLS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Client Certificate Toggle Controls mTLS Enforcement For gRPC Request", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/proxy-settings.spec.ts b/packages/insomnia-test/tests/grpc-request/proxy-settings.spec.ts index 77354b54fd..aeff716209 100644 --- a/packages/insomnia-test/tests/grpc-request/proxy-settings.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/proxy-settings.spec.ts @@ -4,12 +4,11 @@ import * as net from "node:net"; import type { Duplex } from "node:stream"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const startRecordingProxy = async () => { const targets: string[] = []; diff --git a/packages/insomnia-test/tests/grpc-request/reflection-fails-on-unreachable-server.spec.ts b/packages/insomnia-test/tests/grpc-request/reflection-fails-on-unreachable-server.spec.ts index 78d21fcf81..56ce9010e5 100644 --- a/packages/insomnia-test/tests/grpc-request/reflection-fails-on-unreachable-server.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/reflection-fails-on-unreachable-server.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const unreachableGrpcUrl = "localhost:19999"; diff --git a/packages/insomnia-test/tests/grpc-request/resend-after-completion.spec.ts b/packages/insomnia-test/tests/grpc-request/resend-after-completion.spec.ts index 58298d7304..2d6d9df192 100644 --- a/packages/insomnia-test/tests/grpc-request/resend-after-completion.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/resend-after-completion.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Re-sending a Completed gRPC Unary Request Reflects the New Body", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/server-returns-business-error-status.spec.ts b/packages/insomnia-test/tests/grpc-request/server-returns-business-error-status.spec.ts index 314f134ab7..6a1da8fead 100644 --- a/packages/insomnia-test/tests/grpc-request/server-returns-business-error-status.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/server-returns-business-error-status.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify a gRPC Server-Side Business Error Status Is Surfaced", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/switch-method-resets-response.spec.ts b/packages/insomnia-test/tests/grpc-request/switch-method-resets-response.spec.ts index e8e21e2753..2f0106d8c4 100644 --- a/packages/insomnia-test/tests/grpc-request/switch-method-resets-response.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/switch-method-resets-response.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Switching gRPC Methods Resets the Response Pane", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/template-tag-in-body.spec.ts b/packages/insomnia-test/tests/grpc-request/template-tag-in-body.spec.ts index c363498831..e85716b4bf 100644 --- a/packages/insomnia-test/tests/grpc-request/template-tag-in-body.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/template-tag-in-body.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Template Tag in gRPC Request Body Is Resolved", async ({ user, diff --git a/packages/insomnia-test/tests/grpc-request/tls-connection.spec.ts b/packages/insomnia-test/tests/grpc-request/tls-connection.spec.ts index 42dc588b4e..5dc6306d53 100644 --- a/packages/insomnia-test/tests/grpc-request/tls-connection.spec.ts +++ b/packages/insomnia-test/tests/grpc-request/tls-connection.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { GRPC_SERVER_TLS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify gRPC Request Over a TLS Connection", async ({ user }) => { const { grpcRequestFlow, preferencesFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/http-request/after-response-script-test-results.spec.ts b/packages/insomnia-test/tests/http-request/after-response-script-test-results.spec.ts index 0bd03087d0..2eb52a580d 100644 --- a/packages/insomnia-test/tests/http-request/after-response-script-test-results.spec.ts +++ b/packages/insomnia-test/tests/http-request/after-response-script-test-results.spec.ts @@ -1,12 +1,11 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ContentType } from '@package/enums/content-type'; import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/body-types.spec.ts b/packages/insomnia-test/tests/http-request/body-types.spec.ts index cd16bf75e2..ecb44ad990 100644 --- a/packages/insomnia-test/tests/http-request/body-types.spec.ts +++ b/packages/insomnia-test/tests/http-request/body-types.spec.ts @@ -1,8 +1,6 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -10,6 +8,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const uploadFilePath = path.join( diff --git a/packages/insomnia-test/tests/http-request/cancel-in-flight-request.spec.ts b/packages/insomnia-test/tests/http-request/cancel-in-flight-request.spec.ts index 6bdb5c03b2..15fcdddf8d 100644 --- a/packages/insomnia-test/tests/http-request/cancel-in-flight-request.spec.ts +++ b/packages/insomnia-test/tests/http-request/cancel-in-flight-request.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { RequestState } from "@package/enums/request-state"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Cancelling an In-Flight HTTP Request Shows a Cancellation Message and a Later Request Still Succeeds", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/chained-response-tag.spec.ts b/packages/insomnia-test/tests/http-request/chained-response-tag.spec.ts index ad9834c0f7..8617983480 100644 --- a/packages/insomnia-test/tests/http-request/chained-response-tag.spec.ts +++ b/packages/insomnia-test/tests/http-request/chained-response-tag.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const bodyJsonPathFilter = "b64::JC5kYXRh::46b"; diff --git a/packages/insomnia-test/tests/http-request/custom-ca-root-certificate.spec.ts b/packages/insomnia-test/tests/http-request/custom-ca-root-certificate.spec.ts index 7f2097cf22..7db107a3d8 100644 --- a/packages/insomnia-test/tests/http-request/custom-ca-root-certificate.spec.ts +++ b/packages/insomnia-test/tests/http-request/custom-ca-root-certificate.spec.ts @@ -1,13 +1,12 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { certPath } from "@package/misc/certs"; import { DEFAULT_TIMEOUT, HTTP_SERVER_CUSTOM_CA_HTTPS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER_CUSTOM_CA_HTTPS}/post`; diff --git a/packages/insomnia-test/tests/http-request/folder-level-replace-in-utility.spec.ts b/packages/insomnia-test/tests/http-request/folder-level-replace-in-utility.spec.ts index 479b055e02..fba91beab0 100644 --- a/packages/insomnia-test/tests/http-request/folder-level-replace-in-utility.spec.ts +++ b/packages/insomnia-test/tests/http-request/folder-level-replace-in-utility.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/generate-code-target-client-switch.spec.ts b/packages/insomnia-test/tests/http-request/generate-code-target-client-switch.spec.ts index 964c61b3b5..77ce9ae65f 100644 --- a/packages/insomnia-test/tests/http-request/generate-code-target-client-switch.spec.ts +++ b/packages/insomnia-test/tests/http-request/generate-code-target-client-switch.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/get`; diff --git a/packages/insomnia-test/tests/http-request/generate-code.spec.ts b/packages/insomnia-test/tests/http-request/generate-code.spec.ts index dbeec52e5c..d45399be88 100644 --- a/packages/insomnia-test/tests/http-request/generate-code.spec.ts +++ b/packages/insomnia-test/tests/http-request/generate-code.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/import-params-from-url-http.spec.ts b/packages/insomnia-test/tests/http-request/import-params-from-url-http.spec.ts index c685a94c89..3abfad881d 100644 --- a/packages/insomnia-test/tests/http-request/import-params-from-url-http.spec.ts +++ b/packages/insomnia-test/tests/http-request/import-params-from-url-http.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Import from URL Moves Query String Into Params and Preserves It on Send", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/ipv6-local-address.spec.ts b/packages/insomnia-test/tests/http-request/ipv6-local-address.spec.ts index 48b4e3254d..2f0c3baffb 100644 --- a/packages/insomnia-test/tests/http-request/ipv6-local-address.spec.ts +++ b/packages/insomnia-test/tests/http-request/ipv6-local-address.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = "http://[::1]:4060/post"; diff --git a/packages/insomnia-test/tests/http-request/key-value-editor-blank-row.spec.ts b/packages/insomnia-test/tests/http-request/key-value-editor-blank-row.spec.ts index 5c56114809..d932deb54a 100644 --- a/packages/insomnia-test/tests/http-request/key-value-editor-blank-row.spec.ts +++ b/packages/insomnia-test/tests/http-request/key-value-editor-blank-row.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Trailing Blank Row In Headers And Params Is Not Persisted Until Typed Into", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/liquid-template-isolation.spec.ts b/packages/insomnia-test/tests/http-request/liquid-template-isolation.spec.ts index 53f967a996..1869e974fb 100644 --- a/packages/insomnia-test/tests/http-request/liquid-template-isolation.spec.ts +++ b/packages/insomnia-test/tests/http-request/liquid-template-isolation.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -9,6 +7,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/mtls-client-certificate.spec.ts b/packages/insomnia-test/tests/http-request/mtls-client-certificate.spec.ts index d87240b186..e299704b91 100644 --- a/packages/insomnia-test/tests/http-request/mtls-client-certificate.spec.ts +++ b/packages/insomnia-test/tests/http-request/mtls-client-certificate.spec.ts @@ -1,14 +1,13 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { certPath } from "@package/misc/certs"; import { DEFAULT_TIMEOUT, HTTP_SERVER_MTLS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER_MTLS}/post`; diff --git a/packages/insomnia-test/tests/http-request/oauth1-authentication.spec.ts b/packages/insomnia-test/tests/http-request/oauth1-authentication.spec.ts index 28d566dd65..2bbf6b03ba 100644 --- a/packages/insomnia-test/tests/http-request/oauth1-authentication.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth1-authentication.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { AuthTypeOAuth1 } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify OAuth 1.0 auth fields persist and sign the sent request", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/oauth2-authorization-code-pkce.spec.ts b/packages/insomnia-test/tests/http-request/oauth2-authorization-code-pkce.spec.ts index b12e7c0555..e57645cb64 100644 --- a/packages/insomnia-test/tests/http-request/oauth2-authorization-code-pkce.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth2-authorization-code-pkce.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { AuthTypeOAuth2 } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; for (const pkceMethod of ["S256", "plain"] as const) { test(`Verify Authorization Code grant with PKCE (${pkceMethod}) is verified server-side and authorizes the sent request`, async ({ diff --git a/packages/insomnia-test/tests/http-request/oauth2-authorization-code.spec.ts b/packages/insomnia-test/tests/http-request/oauth2-authorization-code.spec.ts index ec07a503ec..3406ab1206 100644 --- a/packages/insomnia-test/tests/http-request/oauth2-authorization-code.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth2-authorization-code.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { AuthTypeOAuth2 } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Authorization Code grant fetches tokens via a popup and authorizes the sent request", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/oauth2-client-credentials.spec.ts b/packages/insomnia-test/tests/http-request/oauth2-client-credentials.spec.ts index def36c817d..9daadff8c4 100644 --- a/packages/insomnia-test/tests/http-request/oauth2-client-credentials.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth2-client-credentials.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { AuthTypeOAuth2 } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Client Credentials grant fetches tokens with no popup and authorizes the sent request", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/oauth2-folder-inherited-auth.spec.ts b/packages/insomnia-test/tests/http-request/oauth2-folder-inherited-auth.spec.ts index ecf6ac5ccf..65caeec89e 100644 --- a/packages/insomnia-test/tests/http-request/oauth2-folder-inherited-auth.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth2-folder-inherited-auth.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { AuthType } from "@package/enums/auth-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -8,6 +6,7 @@ import { OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from "@pa import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify a request set to Inherit from parent picks up its folder's OAuth 2.0 authentication", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/oauth2-implicit.spec.ts b/packages/insomnia-test/tests/http-request/oauth2-implicit.spec.ts index 6e93c3a801..d2265168cf 100644 --- a/packages/insomnia-test/tests/http-request/oauth2-implicit.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth2-implicit.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { OAUTH2_CLIENT_ID, OAUTH2_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { AuthTypeOAuth2 } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Implicit grant with response type ID Token fetches only an identity token", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/oauth2-password.spec.ts b/packages/insomnia-test/tests/http-request/oauth2-password.spec.ts index f33e1c3106..edcbb85c64 100644 --- a/packages/insomnia-test/tests/http-request/oauth2-password.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth2-password.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_PASSWORD, OAUTH2_SERVER, OAUTH2_USERNAME, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { AuthTypeOAuth2 } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Resource Owner Password Credentials grant fetches tokens with no popup and authorizes the sent request", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/oauth2-token-refresh-clear.spec.ts b/packages/insomnia-test/tests/http-request/oauth2-token-refresh-clear.spec.ts index 01b4b32779..7946749ebf 100644 --- a/packages/insomnia-test/tests/http-request/oauth2-token-refresh-clear.spec.ts +++ b/packages/insomnia-test/tests/http-request/oauth2-token-refresh-clear.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { AuthTypeOAuth2 } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify refreshing an existing OAuth 2.0 token issues a new access token without reopening the authorization window", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-async-completion.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-async-completion.spec.ts index 78f46f566c..c4688ea4a9 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-async-completion.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-async-completion.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-client-certificate-update.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-client-certificate-update.spec.ts index 81aa294c8e..6bd2c0d0c8 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-client-certificate-update.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-client-certificate-update.spec.ts @@ -1,14 +1,13 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { certPath } from "@package/misc/certs"; import { DEFAULT_TIMEOUT, HTTP_SERVER_MTLS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER_MTLS}/post`; diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-cookies.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-cookies.spec.ts index 20919aec1b..af5eaae532 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-cookies.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-cookies.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify pre-request script manages cookies via insomnia.cookies.jar() and they are sent with the request', async ({ user, diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-custom-error.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-custom-error.spec.ts index 307306cbc4..1eb3d22c57 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-custom-error.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-custom-error.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-environment-variables.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-environment-variables.spec.ts index 5326225d7c..c717c08310 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-environment-variables.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-environment-variables.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-eval-and-modules.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-eval-and-modules.spec.ts index a84a144056..37fbdcd03d 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-eval-and-modules.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-eval-and-modules.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-proxy-update.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-proxy-update.spec.ts index c4428ab95d..7faab81c18 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-proxy-update.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-proxy-update.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-request-manipulation.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-request-manipulation.spec.ts index 0b28ae5f31..f783bc9383 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-request-manipulation.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-request-manipulation.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/pre-request-script-send-request-body-modes.spec.ts b/packages/insomnia-test/tests/http-request/pre-request-script-send-request-body-modes.spec.ts index ac116f01ae..f8d1a0af17 100644 --- a/packages/insomnia-test/tests/http-request/pre-request-script-send-request-body-modes.spec.ts +++ b/packages/insomnia-test/tests/http-request/pre-request-script-send-request-body-modes.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/query-method.spec.ts b/packages/insomnia-test/tests/http-request/query-method.spec.ts index b2c595475a..1b1e59aa98 100644 --- a/packages/insomnia-test/tests/http-request/query-method.spec.ts +++ b/packages/insomnia-test/tests/http-request/query-method.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -9,6 +7,7 @@ import { Collection } from "@package/models/collection"; import type { CurlCommand } from "@package/models/curl-command"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const body = `{"title": "${faker.string.alphanumeric(8)}"}`; diff --git a/packages/insomnia-test/tests/http-request/query-params-transformed-correctly.spec.ts b/packages/insomnia-test/tests/http-request/query-params-transformed-correctly.spec.ts index b14dd5ae0b..5e08c18fbb 100644 --- a/packages/insomnia-test/tests/http-request/query-params-transformed-correctly.spec.ts +++ b/packages/insomnia-test/tests/http-request/query-params-transformed-correctly.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify query params from the URL, template tags, and the Parameters tab are merged and special characters are escaped correctly", async ({ user, diff --git a/packages/insomnia-test/tests/http-request/replace-in-synchronous-behavior.spec.ts b/packages/insomnia-test/tests/http-request/replace-in-synchronous-behavior.spec.ts index 18cc6877cd..84ed3fe7af 100644 --- a/packages/insomnia-test/tests/http-request/replace-in-synchronous-behavior.spec.ts +++ b/packages/insomnia-test/tests/http-request/replace-in-synchronous-behavior.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/http-request/response-downloads.spec.ts b/packages/insomnia-test/tests/http-request/response-downloads.spec.ts index 4400195637..3c9c74ba9f 100644 --- a/packages/insomnia-test/tests/http-request/response-downloads.spec.ts +++ b/packages/insomnia-test/tests/http-request/response-downloads.spec.ts @@ -3,14 +3,13 @@ import os from "node:os"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { ResponseExportOption } from "@package/enums/response-export-option"; import { DEFAULT_TIMEOUT, HTTP_SERVER, LONG_TIMEOUT, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const LARGE_RESPONSE_BYTES = 5 * 1024 * 1024; diff --git a/packages/insomnia-test/tests/konnect/configure-and-sync.spec.ts b/packages/insomnia-test/tests/konnect/configure-and-sync.spec.ts index 49b3d264f0..50233f3f78 100644 --- a/packages/insomnia-test/tests/konnect/configure-and-sync.spec.ts +++ b/packages/insomnia-test/tests/konnect/configure-and-sync.spec.ts @@ -1,7 +1,6 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { DEFAULT_TIMEOUT, setKonnectEntitlement, test } from '@package/misc/fixtures'; +import { expect } from "@playwright/test"; test.beforeAll(async () => { await setKonnectEntitlement(true); diff --git a/packages/insomnia-test/tests/konnect/hidden-via-feature-flag.spec.ts b/packages/insomnia-test/tests/konnect/hidden-via-feature-flag.spec.ts index a605b6e4d0..9a3365d5ed 100644 --- a/packages/insomnia-test/tests/konnect/hidden-via-feature-flag.spec.ts +++ b/packages/insomnia-test/tests/konnect/hidden-via-feature-flag.spec.ts @@ -1,6 +1,5 @@ -import { expect } from "@playwright/test"; - import { setKonnectEntitlement, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test.afterEach(async () => { await setKonnectEntitlement(false); diff --git a/packages/insomnia-test/tests/mcp-client/api-key-authentication.spec.ts b/packages/insomnia-test/tests/mcp-client/api-key-authentication.spec.ts index 6f92c279fc..3d55d32787 100644 --- a/packages/insomnia-test/tests/mcp-client/api-key-authentication.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/api-key-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, MCP_SERVER, test } from '@package/misc/fixtures'; import { McpClient } from '@package/models/mcp-client'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify MCP Client Sends the API Key Header Only When Authentication Is Configured', async ({ user }) => { const { mcpClientFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/mcp-client/basic-authentication.spec.ts b/packages/insomnia-test/tests/mcp-client/basic-authentication.spec.ts index 4f40c5ef3b..d18e7279eb 100644 --- a/packages/insomnia-test/tests/mcp-client/basic-authentication.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/basic-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, MCP_SERVER, test } from '@package/misc/fixtures'; import { McpClient } from '@package/models/mcp-client'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify MCP Client Sends the Basic Authentication Header Only When Authentication Is Configured', async ({ user, diff --git a/packages/insomnia-test/tests/mcp-client/bearer-authentication.spec.ts b/packages/insomnia-test/tests/mcp-client/bearer-authentication.spec.ts index 434e74da50..f4bf479d35 100644 --- a/packages/insomnia-test/tests/mcp-client/bearer-authentication.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/bearer-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, MCP_SERVER, test } from "@package/misc/fixtures"; import { McpClient } from "@package/models/mcp-client"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify MCP Client Sends the Bearer Token Header Only When Authentication Is Configured", async ({ user, diff --git a/packages/insomnia-test/tests/mcp-client/disconnect-and-reconnect.spec.ts b/packages/insomnia-test/tests/mcp-client/disconnect-and-reconnect.spec.ts index 6bf47fec92..e317137bf4 100644 --- a/packages/insomnia-test/tests/mcp-client/disconnect-and-reconnect.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/disconnect-and-reconnect.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, MCP_SERVER, test } from "@package/misc/fixtures"; import { McpClient } from "@package/models/mcp-client"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Disconnecting an MCP Client Closes the Connection and It Can Reconnect", async ({ user, diff --git a/packages/insomnia-test/tests/mcp-client/environment-variable-in-url.spec.ts b/packages/insomnia-test/tests/mcp-client/environment-variable-in-url.spec.ts index 607ab5b76e..e49759aef9 100644 --- a/packages/insomnia-test/tests/mcp-client/environment-variable-in-url.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/environment-variable-in-url.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, MCP_SERVER, test } from "@package/misc/fixtures"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { McpClient } from "@package/models/mcp-client"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Environment Variable in MCP Client URL Is Resolved", async ({ user, diff --git a/packages/insomnia-test/tests/mcp-client/happy-path.spec.ts b/packages/insomnia-test/tests/mcp-client/happy-path.spec.ts index d3301f9c92..62ed04bddd 100644 --- a/packages/insomnia-test/tests/mcp-client/happy-path.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/happy-path.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, MCP_SERVER, test } from "@package/misc/fixtures"; import { McpClient } from "@package/models/mcp-client"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const mcpUrl = MCP_SERVER; const tool = "read_wiki_structure"; diff --git a/packages/insomnia-test/tests/mcp-client/oauth2-client-credentials-authentication.spec.ts b/packages/insomnia-test/tests/mcp-client/oauth2-client-credentials-authentication.spec.ts index b8010c86fd..5b587653ca 100644 --- a/packages/insomnia-test/tests/mcp-client/oauth2-client-credentials-authentication.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/oauth2-client-credentials-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, MCP_SERVER, OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, OAUTH2_SERVER, test } from '@package/misc/fixtures'; import { McpClient } from '@package/models/mcp-client'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify MCP Client Sends the OAuth 2.0 Header Only When Authentication Is Configured', async ({ user }) => { const { mcpClientFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/mcp-client/proxy-settings.spec.ts b/packages/insomnia-test/tests/mcp-client/proxy-settings.spec.ts index eee641ee5d..56fc7522dd 100644 --- a/packages/insomnia-test/tests/mcp-client/proxy-settings.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/proxy-settings.spec.ts @@ -4,12 +4,11 @@ import * as net from "node:net"; import type { Duplex } from "node:stream"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { MCP_SERVER, test } from "@package/misc/fixtures"; import { McpClient } from "@package/models/mcp-client"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const startRecordingProxy = async () => { const targets: string[] = []; diff --git a/packages/insomnia-test/tests/mcp-client/tls-connection.spec.ts b/packages/insomnia-test/tests/mcp-client/tls-connection.spec.ts index 6ffade8b84..94fbd6f5bf 100644 --- a/packages/insomnia-test/tests/mcp-client/tls-connection.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/tls-connection.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { certPath } from "@package/misc/certs"; import { MCP_SERVER_HTTPS, test } from "@package/misc/fixtures"; import { McpClient } from "@package/models/mcp-client"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify MCP Client Over a TLS Connection", async ({ user }) => { const { certificatesFlow, mcpClientFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/mcp-client/unreachable-server.spec.ts b/packages/insomnia-test/tests/mcp-client/unreachable-server.spec.ts index 80af5f99cc..6c695fe391 100644 --- a/packages/insomnia-test/tests/mcp-client/unreachable-server.spec.ts +++ b/packages/insomnia-test/tests/mcp-client/unreachable-server.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test } from "@package/misc/fixtures"; import { McpClient } from "@package/models/mcp-client"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const unreachableUrl = "http://localhost:1/mcp"; diff --git a/packages/insomnia-test/tests/migration/git-repo-onboarding.spec.ts b/packages/insomnia-test/tests/migration/git-repo-onboarding.spec.ts index 801c85a3a4..98ecad9be7 100644 --- a/packages/insomnia-test/tests/migration/git-repo-onboarding.spec.ts +++ b/packages/insomnia-test/tests/migration/git-repo-onboarding.spec.ts @@ -1,9 +1,8 @@ import * as fs from "node:fs"; import path from "node:path"; -import { expect } from "@playwright/test"; - import { DEFAULT_TIMEOUT, LONG_TIMEOUT, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; const testWithPendingGitMigration = test.extend({ dataPath: async ({ dataPath }, use) => { diff --git a/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-db-migration.spec.ts b/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-db-migration.spec.ts index 826bbe6b07..21c7944452 100644 --- a/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-db-migration.spec.ts +++ b/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-db-migration.spec.ts @@ -1,9 +1,8 @@ import * as fs from "node:fs"; import path from "node:path"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; const LEGACY_DB_DIR = path.join(import.meta.dirname, "insomnia-legacy-db"); diff --git a/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-unit-tests-default-on.spec.ts b/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-unit-tests-default-on.spec.ts index a649c95cd4..4f1e4df262 100644 --- a/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-unit-tests-default-on.spec.ts +++ b/packages/insomnia-test/tests/migration/legacy-db-migration/legacy-unit-tests-default-on.spec.ts @@ -1,9 +1,8 @@ import * as fs from "node:fs"; import path from "node:path"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; const LEGACY_DB_DIR = path.join(import.meta.dirname, "insomnia-legacy-db"); diff --git a/packages/insomnia-test/tests/mock-server/auto-push.spec.ts b/packages/insomnia-test/tests/mock-server/auto-push.spec.ts index 702434abe2..3e23bf5728 100644 --- a/packages/insomnia-test/tests/mock-server/auto-push.spec.ts +++ b/packages/insomnia-test/tests/mock-server/auto-push.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { MockBodyType } from "@package/enums/mock-body-type"; import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Edited Mock Route Status And Body Are Pushed To The Mock Server Without Testing", async ({ user, diff --git a/packages/insomnia-test/tests/mock-server/create-mock-server.spec.ts b/packages/insomnia-test/tests/mock-server/create-mock-server.spec.ts index e9b0a1aa40..4c20a677a3 100644 --- a/packages/insomnia-test/tests/mock-server/create-mock-server.spec.ts +++ b/packages/insomnia-test/tests/mock-server/create-mock-server.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Create Self-Hosted Mock Server", async ({ user }) => { const { mockServerFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/mock-server/create-route-from-response.spec.ts b/packages/insomnia-test/tests/mock-server/create-route-from-response.spec.ts index d0499334b3..d8a36ab512 100644 --- a/packages/insomnia-test/tests/mock-server/create-route-from-response.spec.ts +++ b/packages/insomnia-test/tests/mock-server/create-route-from-response.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, MOCK_BIN_SOURCE_RESPONSE, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Creating A Mock Route From A Request Response", async ({ user, diff --git a/packages/insomnia-test/tests/mock-server/duplicate-mock-server.spec.ts b/packages/insomnia-test/tests/mock-server/duplicate-mock-server.spec.ts index c7842bfcbe..25f48d1fb1 100644 --- a/packages/insomnia-test/tests/mock-server/duplicate-mock-server.spec.ts +++ b/packages/insomnia-test/tests/mock-server/duplicate-mock-server.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Duplicating A Mock Server Keeps Its Routes", async ({ user }) => { const { mockServerFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/mock-server/export-import-mock-server.spec.ts b/packages/insomnia-test/tests/mock-server/export-import-mock-server.spec.ts index 6410364109..27b96dca6a 100644 --- a/packages/insomnia-test/tests/mock-server/export-import-mock-server.spec.ts +++ b/packages/insomnia-test/tests/mock-server/export-import-mock-server.spec.ts @@ -2,13 +2,12 @@ import * as os from "node:os"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { waitForExportedFile } from "@package/misc/export-file"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Exported Mock Server Can Be Imported Into Another Project", async ({ user, diff --git a/packages/insomnia-test/tests/mock-server/overwrite-route-from-response.spec.ts b/packages/insomnia-test/tests/mock-server/overwrite-route-from-response.spec.ts index 3da9b37e56..02a48a4aa3 100644 --- a/packages/insomnia-test/tests/mock-server/overwrite-route-from-response.spec.ts +++ b/packages/insomnia-test/tests/mock-server/overwrite-route-from-response.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { MockBodyType } from "@package/enums/mock-body-type"; import { ProjectType } from "@package/enums/project-types"; @@ -8,6 +6,7 @@ import { MOCK_BIN_SERVER, MOCK_BIN_SOURCE_RESPONSE, test } from "@package/misc/f import { Collection } from "@package/models/collection"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Overwriting A Mock Route With A Request Response", async ({ user, diff --git a/packages/insomnia-test/tests/mock-server/request-log.spec.ts b/packages/insomnia-test/tests/mock-server/request-log.spec.ts index 8e14a39fa5..8f4d0e545e 100644 --- a/packages/insomnia-test/tests/mock-server/request-log.spec.ts +++ b/packages/insomnia-test/tests/mock-server/request-log.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Mock Route History Logs Each Tested Request", async ({ user }) => { const { mockServerFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/mock-server/response-definition.spec.ts b/packages/insomnia-test/tests/mock-server/response-definition.spec.ts index b3cde874c4..5abc4dbd00 100644 --- a/packages/insomnia-test/tests/mock-server/response-definition.spec.ts +++ b/packages/insomnia-test/tests/mock-server/response-definition.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { MockBodyType } from "@package/enums/mock-body-type"; import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Mock Route Response Definition Is Returned By Test", async ({ user, diff --git a/packages/insomnia-test/tests/mock-server/route-crud.spec.ts b/packages/insomnia-test/tests/mock-server/route-crud.spec.ts index f3b7e8b4c5..b72a1c2b2a 100644 --- a/packages/insomnia-test/tests/mock-server/route-crud.spec.ts +++ b/packages/insomnia-test/tests/mock-server/route-crud.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Create, Edit and Delete Mock Routes", async ({ user }) => { const { mockServerFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/mock-server/test-endpoint.spec.ts b/packages/insomnia-test/tests/mock-server/test-endpoint.spec.ts index 658efa7bc3..d18ad13c5b 100644 --- a/packages/insomnia-test/tests/mock-server/test-endpoint.spec.ts +++ b/packages/insomnia-test/tests/mock-server/test-endpoint.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { MOCK_BIN_SERVER, test } from "@package/misc/fixtures"; import { MockServer } from "@package/models/mock-server"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Testing A Default Mock Route Returns 200 With No Body", async ({ user, diff --git a/packages/insomnia-test/tests/organization/invite-collaborators.spec.ts b/packages/insomnia-test/tests/organization/invite-collaborators.spec.ts index 1ad337c1bb..ea364641c5 100644 --- a/packages/insomnia-test/tests/organization/invite-collaborators.spec.ts +++ b/packages/insomnia-test/tests/organization/invite-collaborators.spec.ts @@ -1,8 +1,7 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { CollaboratorRole } from "@package/enums/collaborator-role"; import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify inviting collaborators by email and org member and changing a member's role", async ({ user, diff --git a/packages/insomnia-test/tests/plugin/bundled-plugins.spec.ts b/packages/insomnia-test/tests/plugin/bundled-plugins.spec.ts index 0c4ff1d59a..ae8099cddc 100644 --- a/packages/insomnia-test/tests/plugin/bundled-plugins.spec.ts +++ b/packages/insomnia-test/tests/plugin/bundled-plugins.spec.ts @@ -1,6 +1,5 @@ -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify the app's bundled plugins are reported by the plugin bridge and stay off the user-installed Plugins list", async ({ user, diff --git a/packages/insomnia-test/tests/plugin/context-menu-action-registration/collection-context-menu-action.spec.ts b/packages/insomnia-test/tests/plugin/context-menu-action-registration/collection-context-menu-action.spec.ts index 29c1ae8a13..483251d1d2 100644 --- a/packages/insomnia-test/tests/plugin/context-menu-action-registration/collection-context-menu-action.spec.ts +++ b/packages/insomnia-test/tests/plugin/context-menu-action-registration/collection-context-menu-action.spec.ts @@ -2,12 +2,11 @@ import * as fs from 'node:fs'; import path from 'node:path'; import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( "Verify a plugin's context-menu action shows the Collection's name and type in a modal", diff --git a/packages/insomnia-test/tests/plugin/context-menu-action-registration/request-context-menu-action.spec.ts b/packages/insomnia-test/tests/plugin/context-menu-action-registration/request-context-menu-action.spec.ts index cad19b41cf..13edbed107 100644 --- a/packages/insomnia-test/tests/plugin/context-menu-action-registration/request-context-menu-action.spec.ts +++ b/packages/insomnia-test/tests/plugin/context-menu-action-registration/request-context-menu-action.spec.ts @@ -2,14 +2,13 @@ import * as fs from 'node:fs'; import path from 'node:path'; import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import type { HttpRequest } from '@package/models/http-request'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( "Verify a plugin's context-menu action shows the target item's name and type in a modal", diff --git a/packages/insomnia-test/tests/plugin/plugin-bridge.spec.ts b/packages/insomnia-test/tests/plugin/plugin-bridge.spec.ts index c49fd0ef4f..f4f7dd1786 100644 --- a/packages/insomnia-test/tests/plugin/plugin-bridge.spec.ts +++ b/packages/insomnia-test/tests/plugin/plugin-bridge.spec.ts @@ -2,14 +2,13 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the plugin bridge executes request actions, surfaces thrown errors, and handles concurrent calls without cross-talk", async ({ user, diff --git a/packages/insomnia-test/tests/plugin/plugin-name-validation.spec.ts b/packages/insomnia-test/tests/plugin/plugin-name-validation.spec.ts index 1f1922427a..77c8055b14 100644 --- a/packages/insomnia-test/tests/plugin/plugin-name-validation.spec.ts +++ b/packages/insomnia-test/tests/plugin/plugin-name-validation.spec.ts @@ -1,7 +1,6 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify plugin name validation rejects invalid names and accepts a valid one", async ({ user, diff --git a/packages/insomnia-test/tests/plugin/script-sandbox-rule-toggles.spec.ts b/packages/insomnia-test/tests/plugin/script-sandbox-rule-toggles.spec.ts index dc1f4a530b..d429de75d0 100644 --- a/packages/insomnia-test/tests/plugin/script-sandbox-rule-toggles.spec.ts +++ b/packages/insomnia-test/tests/plugin/script-sandbox-rule-toggles.spec.ts @@ -1,7 +1,6 @@ -import { expect } from "@playwright/test"; - import { ScriptSandboxRuleGroup } from "@package/enums/script-sandbox-rule-group"; import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify Scripting tab rule-group sandbox toggles persist across reopening Preferences", async ({ user, diff --git a/packages/insomnia-test/tests/plugin/template-tag-sandbox-execution-context.spec.ts b/packages/insomnia-test/tests/plugin/template-tag-sandbox-execution-context.spec.ts index a3fd4acde9..51590e0de3 100644 --- a/packages/insomnia-test/tests/plugin/template-tag-sandbox-execution-context.spec.ts +++ b/packages/insomnia-test/tests/plugin/template-tag-sandbox-execution-context.spec.ts @@ -2,13 +2,12 @@ import * as fs from "node:fs"; import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify a plugin template tag runs in the QuickJS sandbox when enabled and in the main process when disabled", async ({ user, diff --git a/packages/insomnia-test/tests/preferences/ai-backend-settings.spec.ts b/packages/insomnia-test/tests/preferences/ai-backend-settings.spec.ts index 1d8a34b988..b6eabe7480 100644 --- a/packages/insomnia-test/tests/preferences/ai-backend-settings.spec.ts +++ b/packages/insomnia-test/tests/preferences/ai-backend-settings.spec.ts @@ -1,7 +1,6 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { MOCK_LLM_SERVER, test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify an LLM backend's config persists and can be activated then deactivated in AI Settings", async ({ user, diff --git a/packages/insomnia-test/tests/preferences/filter-responses-by-environment.spec.ts b/packages/insomnia-test/tests/preferences/filter-responses-by-environment.spec.ts index 361b25df27..cc04d3cb66 100644 --- a/packages/insomnia-test/tests/preferences/filter-responses-by-environment.spec.ts +++ b/packages/insomnia-test/tests/preferences/filter-responses-by-environment.spec.ts @@ -1,6 +1,5 @@ -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify the 'Filter responses by environment' preference persists across closing and reopening Preferences", async ({ user, diff --git a/packages/insomnia-test/tests/preferences/proxy-settings.spec.ts b/packages/insomnia-test/tests/preferences/proxy-settings.spec.ts index c2df42b1e3..8c8ddb30b1 100644 --- a/packages/insomnia-test/tests/preferences/proxy-settings.spec.ts +++ b/packages/insomnia-test/tests/preferences/proxy-settings.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify enabling an HTTP/HTTPS proxy routes outgoing requests through it", async ({ user, diff --git a/packages/insomnia-test/tests/preferences/vault-key-generation.spec.ts b/packages/insomnia-test/tests/preferences/vault-key-generation.spec.ts index a9ad3a9634..ed954f1bf7 100644 --- a/packages/insomnia-test/tests/preferences/vault-key-generation.spec.ts +++ b/packages/insomnia-test/tests/preferences/vault-key-generation.spec.ts @@ -1,6 +1,5 @@ -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; test("Verify a new vault key can be generated and persists across reopening Preferences", async ({ user, diff --git a/packages/insomnia-test/tests/preferences/vault-key-reset-and-invalid-key.spec.ts b/packages/insomnia-test/tests/preferences/vault-key-reset-and-invalid-key.spec.ts index 7a475d4d5f..c502eeaa64 100644 --- a/packages/insomnia-test/tests/preferences/vault-key-reset-and-invalid-key.spec.ts +++ b/packages/insomnia-test/tests/preferences/vault-key-reset-and-invalid-key.spec.ts @@ -1,8 +1,7 @@ import * as crypto from "node:crypto"; -import { expect } from "@playwright/test"; - import { test } from "@package/misc/fixtures"; +import { expect } from "@playwright/test"; const testWithVaultSalt = test.extend({ vaultSalt: async ({}, use) => { diff --git a/packages/insomnia-test/tests/runner/bail-stops-on-error.spec.ts b/packages/insomnia-test/tests/runner/bail-stops-on-error.spec.ts index 5cc925371a..24f5a7a7d3 100644 --- a/packages/insomnia-test/tests/runner/bail-stops-on-error.spec.ts +++ b/packages/insomnia-test/tests/runner/bail-stops-on-error.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const brokenUrl = `${HTTP_SERVER}/post?x={% nosuchtag %}`; diff --git a/packages/insomnia-test/tests/runner/cancel-and-skip-run.spec.ts b/packages/insomnia-test/tests/runner/cancel-and-skip-run.spec.ts index 4e2d06de5b..98593331db 100644 --- a/packages/insomnia-test/tests/runner/cancel-and-skip-run.spec.ts +++ b/packages/insomnia-test/tests/runner/cancel-and-skip-run.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/runner/config-persists-after-reopen.spec.ts b/packages/insomnia-test/tests/runner/config-persists-after-reopen.spec.ts index 894dd24b93..7dcfa59e11 100644 --- a/packages/insomnia-test/tests/runner/config-persists-after-reopen.spec.ts +++ b/packages/insomnia-test/tests/runner/config-persists-after-reopen.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const iterations = 5; diff --git a/packages/insomnia-test/tests/runner/cross-request-variable-read.spec.ts b/packages/insomnia-test/tests/runner/cross-request-variable-read.spec.ts index 9d1b13ea2d..c0ecfa92d6 100644 --- a/packages/insomnia-test/tests/runner/cross-request-variable-read.spec.ts +++ b/packages/insomnia-test/tests/runner/cross-request-variable-read.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/runner/delay-between-requests.spec.ts b/packages/insomnia-test/tests/runner/delay-between-requests.spec.ts index 52bd1fba14..f8e894c469 100644 --- a/packages/insomnia-test/tests/runner/delay-between-requests.spec.ts +++ b/packages/insomnia-test/tests/runner/delay-between-requests.spec.ts @@ -1,11 +1,10 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const delay = 1000; diff --git a/packages/insomnia-test/tests/runner/happy-path.spec.ts b/packages/insomnia-test/tests/runner/happy-path.spec.ts index 35a796a75e..ba47ad4161 100644 --- a/packages/insomnia-test/tests/runner/happy-path.spec.ts +++ b/packages/insomnia-test/tests/runner/happy-path.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const unreachableUrl = "http://localhost:59999/nope"; diff --git a/packages/insomnia-test/tests/runner/set-next-request-skips-forward.spec.ts b/packages/insomnia-test/tests/runner/set-next-request-skips-forward.spec.ts index 4703b3879d..6cc4c1c8ab 100644 --- a/packages/insomnia-test/tests/runner/set-next-request-skips-forward.spec.ts +++ b/packages/insomnia-test/tests/runner/set-next-request-skips-forward.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const iterations = 2; diff --git a/packages/insomnia-test/tests/runner/upload-data-csv-edge-cases/upload-data-csv-edge-cases.spec.ts b/packages/insomnia-test/tests/runner/upload-data-csv-edge-cases/upload-data-csv-edge-cases.spec.ts index ed3c9d0b33..d2271034a4 100644 --- a/packages/insomnia-test/tests/runner/upload-data-csv-edge-cases/upload-data-csv-edge-cases.spec.ts +++ b/packages/insomnia-test/tests/runner/upload-data-csv-edge-cases/upload-data-csv-edge-cases.spec.ts @@ -1,13 +1,12 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/runner/upload-data-driven-iteration/upload-data-driven-iteration.spec.ts b/packages/insomnia-test/tests/runner/upload-data-driven-iteration/upload-data-driven-iteration.spec.ts index d7fb39aae6..ac8c02cc6c 100644 --- a/packages/insomnia-test/tests/runner/upload-data-driven-iteration/upload-data-driven-iteration.spec.ts +++ b/packages/insomnia-test/tests/runner/upload-data-driven-iteration/upload-data-driven-iteration.spec.ts @@ -1,13 +1,12 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; const dataFilePath = path.join(import.meta.dirname, "runner-data.json"); diff --git a/packages/insomnia-test/tests/socket-io-request/disconnect-before-server-reply.spec.ts b/packages/insomnia-test/tests/socket-io-request/disconnect-before-server-reply.spec.ts index 8bd328a298..c9f1378c20 100644 --- a/packages/insomnia-test/tests/socket-io-request/disconnect-before-server-reply.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/disconnect-before-server-reply.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, SOCKET_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Disconnecting a Socket.IO Request Before the Server Replies Delivers No Echo", async ({ user, diff --git a/packages/insomnia-test/tests/socket-io-request/duplicate-request.spec.ts b/packages/insomnia-test/tests/socket-io-request/duplicate-request.spec.ts index c0ab347cb4..748128b8e7 100644 --- a/packages/insomnia-test/tests/socket-io-request/duplicate-request.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/duplicate-request.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { SOCKET_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const message = { eventName: "hello", payload: '"world"' }; diff --git a/packages/insomnia-test/tests/socket-io-request/happy-path.spec.ts b/packages/insomnia-test/tests/socket-io-request/happy-path.spec.ts index 988e514c8d..99fed7e0e4 100644 --- a/packages/insomnia-test/tests/socket-io-request/happy-path.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/happy-path.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, SOCKET_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; import type { SocketIORequest } from "@package/models/socket-io-request"; +import { expect } from "@playwright/test"; const socketIoUrl = SOCKET_SERVER; const message = { eventName: "hello", payload: '"world"' }; diff --git a/packages/insomnia-test/tests/socket-io-request/proxy-settings.spec.ts b/packages/insomnia-test/tests/socket-io-request/proxy-settings.spec.ts index ad29585f69..08b5f09ace 100644 --- a/packages/insomnia-test/tests/socket-io-request/proxy-settings.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/proxy-settings.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, SOCKET_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Enabling an Unreachable Proxy Fails the Socket.IO Connection", async ({ user, diff --git a/packages/insomnia-test/tests/socket-io-request/template-tag-in-message.spec.ts b/packages/insomnia-test/tests/socket-io-request/template-tag-in-message.spec.ts index 3d1a5809ed..6c7c1b9791 100644 --- a/packages/insomnia-test/tests/socket-io-request/template-tag-in-message.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/template-tag-in-message.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, SOCKET_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Template Tag in Socket.IO Message Payload Is Resolved", async ({ user, diff --git a/packages/insomnia-test/tests/socket-io-request/tls-connection.spec.ts b/packages/insomnia-test/tests/socket-io-request/tls-connection.spec.ts index 313f81cc45..6450be91bd 100644 --- a/packages/insomnia-test/tests/socket-io-request/tls-connection.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/tls-connection.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { certPath } from "@package/misc/certs"; import { DEFAULT_TIMEOUT, SOCKET_SERVER_WSS, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Socket.IO Request Over a TLS Connection", async ({ user }) => { const { certificatesFlow, socketIoRequestFlow, workspaceFlow } = diff --git a/packages/insomnia-test/tests/socket-io-request/token-authentication.spec.ts b/packages/insomnia-test/tests/socket-io-request/token-authentication.spec.ts index 030a6f7b9e..7540f8dcf4 100644 --- a/packages/insomnia-test/tests/socket-io-request/token-authentication.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/token-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, SOCKET_SERVER_AUTH_TOKEN, SOCKET_SERVER_PROTECTED, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Socket.IO Handshake Is Accepted With the Token and Rejected Without It", async ({ user, diff --git a/packages/insomnia-test/tests/socket-io-request/unreachable-server.spec.ts b/packages/insomnia-test/tests/socket-io-request/unreachable-server.spec.ts index 0fabfce3c9..b93c648663 100644 --- a/packages/insomnia-test/tests/socket-io-request/unreachable-server.spec.ts +++ b/packages/insomnia-test/tests/socket-io-request/unreachable-server.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Connecting to an Unreachable Socket.IO Server Fails", async ({ user, diff --git a/packages/insomnia-test/tests/template-tag/cookie-tag-reads-linked-cookie.spec.ts b/packages/insomnia-test/tests/template-tag/cookie-tag-reads-linked-cookie.spec.ts index 43030af331..f5344b4d1b 100644 --- a/packages/insomnia-test/tests/template-tag/cookie-tag-reads-linked-cookie.spec.ts +++ b/packages/insomnia-test/tests/template-tag/cookie-tag-reads-linked-cookie.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the cookie Tag Reads a Value from a Linked Cookie", async ({ user, diff --git a/packages/insomnia-test/tests/template-tag/edit-existing-tag-argument.spec.ts b/packages/insomnia-test/tests/template-tag/edit-existing-tag-argument.spec.ts index 68732c52da..7111a018f1 100644 --- a/packages/insomnia-test/tests/template-tag/edit-existing-tag-argument.spec.ts +++ b/packages/insomnia-test/tests/template-tag/edit-existing-tag-argument.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Switching an Existing Tag's Argument Updates its Live Preview", async ({ user, diff --git a/packages/insomnia-test/tests/template-tag/external-vault-credentials.spec.ts b/packages/insomnia-test/tests/template-tag/external-vault-credentials.spec.ts index eba079e785..34ec0ead41 100644 --- a/packages/insomnia-test/tests/template-tag/external-vault-credentials.spec.ts +++ b/packages/insomnia-test/tests/template-tag/external-vault-credentials.spec.ts @@ -1,7 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; -import type { AWSCredentialType, HashiCorpCredentialType, HashiCorpVaultAuthMethod } from "insomnia-data"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -9,6 +6,8 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; +import type { AWSCredentialType, HashiCorpCredentialType, HashiCorpVaultAuthMethod } from "insomnia-data"; test("Verify AWS/GCP/HashiCorp Cloud Credentials Resolve via the Vault Template Tag", async ({ user, diff --git a/packages/insomnia-test/tests/template-tag/file-tag-reads-allowed-file/file-tag-reads-allowed-file.spec.ts b/packages/insomnia-test/tests/template-tag/file-tag-reads-allowed-file/file-tag-reads-allowed-file.spec.ts index d993ad6e05..afc0d2c506 100644 --- a/packages/insomnia-test/tests/template-tag/file-tag-reads-allowed-file/file-tag-reads-allowed-file.spec.ts +++ b/packages/insomnia-test/tests/template-tag/file-tag-reads-allowed-file/file-tag-reads-allowed-file.spec.ts @@ -1,13 +1,12 @@ import path from "node:path"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const filePath = path.join(import.meta.dirname, "fixture.txt"); diff --git a/packages/insomnia-test/tests/template-tag/happy-path.spec.ts b/packages/insomnia-test/tests/template-tag/happy-path.spec.ts index 0f2bef41fe..43e23aa1d9 100644 --- a/packages/insomnia-test/tests/template-tag/happy-path.spec.ts +++ b/packages/insomnia-test/tests/template-tag/happy-path.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Inserting a Template Tag and Reading its Live Preview", async ({ user, diff --git a/packages/insomnia-test/tests/template-tag/header-name-template-tag-resolves.spec.ts b/packages/insomnia-test/tests/template-tag/header-name-template-tag-resolves.spec.ts index aefb34f16d..4a041e3be6 100644 --- a/packages/insomnia-test/tests/template-tag/header-name-template-tag-resolves.spec.ts +++ b/packages/insomnia-test/tests/template-tag/header-name-template-tag-resolves.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify a Header With a Templated Name Resolves and Sends Correctly", async ({ user, diff --git a/packages/insomnia-test/tests/template-tag/header-templates.spec.ts b/packages/insomnia-test/tests/template-tag/header-templates.spec.ts index 6b4ea19546..bdb91f73e9 100644 --- a/packages/insomnia-test/tests/template-tag/header-templates.spec.ts +++ b/packages/insomnia-test/tests/template-tag/header-templates.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const url = `${HTTP_SERVER}/post`; diff --git a/packages/insomnia-test/tests/template-tag/prompt-tag-caches-value-until-cleared.spec.ts b/packages/insomnia-test/tests/template-tag/prompt-tag-caches-value-until-cleared.spec.ts index 8489f3ca5c..eeb8283f14 100644 --- a/packages/insomnia-test/tests/template-tag/prompt-tag-caches-value-until-cleared.spec.ts +++ b/packages/insomnia-test/tests/template-tag/prompt-tag-caches-value-until-cleared.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify a prompt Tag Caches its Value Under the Storage Key Until it is Cleared", async ({ user, diff --git a/packages/insomnia-test/tests/template-tag/response-tag-trigger-behaviors.spec.ts b/packages/insomnia-test/tests/template-tag/response-tag-trigger-behaviors.spec.ts index a672128820..adb82c6ed5 100644 --- a/packages/insomnia-test/tests/template-tag/response-tag-trigger-behaviors.spec.ts +++ b/packages/insomnia-test/tests/template-tag/response-tag-trigger-behaviors.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the response Tag's Trigger Behavior Controls When its Dependency Request is Resent", async ({ user, diff --git a/packages/insomnia-test/tests/web-socket-request/api-key-authentication.spec.ts b/packages/insomnia-test/tests/web-socket-request/api-key-authentication.spec.ts index d9fff13998..e01dd0eded 100644 --- a/packages/insomnia-test/tests/web-socket-request/api-key-authentication.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/api-key-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, test, WS_SERVER } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify WebSocket Connection Sends the API Key Header Until Authentication Is Set to None', async ({ user }) => { const { webSocketRequestFlow, workspaceFlow } = user.flowManager; diff --git a/packages/insomnia-test/tests/web-socket-request/basic-authentication.spec.ts b/packages/insomnia-test/tests/web-socket-request/basic-authentication.spec.ts index d5b6fc8f4b..ffc2a26033 100644 --- a/packages/insomnia-test/tests/web-socket-request/basic-authentication.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/basic-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { ProjectType } from '@package/enums/project-types'; import { DEFAULT_TIMEOUT, test, WS_SERVER } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test('Verify WebSocket Connection Sends the Basic Authentication Header Until Authentication Is Set to None', async ({ user, diff --git a/packages/insomnia-test/tests/web-socket-request/bearer-authentication.spec.ts b/packages/insomnia-test/tests/web-socket-request/bearer-authentication.spec.ts index ea1f7b6198..a5c28f71e5 100644 --- a/packages/insomnia-test/tests/web-socket-request/bearer-authentication.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/bearer-authentication.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify WebSocket Connection Sends the Bearer Token Header Until Authentication Is Set to None", async ({ user, diff --git a/packages/insomnia-test/tests/web-socket-request/cookie-sent-with-connection.spec.ts b/packages/insomnia-test/tests/web-socket-request/cookie-sent-with-connection.spec.ts index 823164a41b..cf45107e66 100644 --- a/packages/insomnia-test/tests/web-socket-request/cookie-sent-with-connection.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/cookie-sent-with-connection.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Linked Cookie Is Sent With WebSocket Connection", async ({ user, diff --git a/packages/insomnia-test/tests/web-socket-request/disconnect-before-server-reply.spec.ts b/packages/insomnia-test/tests/web-socket-request/disconnect-before-server-reply.spec.ts index 108620a8c4..d53a5d32b6 100644 --- a/packages/insomnia-test/tests/web-socket-request/disconnect-before-server-reply.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/disconnect-before-server-reply.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Disconnecting a WebSocket Request Before the Server Replies Delivers No Echo", async ({ user, diff --git a/packages/insomnia-test/tests/web-socket-request/environment-variable-in-url.spec.ts b/packages/insomnia-test/tests/web-socket-request/environment-variable-in-url.spec.ts index 699689a943..c6445bcaed 100644 --- a/packages/insomnia-test/tests/web-socket-request/environment-variable-in-url.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/environment-variable-in-url.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Environment Variable in WebSocket Request URL Is Resolved", async ({ user, diff --git a/packages/insomnia-test/tests/web-socket-request/happy-path.spec.ts b/packages/insomnia-test/tests/web-socket-request/happy-path.spec.ts index 2edbba7521..8e5cf0d4f4 100644 --- a/packages/insomnia-test/tests/web-socket-request/happy-path.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/happy-path.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const webSocketUrl = WS_SERVER; diff --git a/packages/insomnia-test/tests/web-socket-request/import-params-from-url-websocket.spec.ts b/packages/insomnia-test/tests/web-socket-request/import-params-from-url-websocket.spec.ts index 000c24603a..3e32bae9cd 100644 --- a/packages/insomnia-test/tests/web-socket-request/import-params-from-url-websocket.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/import-params-from-url-websocket.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Import from URL Moves Query String Into Params and Preserves It on Connect", async ({ user, diff --git a/packages/insomnia-test/tests/web-socket-request/proxy-settings.spec.ts b/packages/insomnia-test/tests/web-socket-request/proxy-settings.spec.ts index 26a4cb8a04..5b2779ea1e 100644 --- a/packages/insomnia-test/tests/web-socket-request/proxy-settings.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/proxy-settings.spec.ts @@ -4,12 +4,11 @@ import * as net from "node:net"; import type { Duplex } from "node:stream"; import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const startRecordingProxy = async () => { const targets: string[] = []; diff --git a/packages/insomnia-test/tests/web-socket-request/send-multiple-message-types.spec.ts b/packages/insomnia-test/tests/web-socket-request/send-multiple-message-types.spec.ts index cd21282c09..d7318fb1e2 100644 --- a/packages/insomnia-test/tests/web-socket-request/send-multiple-message-types.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/send-multiple-message-types.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const webSocketUrl = WS_SERVER; diff --git a/packages/insomnia-test/tests/web-socket-request/template-tag-in-header-and-message.spec.ts b/packages/insomnia-test/tests/web-socket-request/template-tag-in-header-and-message.spec.ts index fb87d3d4b8..4b80cbf457 100644 --- a/packages/insomnia-test/tests/web-socket-request/template-tag-in-header-and-message.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/template-tag-in-header-and-message.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContentType } from "@package/enums/content-type"; import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const tag = "{% base64 'encode', 'normal', 'abc' %}"; diff --git a/packages/insomnia-test/tests/web-socket-request/tls-connection.spec.ts b/packages/insomnia-test/tests/web-socket-request/tls-connection.spec.ts index 369a01ff29..7707b3b976 100644 --- a/packages/insomnia-test/tests/web-socket-request/tls-connection.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/tls-connection.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { DEFAULT_TIMEOUT, test, WS_SERVER_WSS } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify WebSocket Request Over a TLS Connection", async ({ user }) => { const { preferencesFlow, webSocketRequestFlow, workspaceFlow } = diff --git a/packages/insomnia-test/tests/web-socket-request/unresolved-environment-variable.spec.ts b/packages/insomnia-test/tests/web-socket-request/unresolved-environment-variable.spec.ts index fd608d1cd7..11bae147d1 100644 --- a/packages/insomnia-test/tests/web-socket-request/unresolved-environment-variable.spec.ts +++ b/packages/insomnia-test/tests/web-socket-request/unresolved-environment-variable.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test, WS_SERVER } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const variableName = "unlinked"; diff --git a/packages/insomnia-test/tests/workspace/auto-focus-rules.spec.ts b/packages/insomnia-test/tests/workspace/auto-focus-rules.spec.ts index 26b9c9f0d8..6adf9c9ce1 100644 --- a/packages/insomnia-test/tests/workspace/auto-focus-rules.spec.ts +++ b/packages/insomnia-test/tests/workspace/auto-focus-rules.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContextMenuItem } from "@package/enums/context-menu-items"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify adding a query parameter or header focuses the new row's Name cell", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/command-palette.spec.ts b/packages/insomnia-test/tests/workspace/command-palette.spec.ts index 68d364ae8d..6fd6de3b07 100644 --- a/packages/insomnia-test/tests/workspace/command-palette.spec.ts +++ b/packages/insomnia-test/tests/workspace/command-palette.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify command palette fuzzy-jumps between requests and collections", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/create-delete-while-offline.spec.ts b/packages/insomnia-test/tests/workspace/create-delete-while-offline.spec.ts index 6ec141138f..ad1ffcfa51 100644 --- a/packages/insomnia-test/tests/workspace/create-delete-while-offline.spec.ts +++ b/packages/insomnia-test/tests/workspace/create-delete-while-offline.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify collection/request create and delete persist correctly while offline", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-git.spec.ts b/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-git.spec.ts index 9ddddcfe45..ff7c475428 100644 --- a/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-git.spec.ts +++ b/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-git.spec.ts @@ -1,6 +1,4 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { TreeNodeType } from '@package/enums/tree-node-types'; @@ -8,6 +6,7 @@ import { HTTP_SERVER } from '@package/misc/fixtures'; import { GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( 'Verify dragging a request between a Cloud project and a Git project moves it in both directions', diff --git a/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-local.spec.ts b/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-local.spec.ts index 6ee98b9aec..730381196f 100644 --- a/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-local.spec.ts +++ b/packages/insomnia-test/tests/workspace/cross-project-drag-drop-cloud-local.spec.ts @@ -1,12 +1,11 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { TreeNodeType } from '@package/enums/tree-node-types'; import { HTTP_SERVER, test } from '@package/misc/fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( 'Verify dragging a request between a Cloud project and a Local project moves it in both directions', diff --git a/packages/insomnia-test/tests/workspace/cross-project-drag-drop-local-git.spec.ts b/packages/insomnia-test/tests/workspace/cross-project-drag-drop-local-git.spec.ts index e65912efeb..58ace72b68 100644 --- a/packages/insomnia-test/tests/workspace/cross-project-drag-drop-local-git.spec.ts +++ b/packages/insomnia-test/tests/workspace/cross-project-drag-drop-local-git.spec.ts @@ -1,6 +1,4 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { TreeNodeType } from '@package/enums/tree-node-types'; @@ -8,6 +6,7 @@ import { HTTP_SERVER } from '@package/misc/fixtures'; import { GIT_CREDENTIAL, test } from '@package/misc/git-fixtures'; import { Collection } from '@package/models/collection'; import { Project } from '@package/models/project'; +import { expect } from "@playwright/test"; test( 'Verify dragging a request between a Local project and a Git project moves it in both directions', diff --git a/packages/insomnia-test/tests/workspace/editor-undo-survives-tab-toggle.spec.ts b/packages/insomnia-test/tests/workspace/editor-undo-survives-tab-toggle.spec.ts index f99650529c..77be3b72e0 100644 --- a/packages/insomnia-test/tests/workspace/editor-undo-survives-tab-toggle.spec.ts +++ b/packages/insomnia-test/tests/workspace/editor-undo-survives-tab-toggle.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { ScriptTab } from "@package/enums/script-tab"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the Docs editor keeps undo history across a Write/Preview toggle", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/folder-keyboard-navigation.spec.ts b/packages/insomnia-test/tests/workspace/folder-keyboard-navigation.spec.ts index b75abc7197..024201c2e2 100644 --- a/packages/insomnia-test/tests/workspace/folder-keyboard-navigation.spec.ts +++ b/packages/insomnia-test/tests/workspace/folder-keyboard-navigation.spec.ts @@ -1,12 +1,11 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { TreeNodeType } from "@package/enums/tree-node-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify arrow keys expand and collapse a sidebar folder", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/happy-path.spec.ts b/packages/insomnia-test/tests/workspace/happy-path.spec.ts index 0aa50543a5..aa6548273f 100644 --- a/packages/insomnia-test/tests/workspace/happy-path.spec.ts +++ b/packages/insomnia-test/tests/workspace/happy-path.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection, Info, Specification } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify creating, renaming, duplicating, and deleting collections", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/no-document-creation-entry.spec.ts b/packages/insomnia-test/tests/workspace/no-document-creation-entry.spec.ts index bce1df986b..9497da0d30 100644 --- a/packages/insomnia-test/tests/workspace/no-document-creation-entry.spec.ts +++ b/packages/insomnia-test/tests/workspace/no-document-creation-entry.spec.ts @@ -1,10 +1,9 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContextMenuItem } from "@package/enums/context-menu-items"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the project row's creation context menu offers API Collection but no separate Document option", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/rename-and-delete-project.spec.ts b/packages/insomnia-test/tests/workspace/rename-and-delete-project.spec.ts index 3248d55250..60623ec3d3 100644 --- a/packages/insomnia-test/tests/workspace/rename-and-delete-project.spec.ts +++ b/packages/insomnia-test/tests/workspace/rename-and-delete-project.spec.ts @@ -1,9 +1,8 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify Renaming And Deleting A Project Via The Dashboard", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/request-pane-tab-order.spec.ts b/packages/insomnia-test/tests/workspace/request-pane-tab-order.spec.ts index fc0bee6c44..01defcc939 100644 --- a/packages/insomnia-test/tests/workspace/request-pane-tab-order.spec.ts +++ b/packages/insomnia-test/tests/workspace/request-pane-tab-order.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContextMenuItem } from "@package/enums/context-menu-items"; import { ProjectType } from "@package/enums/project-types"; import { test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify a freshly created request focuses the URL bar and Tab/arrow-key order flows through Send, its dropdown, and the request tabs", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-beside-folder.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-beside-folder.spec.ts index 05522bc94b..07fce2eb30 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-beside-folder.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-beside-folder.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { TreeNodeType } from "@package/enums/tree-node-types"; @@ -8,6 +6,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify dragging an item beside a folder does not land it inside the folder", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-empty-folder-placeholder.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-empty-folder-placeholder.spec.ts index 7f37690996..3401301026 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-empty-folder-placeholder.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-empty-folder-placeholder.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { TreeNodeType } from "@package/enums/tree-node-types"; @@ -9,6 +7,7 @@ import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; import type { TreeNode } from "@package/pages/workspace.page"; +import { expect } from "@playwright/test"; test("Verify dragging an item onto an empty folder's placeholder makes it that folder's child", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-into-folder.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-into-folder.spec.ts index 390f8c3380..ea2d192dc9 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-into-folder.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-into-folder.spec.ts @@ -1,6 +1,4 @@ import { faker } from '@faker-js/faker'; -import { expect } from "@playwright/test"; - import { HttpMethod } from '@package/enums/http-method'; import { ProjectType } from '@package/enums/project-types'; import { TreeNodeType } from '@package/enums/tree-node-types'; @@ -9,6 +7,7 @@ import { Collection } from '@package/models/collection'; import { Folder } from '@package/models/folder'; import { Project } from '@package/models/project'; import type { TreeNode } from '@package/pages/workspace.page'; +import { expect } from "@playwright/test"; const WINDOW_WIDTH = 1512; const WINDOW_HEIGHT = 859; diff --git a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-invalid-target.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-invalid-target.spec.ts index 17fcc3e18b..3b0b830096 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-invalid-target.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-invalid-target.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { TreeNodeType } from "@package/enums/tree-node-types"; @@ -8,6 +6,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify invalid drop targets are rejected and shown as invalid", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-nested-boundary.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-nested-boundary.spec.ts index 96857c4f6b..a03e719122 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-nested-boundary.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-nested-boundary.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { TreeNodeType } from "@package/enums/tree-node-types"; @@ -8,6 +6,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; const SCAN_OFFSETS_PX = [1, 5, 10, 20, 30, 45, 65, 90, 120, 160, 210, 270, 340]; diff --git a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-persists-across-views.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-persists-across-views.spec.ts index 4397b5ec39..15fc42cc24 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-drag-drop-persists-across-views.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-drag-drop-persists-across-views.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { TreeNodeType } from "@package/enums/tree-node-types"; @@ -8,6 +6,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify sidebar reorder behaves unchanged and persists across views when switching between the spec and request views", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-filter-and-pin.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-filter-and-pin.spec.ts index 8bcb3149da..390bff29db 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-filter-and-pin.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-filter-and-pin.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify sidebar filtering hides non-matching requests and pinning toggles from the context menu", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-focus-mode-onboarding.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-focus-mode-onboarding.spec.ts index aca56aac26..d234c3a566 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-focus-mode-onboarding.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-focus-mode-onboarding.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection, Info, Specification } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify the sidebar focus mode onboarding popover shows once and stays dismissed after a reload, and narrows/un-narrows the sidebar for a spec-carrying API Collection", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-settings-and-inline-rename.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-settings-and-inline-rename.spec.ts index 4a703ac4b7..0388988804 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-settings-and-inline-rename.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-settings-and-inline-rename.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { ContextMenuItem } from "@package/enums/context-menu-items"; import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; @@ -9,6 +7,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify per-node-type Settings dialogs and inline rename via the sidebar", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/sidebar-tree-hierarchy.spec.ts b/packages/insomnia-test/tests/workspace/sidebar-tree-hierarchy.spec.ts index c3cdfe88b9..63994f64eb 100644 --- a/packages/insomnia-test/tests/workspace/sidebar-tree-hierarchy.spec.ts +++ b/packages/insomnia-test/tests/workspace/sidebar-tree-hierarchy.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { TreeNodeType } from "@package/enums/tree-node-types"; @@ -8,6 +6,7 @@ import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection, Info, Specification } from "@package/models/collection"; import { Folder } from "@package/models/folder"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify requests and folders render as nested child rows under a spec-carrying API Collection", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/tabs-name-and-method-sync.spec.ts b/packages/insomnia-test/tests/workspace/tabs-name-and-method-sync.spec.ts index 0b356f6d70..3200f14b35 100644 --- a/packages/insomnia-test/tests/workspace/tabs-name-and-method-sync.spec.ts +++ b/packages/insomnia-test/tests/workspace/tabs-name-and-method-sync.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify a tab's label and method icon stay in sync with the underlying request, and its tab auto-closes when the request is deleted", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/tabs-open-pin-switch-close.spec.ts b/packages/insomnia-test/tests/workspace/tabs-open-pin-switch-close.spec.ts index 516537adc4..fcf4bb1065 100644 --- a/packages/insomnia-test/tests/workspace/tabs-open-pin-switch-close.spec.ts +++ b/packages/insomnia-test/tests/workspace/tabs-open-pin-switch-close.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify pinning, switching, closing, and adding tabs in the tab bar", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/url-bar-editor-characterization.spec.ts b/packages/insomnia-test/tests/workspace/url-bar-editor-characterization.spec.ts index ce30d67e7b..3ac21dd022 100644 --- a/packages/insomnia-test/tests/workspace/url-bar-editor-characterization.spec.ts +++ b/packages/insomnia-test/tests/workspace/url-bar-editor-characterization.spec.ts @@ -1,6 +1,4 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; @@ -8,6 +6,7 @@ import { Collection } from "@package/models/collection"; import { EnvironmentKvPairDataType } from "@package/models/environment"; import type { HttpRequest } from "@package/models/http-request"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify typing into the URL bar keeps focus and Cmd/Ctrl+Z undoes in place", async ({ user, diff --git a/packages/insomnia-test/tests/workspace/url-bar-undo-survives-tab-switch.spec.ts b/packages/insomnia-test/tests/workspace/url-bar-undo-survives-tab-switch.spec.ts index ca7f1806ea..5985edab77 100644 --- a/packages/insomnia-test/tests/workspace/url-bar-undo-survives-tab-switch.spec.ts +++ b/packages/insomnia-test/tests/workspace/url-bar-undo-survives-tab-switch.spec.ts @@ -1,11 +1,10 @@ import { faker } from "@faker-js/faker"; -import { expect } from "@playwright/test"; - import { HttpMethod } from "@package/enums/http-method"; import { ProjectType } from "@package/enums/project-types"; import { HTTP_SERVER, test } from "@package/misc/fixtures"; import { Collection } from "@package/models/collection"; import { Project } from "@package/models/project"; +import { expect } from "@playwright/test"; test("Verify URL bar edits and undo history survive switching tabs away and back", async ({ user,