Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize frontend tests #3350

Merged
merged 4 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr-chromatic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
cd deployment/docker_compose
ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=true \
AUTH_TYPE=basic \
GEN_AI_API_KEY=${{ secrets.OPENAI_API_KEY }} \
REQUIRE_EMAIL_VERIFICATION=false \
DISABLE_TELEMETRY=true \
IMAGE_TAG=test \
Expand Down
4 changes: 2 additions & 2 deletions backend/onyx/connectors/google_utils/shared_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class GoogleOAuthAuthenticationMethod(str, PyEnum):
MISSING_SCOPES_ERROR_STR = "client not authorized for any of the scopes requested"

# Documentation and error messages
SCOPE_DOC_URL = "https://docs.danswer.dev/connectors/google_drive/overview"
SCOPE_DOC_URL = "https://docs.onyx.app/connectors/google_drive/overview"
ONYX_SCOPE_INSTRUCTIONS = (
"You have upgraded Danswer without updating the Google Auth scopes. "
"You have upgraded Onyx without updating the Google Auth scopes. "
f"Please refer to the documentation to learn how to update the scopes: {SCOPE_DOC_URL}"
)

Expand Down
4 changes: 2 additions & 2 deletions backend/tests/daily/connectors/gmail/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def parse_credentials(env_str: str) -> dict:
@pytest.fixture
def google_gmail_oauth_connector_factory() -> Callable[..., GmailConnector]:
def _connector_factory(
primary_admin_email: str = "admin@danswer-test.com",
primary_admin_email: str = "admin@onyx-test.com",
) -> GmailConnector:
print("Creating GmailConnector with OAuth credentials")
connector = GmailConnector()
Expand All @@ -76,7 +76,7 @@ def _connector_factory(
@pytest.fixture
def google_gmail_service_acct_connector_factory() -> Callable[..., GmailConnector]:
def _connector_factory(
primary_admin_email: str = "admin@danswer-test.com",
primary_admin_email: str = "admin@onyx-test.com",
) -> GmailConnector:
print("Creating GmailConnector with service account credentials")
connector = GmailConnector()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
def slack_test_setup() -> Generator[tuple[dict[str, Any], dict[str, Any]], None, None]:
slack_client = SlackManager.get_slack_client(os.environ["SLACK_BOT_TOKEN"])
admin_user_id = SlackManager.build_slack_user_email_id_map(slack_client)[
"admin@danswer-test.com"
"admin@onyx-test.com"
]

(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def test_slack_group_permission_sync(

# Creating an admin user (first user created is automatically an admin)
admin_user: DATestUser = UserManager.create(
email="admin@danswer-test.com",
email="admin@onyx-test.com",
)

# Creating a non-admin user
Expand Down
2 changes: 1 addition & 1 deletion deployment/cloud_kubernetes/workers/beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-beat
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.4
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.20
imagePullPolicy: IfNotPresent
command:
[
Expand Down
2 changes: 1 addition & 1 deletion deployment/cloud_kubernetes/workers/heavy_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-heavy
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.4
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.20
imagePullPolicy: IfNotPresent
command:
[
Expand Down
2 changes: 1 addition & 1 deletion deployment/cloud_kubernetes/workers/indexing_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-indexing
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.4
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.20
imagePullPolicy: IfNotPresent
command:
[
Expand Down
2 changes: 1 addition & 1 deletion deployment/cloud_kubernetes/workers/light_worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-light
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.4
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.20
imagePullPolicy: IfNotPresent
command:
[
Expand Down
2 changes: 1 addition & 1 deletion deployment/cloud_kubernetes/workers/primary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: celery-worker-primary
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.4
image: onyxdotapp/onyx-backend-cloud:v0.14.0-cloud.beta.20
imagePullPolicy: IfNotPresent
command:
[
Expand Down
2 changes: 2 additions & 0 deletions deployment/docker_compose/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ services:
- LITELLM_EXTRA_HEADERS=${LITELLM_EXTRA_HEADERS:-}
- BING_API_KEY=${BING_API_KEY:-}
- DISABLE_LLM_DOC_RELEVANCE=${DISABLE_LLM_DOC_RELEVANCE:-}
- GEN_AI_API_KEY=${GEN_AI_API_KEY:-}
# if set, allows for the use of the token budget system
- TOKEN_BUDGET_GLOBALLY_ENABLED=${TOKEN_BUDGET_GLOBALLY_ENABLED:-}
# Enables the use of bedrock models
Expand Down Expand Up @@ -141,6 +142,7 @@ services:
- GENERATIVE_MODEL_ACCESS_CHECK_FREQ=${GENERATIVE_MODEL_ACCESS_CHECK_FREQ:-}
- DISABLE_LITELLM_STREAMING=${DISABLE_LITELLM_STREAMING:-}
- LITELLM_EXTRA_HEADERS=${LITELLM_EXTRA_HEADERS:-}
- GEN_AI_API_KEY=${GEN_AI_API_KEY:-}
- BING_API_KEY=${BING_API_KEY:-}
# Query Options
- DOC_TIME_DECAY=${DOC_TIME_DECAY:-} # Recency Bias for search results, decay at 1 / (1 + DOC_TIME_DECAY * x years)
Expand Down
2 changes: 1 addition & 1 deletion web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineConfig({
{
// dependency for admin workflows
name: "admin_setup",
testMatch: /.*\admin_auth.setup\.ts/,
testMatch: /.*\admin_auth\.setup\.ts/,
},
{
// tests admin workflows
Expand Down
Binary file added web/screenshots/assistants_mine_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/screenshots/chat_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/screenshots/chat_page_after_create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/screenshots/create_assistant_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions web/src/app/admin/assistants/AssistantEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -595,13 +595,15 @@ export function AssistantEditor({
tooltip="Used to identify the Assistant in the UI."
label="Name"
placeholder="e.g. 'Email Assistant'"
aria-label="assistant-name-input"
/>

<TextFormField
tooltip="Used for identifying assistants and their use cases."
name="description"
label="Description"
placeholder="e.g. 'Use this Assistant to help draft professional emails'"
data-testid="assistant-description-input"
/>

<TextFormField
Expand All @@ -610,9 +612,7 @@ export function AssistantEditor({
label="Instructions"
isTextArea={true}
placeholder="e.g. 'You are a professional email writing assistant that always uses a polite enthusiastic tone, emphasizes action items, and leaves blanks for the human to fill in when you have unknowns'"
onChange={(e) => {
setFieldValue("system_prompt", e.target.value);
}}
data-testid="assistant-instructions-input"
/>

<div>
Expand Down
1 change: 1 addition & 0 deletions web/src/components/admin/connectors/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ export function TextFormField({
as={isTextArea ? "textarea" : "input"}
type={type}
defaultValue={value}
data-testid={name}
name={name}
id={name}
className={`
Expand Down
14 changes: 0 additions & 14 deletions web/tests/e2e/admin_add_connector.spec.ts

This file was deleted.

19 changes: 0 additions & 19 deletions web/tests/e2e/admin_api_key.spec.ts

This file was deleted.

19 changes: 0 additions & 19 deletions web/tests/e2e/admin_assistants.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web/tests/e2e/admin_bots.spec.ts

This file was deleted.

18 changes: 0 additions & 18 deletions web/tests/e2e/admin_configuration_document_processing.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web/tests/e2e/admin_configuration_llm.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web/tests/e2e/admin_configuration_search.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web/tests/e2e/admin_documents_explorer.spec.ts

This file was deleted.

19 changes: 0 additions & 19 deletions web/tests/e2e/admin_documents_feedback.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web/tests/e2e/admin_documents_sets.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web/tests/e2e/admin_groups.spec.ts

This file was deleted.

16 changes: 0 additions & 16 deletions web/tests/e2e/admin_indexing_status.spec.ts

This file was deleted.

Loading
Loading