Skip to content
Draft
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
2 changes: 1 addition & 1 deletion tests/e2e/baseTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ async function saveSidecarLogs(
await executeVSCodeCommand(page, "confluent.support.saveSidecarLogs");

// select the formatted log option in the quick pick
const formatQuickPick = new Quickpick(page);
const formatQuickPick = new Quickpick(page, "Choose sidecar log format");
await expect(formatQuickPick.locator).toBeVisible({ timeout: 5000 });
await formatQuickPick.selectItemByText("Human-readable format");

Expand Down
14 changes: 7 additions & 7 deletions tests/e2e/objects/views/FlinkDatabaseView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class FlinkDatabaseView extends SearchableView {
private async clickClusterItemFromSelectedDB(clusterLabel?: string): Promise<void> {
await this.clickSelectKafkaClusterAsFlinkDatabase();

const kafkaClusterQuickpick = new Quickpick(this.page);
const kafkaClusterQuickpick = new Quickpick(this.page, "Select a Kafka cluster");
await expect(kafkaClusterQuickpick.locator).toBeVisible();

const label = clusterLabel ?? CCLOUD_KAFKA_CLUSTER_NAME;
Expand Down Expand Up @@ -178,7 +178,7 @@ export class FlinkDatabaseView extends SearchableView {
async selectKafkaClusterByProviderRegion(provider: string, region: string): Promise<void> {
await this.clickSelectKafkaClusterAsFlinkDatabase();

const kafkaClusterQuickpick = new Quickpick(this.page);
const kafkaClusterQuickpick = new Quickpick(this.page, "Select a Kafka cluster");
await expect(kafkaClusterQuickpick.locator).toBeVisible();

// select by the configured cluster's unique name: the quickpick lists clusters from every
Expand Down Expand Up @@ -278,7 +278,7 @@ export class FlinkDatabaseView extends SearchableView {
const containerItem = new ViewItem(this.page, container);
await containerItem.clickInlineAction("Upload Flink Artifact to Confluent Cloud");

const quickpick = new Quickpick(this.page);
const quickpick = new Quickpick(this.page, "Upload Flink Artifact");
await expect(quickpick.locator).toBeVisible();
await expect(quickpick.items).not.toHaveCount(0);
}
Expand All @@ -289,7 +289,7 @@ export class FlinkDatabaseView extends SearchableView {
* @param filePath - The path to the JAR file
*/
private async selectJarFile(electronApp: ElectronApplication, filePath: string): Promise<void> {
const quickpick = new Quickpick(this.page);
const quickpick = new Quickpick(this.page, "Upload Flink Artifact");
const selectedJarFileItem = quickpick.items.filter({ hasText: "3. Select JAR File" }).first();
await expect(selectedJarFileItem).toBeVisible();

Expand All @@ -306,7 +306,7 @@ export class FlinkDatabaseView extends SearchableView {
* @returns The full artifact name with random suffix
*/
private async enterArtifactName(filePath: string): Promise<string> {
const quickpick = new Quickpick(this.page);
const quickpick = new Quickpick(this.page, "Upload Flink Artifact");
const artifactItem = quickpick.items.filter({ hasText: "4. Artifact Name" }).first();
await expect(artifactItem).toBeVisible();
await artifactItem.click();
Expand All @@ -326,7 +326,7 @@ export class FlinkDatabaseView extends SearchableView {
* Confirm the artifact upload by clicking the upload action.
*/
private async confirmUpload(): Promise<void> {
const quickpick = new Quickpick(this.page);
const quickpick = new Quickpick(this.page, "Upload Flink Artifact");
const uploadAction = quickpick.items.filter({ hasText: "Upload Artifact" }).first();
await expect(uploadAction).toBeVisible();
await uploadAction.click();
Expand Down Expand Up @@ -375,7 +375,7 @@ export class FlinkDatabaseView extends SearchableView {
*/
async uploadFlinkArtifactFromJAR(artifactName: string, providerRegion?: string): Promise<string> {
// Wait for the quickpick to appear
const quickpick = new Quickpick(this.page);
const quickpick = new Quickpick(this.page, "Upload Flink Artifact");
await expect(quickpick.locator).toBeVisible();

// Step 1: Select Environment - pin to the configured env instead of `.first()`, which could
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/objects/views/SchemasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class SchemasView extends SearchableView {
}
case SelectSchemaRegistry.FromSchemasViewButton: {
await this.clickSelectSchemaRegistry();
const schemaRegistryQuickpick = new Quickpick(this.page);
const schemaRegistryQuickpick = new Quickpick(this.page, "Select Schema Registry");
await expect(schemaRegistryQuickpick.locator).toBeVisible();
await expect(schemaRegistryQuickpick.items).not.toHaveCount(0);
const registryItem = registryLabel
Expand Down Expand Up @@ -148,7 +148,7 @@ export class SchemasView extends SearchableView {
await this.clickCreateNewSchema();

// select initial schema type before the document opens
const createSchemaTypeQuickpick = new Quickpick(page);
const createSchemaTypeQuickpick = new Quickpick(page, "Choose a schema type");
await expect(createSchemaTypeQuickpick.locator).toBeVisible();
await createSchemaTypeQuickpick.selectItemByText(schemaType);

Expand All @@ -161,12 +161,12 @@ export class SchemasView extends SearchableView {
await this.clickUploadSchema();

// select editor/file name in the first quickpick
const documentQuickpick = new Quickpick(page);
const documentQuickpick = new Quickpick(page, "Select a file");
await expect(documentQuickpick.locator).toBeVisible();
await documentQuickpick.selectItemByText("Untitled");

// select schema type in the next quickpick
const uploadSchemaTypeQuickpick = new Quickpick(page);
const uploadSchemaTypeQuickpick = new Quickpick(page, "Choose a schema type");
await expect(uploadSchemaTypeQuickpick.locator).toBeVisible();
await uploadSchemaTypeQuickpick.selectItemByText(schemaType);

Expand Down Expand Up @@ -219,7 +219,7 @@ export class SchemasView extends SearchableView {
await subjectItem.rightClickContextMenuAction("Delete All Schemas in Subject");

// select the Hard Delete option
const deletionQuickpick = new Quickpick(page);
const deletionQuickpick = new Quickpick(page, "Delete Schema Subject");
const hardDelete = deletionQuickpick.items.filter({ hasText: "Hard Delete" });
await expect(hardDelete).not.toHaveCount(0);
await hardDelete.click();
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/objects/views/TopicsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class TopicsView extends SearchableView {
}
case SelectKafkaCluster.FromTopicsViewButton: {
await this.clickSelectKafkaCluster();
const kafkaClusterQuickpick = new Quickpick(this.page);
const kafkaClusterQuickpick = new Quickpick(this.page, "Select a Kafka cluster");
await expect(kafkaClusterQuickpick.locator).toBeVisible();
if (effectiveLabel) {
// CCloud: pin to the configured cluster name with an exact single-match guard
Expand Down
16 changes: 11 additions & 5 deletions tests/e2e/specs/produceMessage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,18 @@ test.describe("Produce Message(s) to Topic", { tag: [Tag.ProduceMessageToTopic]

await topicItem.clickSendMessages();
// click the currently open document item in the document/URI quickpick
const documentQuickpick = new Quickpick(page);
const documentQuickpick = new Quickpick(page, "Select a file");
await expect(documentQuickpick.locator).toBeVisible();
const currentDocumentItem = documentQuickpick.items.filter({
hasText: "Untitled",
});
await expect(currentDocumentItem).not.toHaveCount(0);
await currentDocumentItem.click();
// confirm the default selection in the schema multi-select quickpick
const schemaQuickpick = new Quickpick(page);
const schemaQuickpick = new Quickpick(
page,
/^Producing to .*Select Schema Kind\(s\)/,
);
await expect(schemaQuickpick.locator).toBeVisible();
// we could check the default selection(s) here based on which schemas are used (key,
// value, key+value, etc) but that isn't necessary for now
Expand All @@ -158,7 +161,7 @@ test.describe("Produce Message(s) to Topic", { tag: [Tag.ProduceMessageToTopic]

await topicItem.clickSendMessages();
// click the currently open document item in the document/URI quickpick
const documentQuickpick = new Quickpick(page);
const documentQuickpick = new Quickpick(page, "Select a file");
await expect(documentQuickpick.locator).toBeVisible();
const currentDocumentItem = documentQuickpick.items.filter({
hasText: "Untitled",
Expand Down Expand Up @@ -190,15 +193,18 @@ test.describe("Produce Message(s) to Topic", { tag: [Tag.ProduceMessageToTopic]

await topicItem.clickSendMessages();
// click the currently open document item in the document/URI quickpick
const documentQuickpick = new Quickpick(page);
const documentQuickpick = new Quickpick(page, "Select a file");
await expect(documentQuickpick.locator).toBeVisible();
const currentDocumentItem = documentQuickpick.items.filter({
hasText: "Untitled",
});
await expect(currentDocumentItem).not.toHaveCount(0);
await currentDocumentItem.click();
// confirm the default selection in the schema multi-select quickpick
const schemaQuickpick = new Quickpick(page);
const schemaQuickpick = new Quickpick(
page,
/^Producing to .*Select Schema Kind\(s\)/,
);
await expect(schemaQuickpick.locator).toBeVisible();
// we could check the default selection(s) here based on which schemas are used (key,
// value, key+value, etc) but that isn't necessary for now
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/specs/schemas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ test.describe("Schema Management", { tag: [Tag.EvolveSchema] }, () => {
// attempt to upload from the subject item (instead of the Schemas view nav action)
await subjectItem.clickUploadSchemaForSubject();
// select editor/file name in the first quickpick
const documentQuickpick = new Quickpick(page);
const documentQuickpick = new Quickpick(page, "Select a file");
await expect(documentQuickpick.locator).toBeVisible();
await documentQuickpick.selectItemByText(expectedTabName);
// select schema type in the next quickpick
const uploadSchemaTypeQuickpick = new Quickpick(page);
const uploadSchemaTypeQuickpick = new Quickpick(page, "Choose a schema type");
await expect(uploadSchemaTypeQuickpick.locator).toBeVisible();
await uploadSchemaTypeQuickpick.selectItemByText(schemaType);

Expand Down Expand Up @@ -177,11 +177,11 @@ test.describe("Schema Management", { tag: [Tag.EvolveSchema] }, () => {
// attempt to upload from the subject item (instead of the Schemas view nav action)
await subjectItem.clickUploadSchemaForSubject();
// select editor/file name in the first quickpick
const documentQuickpick = new Quickpick(page);
const documentQuickpick = new Quickpick(page, "Select a file");
await expect(documentQuickpick.locator).toBeVisible();
await documentQuickpick.selectItemByText(expectedTabName);
// select schema type in the next quickpick
const uploadSchemaTypeQuickpick = new Quickpick(page);
const uploadSchemaTypeQuickpick = new Quickpick(page, "Choose a schema type");
await expect(uploadSchemaTypeQuickpick.locator).toBeVisible();
await uploadSchemaTypeQuickpick.selectItemByText(schemaType);

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/utils/connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export async function setupLocalKafka(page: Page) {
await localItem.clickStartResources();

// multi-select quickpick to select which resources to start
const containerQuickpick = new Quickpick(page);
const containerQuickpick = new Quickpick(page, "Local Resources to Start");
await expect(containerQuickpick.locator).toBeVisible();
// local Kafka should be checked by default - if not, we'll fail the expect below
await containerQuickpick.confirm();
Expand Down Expand Up @@ -312,7 +312,7 @@ export async function setupLocalSchemaRegistry(page: Page) {
await localItem.clickStartResources();

// multi-select quickpick to select which resources to start
const containerQuickpick = new Quickpick(page);
const containerQuickpick = new Quickpick(page, "Local Resources to Start");
await expect(containerQuickpick.locator).toBeVisible();
await containerQuickpick.selectItemByText("Schema Registry");
await containerQuickpick.confirm();
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/utils/flinkStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export async function submitFlinkStatement(

// Select the Flink compute pool
await codeLens.getByText("Set Compute Pool").click();
const computePoolQuickpick = new Quickpick(page);
const computePoolQuickpick = new Quickpick(page, "Select a Flink compute pool");
await computePoolQuickpick.selectItemByText(computePoolName, { exact: true });
await expect(codeLens.getByText(computePoolName)).toBeVisible();

// Select a Kafka cluster (the quickpick auto-filters to clouds/regions matching the pool, but
// there can still be multiple matches; pin via the configured name so we never pick the wrong one)
await codeLens.getByText("Set Catalog & Database").click();
const kafkaClusterQuickpick = new Quickpick(page);
const kafkaClusterQuickpick = new Quickpick(page, "Select a Kafka cluster");
await kafkaClusterQuickpick.selectItemByText(CCLOUD_KAFKA_CLUSTER_NAME, { exact: true });

// Submit the Flink statement
Expand Down