-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Functions tab to left navigation menu in Dev perspective
- Loading branch information
lprabhu
committed
Sep 20, 2023
1 parent
b5aa690
commit 0bd1072
Showing
26 changed files
with
607 additions
and
45 deletions.
There are no files selected for viewing
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
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
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
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
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
32 changes: 32 additions & 0 deletions
32
...packages/knative-plugin/integration-tests/features/functions/functions-navigation.feature
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,32 @@ | ||
@knative-serverless @knative | ||
Feature: Navigations to Serverless Functions page | ||
As a user, I want to navigate to Serverless functions page in developer perspective | ||
|
||
Background: | ||
Given user is at developer perspective | ||
And user has created or selected namespace "aut-knative-functions" | ||
|
||
|
||
@smoke | ||
Scenario: User navigates to Functions page when no Function is created: KN-08-TC01 | ||
When user clicks on the Functions tab | ||
Then user redirected to Functions page | ||
And user is able to see the message "No Functions found" | ||
|
||
@smoke | ||
Scenario: User navigates to Functions page when Function is created: KN-08-TC02 | ||
Given user has created a serverless function using repo "https://github.com/Lucifergene/serverless-func-repo" with name "serverless-func-test-repo" | ||
When user clicks on the Functions tab | ||
Then user redirected to Functions page | ||
And user will see the serverless functions listed | ||
|
||
|
||
@smoke | ||
Scenario: User navigates to Function details page: KN-08-TC03 | ||
Given user clicks on the Functions tab | ||
When user clicks on the function name "serverless-func-test-repo" | ||
Then user will see the Details page opened | ||
And user is able to see service URL and Revisions details | ||
And user is able to see Containers sections | ||
|
||
|
5 changes: 5 additions & 0 deletions
5
frontend/packages/knative-plugin/integration-tests/support/pageObjects/functions-po.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,5 @@ | ||
export const functionsPO = { | ||
emptyState: 'div.pf-c-empty-state__content', | ||
table: '[role="grid"]', | ||
search: '[data-test-id="item-filter"]', | ||
}; |
18 changes: 18 additions & 0 deletions
18
frontend/packages/knative-plugin/integration-tests/support/pages/functions/functions-page.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,18 @@ | ||
import { functionsPO } from '../../pageObjects/functions-po'; | ||
|
||
export const functionsPage = { | ||
verifyTitle: () => cy.byTestSectionHeading('Service details').should('be.visible'), | ||
verifyMessage: (noFunctionsFound: string) => | ||
cy.get(functionsPO.emptyState).contains(noFunctionsFound), | ||
verifyFunctionsListed: () => { | ||
cy.get(functionsPO.table).get('table').its('length').should('be.greaterThan', 0); | ||
}, | ||
clickFunctionName: (name: string) => cy.get(`a[title="${name}"]`).click(), | ||
search: (name: string) => { | ||
cy.get(functionsPO.search).clear().type(name); | ||
}, | ||
verifyServiceURL: () => cy.byTestID('URL').should('be.visible'), | ||
verifyServiceRevision: () => cy.byTestID('Revisions').should('be.visible'), | ||
verifyContainerSection: () => | ||
cy.get('[data-test-section-heading="Containers"]').should('be.visible'), | ||
}; |
64 changes: 64 additions & 0 deletions
64
...ative-plugin/integration-tests/support/step-definitions/functions/functions-navigation.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,64 @@ | ||
import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; | ||
import { detailsPage } from '@console/cypress-integration-tests/views/details-page'; | ||
import { | ||
devNavigationMenu, | ||
switchPerspective, | ||
} from '@console/dev-console/integration-tests/support/constants'; | ||
import { | ||
createGitWorkloadIfNotExistsOnTopologyPage, | ||
navigateTo, | ||
perspective, | ||
} from '@console/dev-console/integration-tests/support/pages'; | ||
import { functionsPage } from '../../pages/functions/functions-page'; | ||
|
||
Given('user is at developer perspective', () => { | ||
perspective.switchTo(switchPerspective.Developer); | ||
}); | ||
|
||
When('user clicks on the Functions tab', () => { | ||
navigateTo(devNavigationMenu.Functions); | ||
}); | ||
|
||
Then('user redirected to Functions page', () => { | ||
detailsPage.titleShouldContain('Functions'); | ||
}); | ||
|
||
Then('user is able to see the message {string}', (noFunctionsFound: string) => { | ||
functionsPage.verifyMessage(noFunctionsFound); | ||
}); | ||
|
||
Given( | ||
'user has created a serverless function using repo {string} with name {string}', | ||
(gitRepo: string, name: string) => { | ||
createGitWorkloadIfNotExistsOnTopologyPage( | ||
gitRepo, | ||
name, | ||
'Serverless Function', | ||
`${name}-app`, | ||
false, | ||
true, | ||
); | ||
}, | ||
); | ||
|
||
Then('user will see the serverless functions listed', () => { | ||
functionsPage.verifyFunctionsListed(); | ||
}); | ||
|
||
When('user clicks on the function name {string}', (functionName: string) => { | ||
functionsPage.search(functionName); | ||
functionsPage.clickFunctionName(functionName); | ||
}); | ||
|
||
Then('user will see the Details page opened', () => { | ||
functionsPage.verifyTitle(); | ||
}); | ||
|
||
Then('user is able to see service URL and Revisions details', () => { | ||
functionsPage.verifyServiceURL(); | ||
functionsPage.verifyServiceRevision(); | ||
}); | ||
|
||
Then('user is able to see Containers sections', () => { | ||
functionsPage.verifyContainerSection(); | ||
}); |
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.