-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix remove unused classes (#3389)
* fix(#3388): Refactor asset link test * fix(#3388): Extend asset link test to test deletion * refactor: Remove unused classes AssetsUtil and LocalesUtil
- Loading branch information
Showing
9 changed files
with
206 additions
and
132 deletions.
There are no files selected for viewing
36 changes: 0 additions & 36 deletions
36
...anagement/src/main/java/org/apache/streampipes/extensions/management/util/AssetsUtil.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...nagement/src/main/java/org/apache/streampipes/extensions/management/util/LocalesUtil.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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. | ||
* | ||
*/ | ||
|
||
export class AssetBtns { | ||
public static createAssetBtn() { | ||
return cy.dataCy('create-new-asset-button', { timeout: 10000 }); | ||
} | ||
|
||
public static assetNameInput() { | ||
return cy.dataCy('asset-name', { timeout: 10000 }); | ||
} | ||
|
||
public static saveAssetBtn() { | ||
return cy.dataCy('save-asset', { timeout: 10000 }); | ||
} | ||
|
||
public static editAssetBtn(assetName: string) { | ||
return cy.dataCy('edit-asset-' + assetName, { timeout: 10000 }); | ||
} | ||
|
||
public static deleteAssetBtn(assetName: string) { | ||
return cy.dataCy('delete-asset-' + assetName, { timeout: 10000 }); | ||
} | ||
|
||
public static basicTab() { | ||
return cy.dataCy('basic-tab', { timeout: 10000 }); | ||
} | ||
|
||
public static assetLinksTab() { | ||
return cy.dataCy('asset-links-tab', { timeout: 10000 }); | ||
} | ||
|
||
public static manageLinksBtn() { | ||
return cy.dataCy('assets-manage-links-button', { timeout: 10000 }); | ||
} | ||
|
||
public static adapterCheckbox(adapterName: string) { | ||
return cy.dataCy('select-adapters-checkbox-' + adapterName, { | ||
timeout: 10000, | ||
}); | ||
} | ||
|
||
public static dataStreamCheckbox(adapterName: string) { | ||
return cy.dataCy('select-data-stream-checkbox-' + adapterName, { | ||
timeout: 10000, | ||
}); | ||
} | ||
|
||
public static updateAssetLinksBtn() { | ||
return cy.dataCy('assets-update-links-button', { timeout: 10000 }); | ||
} | ||
|
||
public static goBackToOverviewBtn() { | ||
return cy.dataCy('save-data-explorer-go-back-to-overview', { | ||
timeout: 10000, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
ui/cypress/tests/assetManagement/generalAssetTest.smoke.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You 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 { AssetUtils } from '../../support/utils/asset/AssetUtils'; | ||
import { DashboardUtils } from '../../support/utils/DashboardUtils'; | ||
import { AssetBtns } from '../../support/utils/asset/AssetBtns'; | ||
|
||
describe('Creates a new adapter, add to assets', () => { | ||
beforeEach('Setup Test', () => { | ||
cy.initStreamPipesTest(); | ||
}); | ||
|
||
it('Perform Test', () => { | ||
const assetName = 'TestAsset'; | ||
|
||
AssetUtils.addAssetWithOneAdapter(assetName); | ||
|
||
// // Leave and navigate back to Assets | ||
DashboardUtils.goToDashboard(); | ||
AssetUtils.goToAssets(); | ||
AssetUtils.checkAmountOfAssets(1); | ||
|
||
// Check that everything was stored correctly | ||
AssetUtils.editAsset(assetName); | ||
AssetBtns.assetLinksTab().click(); | ||
AssetUtils.checkAmountOfLinkedResources(2); | ||
|
||
// Check that deletion of asset works | ||
AssetUtils.goToAssets(); | ||
AssetUtils.checkAmountOfAssets(1); | ||
AssetUtils.deleteAsset(assetName); | ||
AssetUtils.checkAmountOfAssets(0); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.