Skip to content

Commit

Permalink
feature #177 Create component search with custom filter tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
korel-san committed Feb 22, 2023
1 parent 053209a commit c8d1c01
Show file tree
Hide file tree
Showing 94 changed files with 155 additions and 266 deletions.
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
25 changes: 25 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
20 changes: 20 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

1 change: 0 additions & 1 deletion package.json

This file was deleted.

7 changes: 4 additions & 3 deletions ui/cypress/e2e/main-tests-spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Main Tests', () => {
cy.get('ngx-daterangepicker-material .ranges .ng-star-inserted:nth-child(5) button').click()
cy.get('ngx-daterangepicker-material .buttons_input button.btn:nth-child(3)')
.should('contain.text', 'Apply').click()
cy.get('mat-table mat-row').should('have.length.lessThan', 10)
cy.get('mat-table mat-row').should('have.length.lessThan', 11)
cy.get('ngx-daterangepicker-material').should('exist')
})

Expand All @@ -66,11 +66,12 @@ describe('Main Tests', () => {
describe('Issue: On event-overview page', () => {
it('back button should restore the state of the previous page', () => {
cy.visit('/')
cy.get('mat-row:nth-child(9) .link').first().click()
cy.get('mat-row:nth-child(7) .link').first().click()
cy.wait(1000)
cy.get('sg-overview-control button').last().click()
cy.wait(1000)
cy.get('ngx-graph .node-group:nth-child(3)').click()
cy.get('.spline-card-header__title').should('contain.text', 'my-other-job-output')
cy.get('.spline-card-header__title').should('contain.text', 'otherJobResults')
cy.get('spline-data-widget .spline-data-record__value a').last().click()
cy.get('h2.text-center').should('contain.text', 'Data Source State History')
cy.go('back')
Expand Down
12 changes: 11 additions & 1 deletion ui/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ module.exports = {
'<rootDir>/setup-jest.ts'
],
'rootDir': __dirname,
'testPathIgnorePatterns': [
'projects/spline-shared/dynamic-table/main/src/components/search-dynamic-table/__tests__'
],
'transformIgnorePatterns': [
'node_modules/(?!@ngrx)'
],
// transform: {
// "^.+\\.jsx?$": "babel-jest",
// "^.+\\.mjs$": "babel-jest",
// },
'testResultsProcessor': 'jest-teamcity-reporter',
'coverageReporters': [
'text',
Expand All @@ -33,6 +40,7 @@ module.exports = {
],
'coverageDirectory': 'target/coverage',
'moduleNameMapper': {
// '^ngx-daterangepicker-material$': __dirname + 'node_modules/ngx-daterangepicker-material/fesm2015/ngx-daterangepicker-material.mjs',
'^lodash-es$': __dirname + '/node_modules/lodash/index.js',
'/spline-api/': __dirname + '/projects/spline-api/src/public-api',
'^spline-api$': __dirname + '/projects/spline-api/src/public-api',
Expand All @@ -44,6 +52,8 @@ module.exports = {
'^spline-common\/graph$': __dirname + '/projects/spline-common/graph/src/public-api',
'/spline-common\/layout/': __dirname + '/projects/spline-common/layout/src/public-api',
'^spline-common\/layout$': __dirname + '/projects/spline-common/layout/src/public-api',
'/spline-common\/main/': __dirname + '/projects/spline-common/main/src/public-api',
'^spline-common\/main': __dirname + '/projects/spline-common/main/src/public-api',
'/spline-common\/dynamic-table/': __dirname + '/projects/spline-common/dynamic-table/src/public-api',
'^spline-common\/dynamic-table$': __dirname + '/projects/spline-common/dynamic-table/src/public-api',
'/spline-common\/dynamic-filter\/filter-controls/': __dirname + '/projects/spline-common/dynamic-filter/filter-controls/src/public-api',
Expand Down Expand Up @@ -72,7 +82,7 @@ module.exports = {
'resolver': null,
'globals': {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json'
tsconfig: '<rootDir>/tsconfig.spec.json'
}
}
};
1 change: 1 addition & 0 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"babel-jest": "^27.5.1",
"codelyzer": "^6.0.0",
"cypress": "^12.5.1",
"eslint": "^7.26.0",
Expand Down
17 changes: 0 additions & 17 deletions ui/projects/spline-api/src/lib/core/models/public-api.ts

This file was deleted.

18 changes: 0 additions & 18 deletions ui/projects/spline-api/src/lib/core/public-api.ts

This file was deleted.

26 changes: 0 additions & 26 deletions ui/projects/spline-api/src/lib/core/spline-api-core.module.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions ui/projects/spline-api/src/lib/execution-event/models/index.ts

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions ui/projects/spline-api/src/lib/execution-event/public-api.ts

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/


import { DataSourceWriteMode, SplineDataSourceInfo, uriToDatasourceInfo } from '../data-source'

import { ExecutionEventLineageNodeType } from './execution-event-lineage-node-type.models'
Expand Down Expand Up @@ -55,8 +54,9 @@ export namespace ExecutionEventLineageList {

export function toLineageList(lineage: ExecutionEventLineage, showInputs: boolean = true): LineageRecord[] {
const executionEventNodes = lineage.nodes.filter(node => node.type === ExecutionEventLineageNodeType.Execution)
return executionEventNodes
.sort()
const sortedExecutionEventNodes = executionEventNodes.sort()

return sortedExecutionEventNodes
.reduce(
(acc, currentNode) => [...acc, ...extractEventLineageList(lineage, currentNode, showInputs)],
[]
Expand All @@ -83,7 +83,8 @@ export namespace ExecutionEventLineageList {

export function extractEventLineageList(lineage: ExecutionEventLineage,
eventNode: ExecutionEventLineageNode,
showInputs: boolean = true): LineageRecord[] {
showInputs: boolean = true
): LineageRecord[] {
const targetDataSourceNodeId = lineage.links.find(x => x.source === eventNode.id).target
const targetDataSourceNode = lineage.nodes.find(x => x.id === targetDataSourceNodeId)

Expand Down
Loading

0 comments on commit c8d1c01

Please sign in to comment.