mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-19 05:52:20 +00:00

* chore(test): organise cypress tests * improve entity tests * update tests * support service spec * fixed glossary term issue * support custom properties * fix tier flakiness * fix failing tests * fix service spec and add search index tests * update tests * enhance tests to cover Database related entities * fix database spec * fix tests * add dashabord datamodel entity * run all the specs * fix import error * fix test * fix some tests * support soft deleted checks * address comments * fix test failures * fix test failures * reduce test results count to avoid cypress limit * fix test issues * fix updateDisplayName spec * fix custom property and visit entity issues * Fix DQ tests
71 lines
2.0 KiB
TypeScript
71 lines
2.0 KiB
TypeScript
/*
|
|
* Copyright 2023 Collate.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
import { createSingleLevelEntity } from '../../common/EntityUtils';
|
|
import { visitServiceDetailsPage } from '../../common/serviceUtils';
|
|
import { SERVICE_TYPE } from '../../constants/constants';
|
|
import { EntityType } from '../../constants/Entity.interface';
|
|
import { PIPELINE_SERVICE } from '../../constants/EntityConstant';
|
|
import EntityClass from './EntityClass';
|
|
|
|
class PipelineServiceClass extends EntityClass {
|
|
pipelineServiceName: string;
|
|
|
|
constructor() {
|
|
const pipelineServiceName = `cypress-pipeline-service-${Date.now()}`;
|
|
super(
|
|
pipelineServiceName,
|
|
PIPELINE_SERVICE.entity,
|
|
EntityType.PipelineService
|
|
);
|
|
|
|
this.pipelineServiceName = pipelineServiceName;
|
|
this.name = 'Pipeline Service';
|
|
}
|
|
|
|
visitEntity() {
|
|
visitServiceDetailsPage(
|
|
{
|
|
name: this.pipelineServiceName,
|
|
type: SERVICE_TYPE.Pipeline,
|
|
},
|
|
false
|
|
);
|
|
}
|
|
|
|
// Creation
|
|
|
|
createEntity() {
|
|
// Handle creation here
|
|
|
|
cy.getAllLocalStorage().then((data) => {
|
|
const token = Object.values(data)[0].oidcIdToken as string;
|
|
|
|
createSingleLevelEntity({
|
|
...PIPELINE_SERVICE,
|
|
service: {
|
|
...PIPELINE_SERVICE.service,
|
|
name: this.pipelineServiceName,
|
|
},
|
|
entity: {
|
|
...PIPELINE_SERVICE.entity,
|
|
service: this.pipelineServiceName,
|
|
},
|
|
token,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
export default PipelineServiceClass;
|