Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: check-yaml
args: [ '--unsafe' ]
Expand All @@ -21,8 +21,8 @@ repos:
- id: requirements-txt-fixer
- id: detect-private-key
- id: fix-byte-order-marker
- repo: https://github.com/psf/black
rev: 23.11.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
hooks:
- id: black
language_version: python3
Expand All @@ -46,13 +46,13 @@ repos:
# - id: mypy
# files: ^(src/|tests/|plugins/)
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
rev: v3.16.0
hooks:
- id: reorder-python-imports
args: [ --py37-plus, '--application-directories=.:src' ]
# use latest python syntax
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.21.0
hooks:
- id: pyupgrade
args: [ --py37-plus ]
Expand All @@ -65,7 +65,7 @@ repos:
# args: [ -s, B101 ]
# add copyright notice
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: insert-license
files: \.java$
Expand Down Expand Up @@ -144,7 +144,7 @@ repos:
- --license-filepath
- NOTICE.txt
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [scss, css, javascript, ts, html]
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
Loading