Fix more bugs
This commit is contained in:
parent
36d4ac55e4
commit
c227eda7c9
|
@ -1,4 +1,5 @@
|
|||
POSTGRES_USER=user
|
||||
POSTGRES_PASS=password
|
||||
POSTGRES_DB=api_dev
|
||||
POSTGRES_DB_TEST=api_prod
|
||||
APP_SETTINGS=src.config.DevelopmentConfig
|
|
@ -8,6 +8,7 @@ services:
|
|||
container_name: fids_usermanager_api_dev
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASS}@usermanager-db-dev/${POSTGRES_DB}
|
||||
- DATABASE_TEST_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASS}@usermanager-db-dev/${POSTGRES_DB_TEST}
|
||||
depends_on:
|
||||
usermanager-db-dev:
|
||||
condition: service_healthy
|
||||
|
|
|
@ -16,7 +16,7 @@ class DevelopmentConfig(BaseConfig):
|
|||
|
||||
class TestingConfig(BaseConfig):
|
||||
TESTING = True
|
||||
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL")
|
||||
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_TEST_URL")
|
||||
BCRYPT_LOG_ROUNDS = 4
|
||||
ACCESS_TOKEN_EXPIRATION = 5
|
||||
REFRESH_TOKEN_EXPIRATION = 5
|
||||
|
|
|
@ -22,7 +22,6 @@ describe("Arrival Component Tests", () => {
|
|||
expect(screen.getByText("Code")).toBeInTheDocument();
|
||||
expect(screen.getByText("Origin")).toBeInTheDocument();
|
||||
expect(screen.getByText("Time")).toBeInTheDocument();
|
||||
expect(screen.getByText("Gate")).toBeInTheDocument();
|
||||
expect(screen.getByText("Status")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
@ -53,7 +52,6 @@ describe("Arrival Component Tests", () => {
|
|||
expect(screen.queryByText("ABC123")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("City A")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("2023-10-30 12:00 PM")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("A1")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("On Time")).not.toBeInTheDocument();
|
||||
|
||||
})
|
||||
|
@ -95,13 +93,11 @@ describe("Arrival Component Tests", () => {
|
|||
expect(screen.getByText("ABC123")).toBeInTheDocument();
|
||||
expect(screen.getByText("City A")).toBeInTheDocument();
|
||||
expect(screen.getByText("2023-10-30 12:00 PM")).toBeInTheDocument();
|
||||
expect(screen.getByText("A1")).toBeInTheDocument();
|
||||
expect(screen.getByText("On Time")).toBeInTheDocument();
|
||||
|
||||
expect(screen.getByText("XYZ789")).toBeInTheDocument();
|
||||
expect(screen.getByText("City B")).toBeInTheDocument();
|
||||
expect(screen.getByText("2023-10-31 02:30 PM")).toBeInTheDocument();
|
||||
expect(screen.getByText("B2")).toBeInTheDocument();
|
||||
expect(screen.getByText("Delayed")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
@ -235,13 +231,11 @@ describe("Arrival Component Tests", () => {
|
|||
expect(screen.getByText("ABC123")).toBeInTheDocument();
|
||||
expect(screen.getByText("City A")).toBeInTheDocument();
|
||||
expect(screen.getByText("2023-10-30 12:00 PM")).toBeInTheDocument();
|
||||
expect(screen.getByText("A1")).toBeInTheDocument();
|
||||
expect(screen.getByText("On Time")).toBeInTheDocument();
|
||||
|
||||
expect(screen.queryByText("XYZ788")).toBeInTheDocument();
|
||||
expect(screen.queryByText("City C")).toBeInTheDocument();
|
||||
expect(screen.queryByText("2023-10-31 02:31 PM")).toBeInTheDocument();
|
||||
expect(screen.queryByText("B3")).toBeInTheDocument();
|
||||
expect(screen.queryByText("Scheduled")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
@ -254,19 +248,16 @@ describe("Arrival Component Tests", () => {
|
|||
expect(screen.queryByText("ABC123")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("City A")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("2023-10-30 12:00 PM")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("A1")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("On Time")).not.toBeInTheDocument();
|
||||
|
||||
expect(screen.queryByText("XYZ788")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("City C")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("2023-10-31 02:31 PM")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("B3")).not.toBeInTheDocument();
|
||||
expect(screen.queryByText("Scheduled")).not.toBeInTheDocument();
|
||||
|
||||
expect(screen.getByText("XYZ789")).toBeInTheDocument();
|
||||
expect(screen.getByText("City B")).toBeInTheDocument();
|
||||
expect(screen.getByText("2023-10-31 02:30 PM")).toBeInTheDocument();
|
||||
expect(screen.getByText("B2")).toBeInTheDocument();
|
||||
expect(screen.getByText("Delayed")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue