From d235d2c4dc228ee6de531c076b051639b2aed35d Mon Sep 17 00:00:00 2001 From: tealjulia Date: Tue, 6 Dec 2022 15:40:24 -0500 Subject: [PATCH 1/9] quick and dirty fix --- .../ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx index 26f0765ca917..caf0e81b8a4c 100644 --- a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx +++ b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx @@ -77,6 +77,8 @@ export const ConnectionName: React.FC = () => { onEscape={onEscape} onEnter={onEnter} disabled={loading} + // eslint-disable-next-line jsx-a11y/no-autofocus + autoFocus /> From 6f79b2d521bb614650da7a0870a02bff9cf39e0d Mon Sep 17 00:00:00 2001 From: tealjulia Date: Thu, 15 Dec 2022 15:13:42 -0500 Subject: [PATCH 2/9] see if this fixes e2e --- .../ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx index caf0e81b8a4c..5d1cb3ef94f4 100644 --- a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx +++ b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx @@ -78,7 +78,7 @@ export const ConnectionName: React.FC = () => { onEnter={onEnter} disabled={loading} // eslint-disable-next-line jsx-a11y/no-autofocus - autoFocus + // autoFocus /> From 1e7ca76585f8758516c90a29d53dc4afc6b6597a Mon Sep 17 00:00:00 2001 From: tealjulia Date: Thu, 15 Dec 2022 16:38:16 -0500 Subject: [PATCH 3/9] debug e2e --- .../cypress/integration/connection.spec.ts | 4 +++- .../cypress/pages/replicationPage.ts | 18 ++++++++---------- .../ConnectionItemPage/ConnectionName.tsx | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts index 7fea0fa55d2c..30d871925cda 100644 --- a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts +++ b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts @@ -23,7 +23,7 @@ import { selectPrimaryKeyField, checkPreFilledPrimaryKeyField, checkStreamFields, - expandStreamDetails + expandStreamDetails, } from "pages/replicationPage"; import { openSourceDestinationFromGrid, goToSourcePage } from "pages/sourcePage"; import { goToSettingsPage } from "pages/settingsConnectionPage"; @@ -162,6 +162,8 @@ describe("Connection - main actions", () => { goToReplicationTab(); + console.log(Cypress.$("body").html()); + selectSchedule("Cron"); submitButtonClick(); checkSuccessResult(); diff --git a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts index cd7bcab3e15e..8cfb7c0d32a8 100644 --- a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts +++ b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts @@ -80,16 +80,14 @@ export const selectCursorField = (value: string) => { cy.get(`.react-select__option`).contains(value).click(); }; -export const checkStreamFields = (listNames: Array, listTypes: Array,) => { - cy.get(streamFieldNames) - .each(($span, i) => { - expect($span.text()).to.equal(listNames[i]); - }); - - cy.get(streamDataTypes) - .each(($span, i) => { - expect($span.text()).to.equal(listTypes[i]); - }); +export const checkStreamFields = (listNames: string[], listTypes: string[]) => { + cy.get(streamFieldNames).each(($span, i) => { + expect($span.text()).to.equal(listNames[i]); + }); + + cy.get(streamDataTypes).each(($span, i) => { + expect($span.text()).to.equal(listTypes[i]); + }); }; export const checkCursorField = (expectedValue: string) => { diff --git a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx index 5d1cb3ef94f4..caf0e81b8a4c 100644 --- a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx +++ b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx @@ -78,7 +78,7 @@ export const ConnectionName: React.FC = () => { onEnter={onEnter} disabled={loading} // eslint-disable-next-line jsx-a11y/no-autofocus - // autoFocus + autoFocus /> From 7914c5cf753a9f11216e77458be3fa8034778833 Mon Sep 17 00:00:00 2001 From: tealjulia Date: Thu, 15 Dec 2022 17:12:56 -0500 Subject: [PATCH 4/9] try cy.log instead --- airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts index 30d871925cda..fd9adf1bcb14 100644 --- a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts +++ b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts @@ -162,7 +162,7 @@ describe("Connection - main actions", () => { goToReplicationTab(); - console.log(Cypress.$("body").html()); + cy.log(Cypress.$("body").html()); selectSchedule("Cron"); submitButtonClick(); From 42ff2fb74f56ba1ea6e95aa2b3c834515eb19a0e Mon Sep 17 00:00:00 2001 From: tealjulia Date: Thu, 15 Dec 2022 18:33:27 -0500 Subject: [PATCH 5/9] was the comment the bad guy? --- .../ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx index caf0e81b8a4c..1e3b2d3aa46c 100644 --- a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx +++ b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionName.tsx @@ -1,3 +1,4 @@ +/* eslint-disable jsx-a11y/no-autofocus */ import { faPenToSquare } from "@fortawesome/free-regular-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import React, { ChangeEvent, useState } from "react"; @@ -77,7 +78,6 @@ export const ConnectionName: React.FC = () => { onEscape={onEscape} onEnter={onEnter} disabled={loading} - // eslint-disable-next-line jsx-a11y/no-autofocus autoFocus /> From 39243833248c401e184de8091b6fc4322439822b Mon Sep 17 00:00:00 2001 From: tealjulia Date: Fri, 16 Dec 2022 14:30:35 -0500 Subject: [PATCH 6/9] testing fixes --- .../cypress/integration/connection.spec.ts | 12 ++++++------ .../cypress/pages/replicationPage.ts | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts index fd9adf1bcb14..506950e28e94 100644 --- a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts +++ b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts @@ -149,20 +149,20 @@ describe("Connection - main actions", () => { deleteDestination(destName); }); - it("Creates a connection, then edits the schedule type", () => { + it.only("Creates a connection, then edits the schedule type", () => { const sourceName = appendRandomString("Test connection source cypress PokeAPI"); const destName = appendRandomString("Test connection destination cypress"); createTestConnection(sourceName, destName); - cy.get("div").contains(sourceName).should("exist"); - cy.get("div").contains(destName).should("exist"); - + goToSourcePage(); openSourceDestinationFromGrid(sourceName); + openSourceDestinationFromGrid(destName); - goToReplicationTab(); + // cy.get("div").contains(sourceName).should("exist"); + // cy.get("div").contains(destName).should("exist"); - cy.log(Cypress.$("body").html()); + goToReplicationTab(); selectSchedule("Cron"); submitButtonClick(); diff --git a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts index 8cfb7c0d32a8..0be3df98af89 100644 --- a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts +++ b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts @@ -24,7 +24,8 @@ const streamSyncEnabledSwitch = (streamName: string) => `[data-testid='${streamN const streamNameInput = "input[data-testid='input']"; export const goToReplicationTab = () => { - cy.get(replicationTab).click(); + cy.pause(); + cy.get(replicationTab).should("exist").click(); }; export const enterConnectionName = (name: string) => { From 51a1d3df744eee708a507dc76c6c10a11c193195 Mon Sep 17 00:00:00 2001 From: tealjulia Date: Fri, 16 Dec 2022 14:31:00 -0500 Subject: [PATCH 7/9] these too --- airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts | 2 +- airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts index 506950e28e94..e71df5bbbbf5 100644 --- a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts +++ b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts @@ -149,7 +149,7 @@ describe("Connection - main actions", () => { deleteDestination(destName); }); - it.only("Creates a connection, then edits the schedule type", () => { + it("Creates a connection, then edits the schedule type", () => { const sourceName = appendRandomString("Test connection source cypress PokeAPI"); const destName = appendRandomString("Test connection destination cypress"); diff --git a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts index 0be3df98af89..ff55ca2e109e 100644 --- a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts +++ b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts @@ -24,7 +24,6 @@ const streamSyncEnabledSwitch = (streamName: string) => `[data-testid='${streamN const streamNameInput = "input[data-testid='input']"; export const goToReplicationTab = () => { - cy.pause(); cy.get(replicationTab).should("exist").click(); }; From d38ad41536951de9fb0334ee8a4f31102f4d946a Mon Sep 17 00:00:00 2001 From: tealjulia Date: Fri, 16 Dec 2022 15:35:39 -0500 Subject: [PATCH 8/9] cleanup here too --- .../cypress/integration/connection.spec.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts index e71df5bbbbf5..c93648bbf7da 100644 --- a/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts +++ b/airbyte-webapp-e2e-tests/cypress/integration/connection.spec.ts @@ -155,13 +155,6 @@ describe("Connection - main actions", () => { createTestConnection(sourceName, destName); - goToSourcePage(); - openSourceDestinationFromGrid(sourceName); - openSourceDestinationFromGrid(destName); - - // cy.get("div").contains(sourceName).should("exist"); - // cy.get("div").contains(destName).should("exist"); - goToReplicationTab(); selectSchedule("Cron"); @@ -560,7 +553,6 @@ describe("Connection - detect changes in source", () => { cy.get("div").contains(destName).should("exist"); makeChangesInDBSource(); - openSourceDestinationFromGrid(sourceName); goToReplicationTab(); refreshSourceSchemaBtnClick(); From 2f4be998d8d5cf268f61cc6d084a5f4c5866df74 Mon Sep 17 00:00:00 2001 From: tealjulia Date: Mon, 19 Dec 2022 11:59:38 -0500 Subject: [PATCH 9/9] cleanup --- airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts index ff55ca2e109e..8cfb7c0d32a8 100644 --- a/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts +++ b/airbyte-webapp-e2e-tests/cypress/pages/replicationPage.ts @@ -24,7 +24,7 @@ const streamSyncEnabledSwitch = (streamName: string) => `[data-testid='${streamN const streamNameInput = "input[data-testid='input']"; export const goToReplicationTab = () => { - cy.get(replicationTab).should("exist").click(); + cy.get(replicationTab).click(); }; export const enterConnectionName = (name: string) => {