Skip to content

Commit

Permalink
🪟 🚦 Fix connection tests naming in webapp e2e testing (#21463)
Browse files Browse the repository at this point in the history
* fix connection test naming issue

* fix connection test naming issue
  • Loading branch information
dizel852 authored Jan 18, 2023
1 parent 24285db commit 5f29824
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,24 @@ import {
} from "../pages/modals/catalogDiffModal";
import { updateSchemaModalConfirmBtnClick } from "../pages/modals/updateSchemaModal";

describe("Connection - main actions", () => {
describe("Connection - creation, updating connection replication settings, deletion", () => {
beforeEach(() => {
initialSetupCompleted();
});

it("Create new connection", () => {
it("Create Postgres <> LocalJSON connection, check it's creation", () => {
const sourceName = appendRandomString("Test connection source cypress");
const destName = appendRandomString("Test connection destination cypress");

createTestConnection(sourceName, destName);

cy.get("div").contains(sourceName).should("exist");
cy.get("div").contains(destName).should("exist");

deleteSource(sourceName);
deleteDestination(destName);
});

it("Update connection", () => {
it("Create Postgres <> LocalJSON connection, update connection replication settings - select schedule and add destination prefix", () => {
cy.intercept("/api/v1/web_backend/connections/update").as("updateConnection");

const sourceName = appendRandomString("Test update connection source cypress");
Expand Down Expand Up @@ -85,7 +84,8 @@ describe("Connection - main actions", () => {
deleteDestination(destName);
});

it("Update connection (pokeAPI)", () => {
it(`Creates PokeAPI <> Local JSON connection, update connection replication settings -
select schedule, add destination prefix, set destination namespace custom format, change prefix and make sure that it's applied to all streams`, () => {
cy.intercept("/api/v1/web_backend/connections/update").as("updateConnection");

const sourceName = appendRandomString("Test update connection PokeAPI source cypress");
Expand Down Expand Up @@ -149,7 +149,7 @@ describe("Connection - main actions", () => {
deleteDestination(destName);
});

it("Creates a connection, then edits the schedule type", () => {
it("Create PokeAPI <> Local JSON connection, update connection replication settings - edit the schedule type one by one - cron, manual, every hour", () => {
const sourceName = appendRandomString("Test connection source cypress PokeAPI");
const destName = appendRandomString("Test connection destination cypress");

Expand All @@ -173,7 +173,7 @@ describe("Connection - main actions", () => {
deleteDestination(destName);
});

it("Saving a connection's schedule type only changes expected values", () => {
it("Create PokeAPI <> Local JSON connection, update connection replication settings - make sure that saving a connection's schedule type only changes expected values", () => {
cy.intercept("/api/v1/web_backend/connections/update").as("updateConnection");
cy.intercept("/api/v1/web_backend/connections/get").as("getConnection");

Expand Down Expand Up @@ -222,7 +222,7 @@ describe("Connection - main actions", () => {
deleteDestination(destName);
});

it("Delete connection", () => {
it("Create PokeAPI <> Local JSON connection, and delete connection", () => {
const sourceName = "Test delete connection source cypress";
const destName = "Test delete connection destination cypress";
createTestConnection(sourceName, destName);
Expand All @@ -239,7 +239,7 @@ describe("Connection - main actions", () => {
deleteDestination(destName);
});

it("Saving a connection's destination namespace with 'Custom format' option", () => {
it("Create PokeAPI <> Local JSON connection, update connection replication settings - set destination namespace with 'Custom format' option", () => {
cy.intercept("/api/v1/web_backend/connections/update").as("updateConnection");

const sourceName = appendRandomString("Test update connection PokeAPI source cypress");
Expand Down Expand Up @@ -285,7 +285,7 @@ describe("Connection - main actions", () => {
deleteDestination(destName);
});

it("Saving a connection's destination namespace with 'Mirror source structure' option", () => {
it("Create PokeAPI <> Local JSON connection, update connection replication settings - set destination namespace with 'Mirror source structure' option", () => {
cy.intercept("/api/v1/web_backend/connections/update").as("updateConnection");

const sourceName = appendRandomString("Test update connection PokeAPI source cypress");
Expand All @@ -308,7 +308,7 @@ describe("Connection - main actions", () => {
deleteDestination(destName);
});

it("Saving a connection's destination namespace with 'Destination default' option", () => {
it("Create PokeAPI <> Local JSON connection, update connection replication settings - set destination namespace with 'Destination default' option", () => {
cy.intercept("/api/v1/web_backend/connections/update").as("updateConnection");

const sourceName = appendRandomString("Test update connection PokeAPI source cypress");
Expand Down Expand Up @@ -356,7 +356,7 @@ describe("Connection - main actions", () => {
});
});

describe("Connection - stream view", () => {
describe("Connection - stream details", () => {
beforeEach(() => {
initialSetupCompleted();
populateDBSource();
Expand All @@ -366,7 +366,7 @@ describe("Connection - stream view", () => {
cleanDBSource();
});

it("Stream view", () => {
it("Create Postgres <> Postgres connection, connection replication settings, expand stream details", () => {
const sourceName = appendRandomString("Test connection Postgres source cypress");
const destName = appendRandomString("Test connection Postgres destination cypress");

Expand Down Expand Up @@ -400,7 +400,7 @@ describe("Connection sync modes", () => {
cleanDBSource();
});

it("Connection sync mode Incremental Append", () => {
it("Create Postgres <> Postgres connection, update connection replication settings - select 'Incremental Append' sync mode, select required Cursor field, verify changes", () => {
const sourceName = appendRandomString("Test connection Postgres source cypress");
const destName = appendRandomString("Test connection Postgres destination cypress");

Expand Down Expand Up @@ -434,13 +434,14 @@ describe("Connection sync modes", () => {
goToReplicationTab();

searchStream("users");
//FIXME: rename "check" to "verify" or similar
checkCursorField("col1");

deleteSource(sourceName);
deleteDestination(destName);
});

it("Connection sync mode Incremental Deduped History - PK is defined", () => {
it("Create Postgres <> Postgres connection, update connection replication settings - select 'Incremental Deduped History'(PK is defined), select Cursor field, verify changes", () => {
const sourceName = appendRandomString("Test connection Postgres source cypress");
const destName = appendRandomString("Test connection Postgres destination cypress");

Expand Down Expand Up @@ -483,7 +484,7 @@ describe("Connection sync modes", () => {
deleteDestination(destName);
});

it("Connection sync mode Incremental Deduped History - PK is not defined", () => {
it("Create Postgres <> Postgres connection, update connection replication settings - select 'Incremental Deduped History'(PK is NOT defined), select Cursor field, select PK, verify changes", () => {
const sourceName = appendRandomString("Test connection Postgres source cypress");
const destName = appendRandomString("Test connection Postgres destination cypress");

Expand Down Expand Up @@ -528,7 +529,7 @@ describe("Connection sync modes", () => {
});
});

describe("Connection - detect changes in source", () => {
describe("Connection - detect source schema changes in source", () => {
beforeEach(() => {
initialSetupCompleted();
populateDBSource();
Expand All @@ -538,7 +539,7 @@ describe("Connection - detect changes in source", () => {
cleanDBSource();
});

it("Create a connection, update data in source, show diff modal, reset streams", () => {
it("Create Postgres <> Local JSON connection, update data in source (async), refresh source schema, check diff modal, reset streams", () => {
cy.intercept("/api/v1/web_backend/connections/update").as("updateConnection");

const sourceName = appendRandomString(
Expand Down

0 comments on commit 5f29824

Please sign in to comment.