Skip to content

Commit

Permalink
Features for hub
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitCLI committed Oct 27, 2023
1 parent 7bf1c8a commit a557ed9
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cdap-e2e-tests/src/e2e-test/features/Hub/DesignTime.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright © 2023 Cask Data, Inc.
#
# 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.

@Hub
Feature: Hub - Design time scenarios

@TS-HUB-DESIGN-01
Scenario: Verify that the user is able to successfully navigate to the Hub page
When Open Datafusion Project to configure pipeline
Then Click on Hub Menu
Then Verify that user is navigated to hub page successfully
Then Click on close button

@TS-HUB-DESIGN-02
Scenario: Verify that the user is getting an error message for an invalid search
When Open Datafusion Project to configure pipeline
Then Click on Hub Menu
Then Enter the text in search tab "invalidMessage_hub"
Then Verify that search displaying an error message: "invalid.message_hub" on the header
31 changes: 31 additions & 0 deletions cdap-e2e-tests/src/e2e-test/features/Hub/Runtime.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright © 2023 Cask Data, Inc.
#
# 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.

@Hub
Feature: Hub - Run time scenarios

@TS-HUB-RNTM-01
Scenario: Verify that the user is able to deploy a plugin in Hub and then delete it successfully
When Open Datafusion Project to configure pipeline
Then Click on Hub Menu
Then Click on "Plugins" option
Then Enter the text in search tab "Anaplan"
Then Click on "Anaplan plugins" plugin
Then Deploy the plugin
Then Verify that "Anaplan" plugin is successfully deployed
Then Enter the text in search tab "anaplan" in control center
Then Select dropdown : "Filter" with option value: "Artifacts" in control center
Then Click on delete button to delete the plugin
Then Verify that plugin is successfully deleted

36 changes: 36 additions & 0 deletions cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/hub/TestRunner.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright © 2023 Cask Data, Inc.
*
* 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.
*/

package io.cdap.cdap.hub;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;

/**
* Test Runner to execute Hub related test cases.
*/
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"src/e2e-test/features"},
glue = {},
tags = {"@Hub"},
plugin = {"pretty", "html:target/cucumber-html-report/hub",
"json:target/cucumber-reports/cucumber-hub.json",
"junit:target/cucumber-reports/cucumber-hub.xml"}
)
public class TestRunner {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright © 2023 Cask Data, Inc.
*
* 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.
*/

/**
* Package contains the runners for Hub features.
*/
package io.cdap.cdap.hub;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invalid.message_hub=No entities found
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Filter=filter-dropdown
Artifcats=Artifacts-input
Anaplan=anaplan-plugins
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ clientUrl=http://localhost:11011
serverUrl=https://placeholder.com/api
# command to generate token: gcloud auth print-access-token
serverAccessToken=placeholder

## HUB-PROPERTIES-START
expectedPluginName=Anaplan
expectedElement=HUB
invalidMessage_hub=sfts
Artifacts=Artifacts-input
## HUB-PROPERTIES-END

0 comments on commit a557ed9

Please sign in to comment.