Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 14, 2024
1 parent 0720c19 commit 13f66f3
Show file tree
Hide file tree
Showing 735 changed files with 78,818 additions and 69,707 deletions.
8 changes: 5 additions & 3 deletions examples/pgvector-embedder/40_ingest_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ def run(job_input: IJobInput):

embedding_payload = {
"id": composite_id,
"embedding": embeddings[i].tolist()
if isinstance(embeddings[i], np.ndarray)
else embeddings[i],
"embedding": (
embeddings[i].tolist()
if isinstance(embeddings[i], np.ndarray)
else embeddings[i]
),
}
job_input.send_object_for_ingestion(
payload=embedding_payload,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

/// <reference types="cypress" />

import { DataJobsExplorePage } from '../../../../../support/pages/explore/data-jobs/data-jobs.po';
import { DataJobExploreDetailsPage } from '../../../../../support/pages/explore/data-jobs/details/data-job-details.po';
import { DataJobsExplorePage } from "../../../../../support/pages/explore/data-jobs/data-jobs.po";
import { DataJobExploreDetailsPage } from "../../../../../support/pages/explore/data-jobs/details/data-job-details.po";

describe('Data Job Explore Details Page', { tags: ['@dataPipelines', '@exploreDataJobDetails', '@explore'] }, () => {
describe(
"Data Job Explore Details Page",
{ tags: ["@dataPipelines", "@exploreDataJobDetails", "@explore"] },
() => {
/**
* @type {DataJobExploreDetailsPage}
*/
Expand All @@ -23,101 +26,191 @@ describe('Data Job Explore Details Page', { tags: ['@dataPipelines', '@exploreDa
let dataJobsExplorePage;

before(() => {
return DataJobExploreDetailsPage.recordHarIfSupported()
.then(() => cy.clearLocalStorageSnapshot('data-job-explore-details'))
.then(() => DataJobExploreDetailsPage.login())
.then(() => cy.saveLocalStorage('data-job-explore-details'))
.then(() => DataJobExploreDetailsPage.deleteShortLivedTestJobsNoDeploy(true))
.then(() => DataJobExploreDetailsPage.createShortLivedTestJobsNoDeploy())
.then(() =>
DataJobExploreDetailsPage.loadShortLivedTestJobsFixtureNoDeploy().then((fixtures) => {
testJobsFixture = [fixtures[0], fixtures[1]];

return cy.wrap({
context: 'explore::data-job-details.spec::before()',
action: 'continue'
});
})
);
return DataJobExploreDetailsPage.recordHarIfSupported()
.then(() => cy.clearLocalStorageSnapshot("data-job-explore-details"))
.then(() => DataJobExploreDetailsPage.login())
.then(() => cy.saveLocalStorage("data-job-explore-details"))
.then(() =>
DataJobExploreDetailsPage.deleteShortLivedTestJobsNoDeploy(true),
)
.then(() =>
DataJobExploreDetailsPage.createShortLivedTestJobsNoDeploy(),
)
.then(() =>
DataJobExploreDetailsPage.loadShortLivedTestJobsFixtureNoDeploy().then(
(fixtures) => {
testJobsFixture = [fixtures[0], fixtures[1]];

return cy.wrap({
context: "explore::data-job-details.spec::before()",
action: "continue",
});
},
),
);
});

after(() => {
DataJobExploreDetailsPage.deleteShortLivedTestJobsNoDeploy();
DataJobExploreDetailsPage.deleteShortLivedTestJobsNoDeploy();

DataJobExploreDetailsPage.saveHarIfSupported();
DataJobExploreDetailsPage.saveHarIfSupported();
});

beforeEach(() => {
cy.restoreLocalStorage('data-job-explore-details');
cy.restoreLocalStorage("data-job-explore-details");

DataJobExploreDetailsPage.wireUserSession();
DataJobExploreDetailsPage.initInterceptors();
DataJobExploreDetailsPage.wireUserSession();
DataJobExploreDetailsPage.initInterceptors();
});

describe('smoke', { tags: ['@smoke'] }, () => {
it('should load and show job details', () => {
dataJobsExplorePage = DataJobsExplorePage.navigateWithSideMenu();

// filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
dataJobsExplorePage.filterByJobName(testJobsFixture[0].job_name.substring(0, 20));

dataJobsExplorePage.openJobDetails(testJobsFixture[0].team, testJobsFixture[0].job_name);

dataJobExploreDetailsPage = DataJobExploreDetailsPage.getPage();

dataJobExploreDetailsPage.getDetailsTab().scrollIntoView().should('be.visible');

dataJobExploreDetailsPage.getPageTitle().scrollIntoView().should('be.visible').should('contains.text', testJobsFixture[0].job_name);

dataJobExploreDetailsPage.getStatusField().scrollIntoView().should('be.visible').should('have.text', 'Not Deployed');

dataJobExploreDetailsPage.getDescriptionField().scrollIntoView().should('be.visible').should('contain.text', testJobsFixture[0].description);

dataJobExploreDetailsPage.getTeamField().scrollIntoView().should('be.visible').should('have.text', testJobsFixture[0].team);

dataJobExploreDetailsPage.getScheduleField().scrollIntoView().should('be.visible').should('contains.text', 'At 12:00 AM, on day 01 of the month, and on Friday');

dataJobExploreDetailsPage.getOnDeployedField().scrollIntoView().should('be.visible').should('contains.text', testJobsFixture[0].config.contacts.notified_on_job_deploy);

dataJobExploreDetailsPage.getOnPlatformErrorField().scrollIntoView().should('be.visible').should('contains.text', testJobsFixture[0].config.contacts.notified_on_job_failure_platform_error);

dataJobExploreDetailsPage.getOnUserErrorField().scrollIntoView().should('be.visible').should('contains.text', testJobsFixture[0].config.contacts.notified_on_job_failure_user_error);

dataJobExploreDetailsPage.getOnSuccessField().scrollIntoView().should('be.visible').should('contains.text', testJobsFixture[0].config.contacts.notified_on_job_success);
});

it('should verify Details tab is visible and active', () => {
dataJobsExplorePage = DataJobsExplorePage.navigateTo();

// filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
dataJobsExplorePage.filterByJobName(testJobsFixture[0].job_name.substring(0, 20));

dataJobsExplorePage.openJobDetails(testJobsFixture[0].team, testJobsFixture[0].job_name);

const dataJobExploreDetailsPage = DataJobExploreDetailsPage.getPage();

dataJobExploreDetailsPage.getPageTitle().scrollIntoView().should('be.visible').should('contains.text', testJobsFixture[0].job_name);

dataJobExploreDetailsPage.getDetailsTab().scrollIntoView().should('be.visible').should('have.class', 'active');
});
describe("smoke", { tags: ["@smoke"] }, () => {
it("should load and show job details", () => {
dataJobsExplorePage = DataJobsExplorePage.navigateWithSideMenu();

// filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
dataJobsExplorePage.filterByJobName(
testJobsFixture[0].job_name.substring(0, 20),
);

dataJobsExplorePage.openJobDetails(
testJobsFixture[0].team,
testJobsFixture[0].job_name,
);

dataJobExploreDetailsPage = DataJobExploreDetailsPage.getPage();

dataJobExploreDetailsPage
.getDetailsTab()
.scrollIntoView()
.should("be.visible");

dataJobExploreDetailsPage
.getPageTitle()
.scrollIntoView()
.should("be.visible")
.should("contains.text", testJobsFixture[0].job_name);

dataJobExploreDetailsPage
.getStatusField()
.scrollIntoView()
.should("be.visible")
.should("have.text", "Not Deployed");

dataJobExploreDetailsPage
.getDescriptionField()
.scrollIntoView()
.should("be.visible")
.should("contain.text", testJobsFixture[0].description);

dataJobExploreDetailsPage
.getTeamField()
.scrollIntoView()
.should("be.visible")
.should("have.text", testJobsFixture[0].team);

dataJobExploreDetailsPage
.getScheduleField()
.scrollIntoView()
.should("be.visible")
.should(
"contains.text",
"At 12:00 AM, on day 01 of the month, and on Friday",
);

dataJobExploreDetailsPage
.getOnDeployedField()
.scrollIntoView()
.should("be.visible")
.should(
"contains.text",
testJobsFixture[0].config.contacts.notified_on_job_deploy,
);

dataJobExploreDetailsPage
.getOnPlatformErrorField()
.scrollIntoView()
.should("be.visible")
.should(
"contains.text",
testJobsFixture[0].config.contacts
.notified_on_job_failure_platform_error,
);

dataJobExploreDetailsPage
.getOnUserErrorField()
.scrollIntoView()
.should("be.visible")
.should(
"contains.text",
testJobsFixture[0].config.contacts
.notified_on_job_failure_user_error,
);

dataJobExploreDetailsPage
.getOnSuccessField()
.scrollIntoView()
.should("be.visible")
.should(
"contains.text",
testJobsFixture[0].config.contacts.notified_on_job_success,
);
});

it("should verify Details tab is visible and active", () => {
dataJobsExplorePage = DataJobsExplorePage.navigateTo();

// filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
dataJobsExplorePage.filterByJobName(
testJobsFixture[0].job_name.substring(0, 20),
);

dataJobsExplorePage.openJobDetails(
testJobsFixture[0].team,
testJobsFixture[0].job_name,
);

const dataJobExploreDetailsPage = DataJobExploreDetailsPage.getPage();

dataJobExploreDetailsPage
.getPageTitle()
.scrollIntoView()
.should("be.visible")
.should("contains.text", testJobsFixture[0].job_name);

dataJobExploreDetailsPage
.getDetailsTab()
.scrollIntoView()
.should("be.visible")
.should("have.class", "active");
});
});

describe('extended', () => {
it('should verify Action buttons are not displayed', () => {
dataJobsExplorePage = DataJobsExplorePage.navigateTo();
describe("extended", () => {
it("should verify Action buttons are not displayed", () => {
dataJobsExplorePage = DataJobsExplorePage.navigateTo();

// filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
dataJobsExplorePage.filterByJobName(testJobsFixture[0].job_name.substring(0, 20));
// filter by job name substring because there are a lot of jobs, and it could potentially be on second/third page
dataJobsExplorePage.filterByJobName(
testJobsFixture[0].job_name.substring(0, 20),
);

dataJobsExplorePage.openJobDetails(testJobsFixture[0].team, testJobsFixture[0].job_name);
dataJobsExplorePage.openJobDetails(
testJobsFixture[0].team,
testJobsFixture[0].job_name,
);

const dataJobExploreDetailsPage = DataJobExploreDetailsPage.getPage();
const dataJobExploreDetailsPage = DataJobExploreDetailsPage.getPage();

dataJobExploreDetailsPage.getPageTitle().scrollIntoView().should('be.visible').should('contains.text', testJobsFixture[0].job_name);
dataJobExploreDetailsPage
.getPageTitle()
.scrollIntoView()
.should("be.visible")
.should("contains.text", testJobsFixture[0].job_name);

dataJobExploreDetailsPage.getExecuteNowButton().should('not.exist');
dataJobExploreDetailsPage.getExecuteNowButton().should("not.exist");

dataJobExploreDetailsPage.getActionDropdownBtn().should('not.exist');
});
dataJobExploreDetailsPage.getActionDropdownBtn().should("not.exist");
});
});
});
},
);
Loading

0 comments on commit 13f66f3

Please sign in to comment.