New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress Scripts - Create from git add flow ODC-4976 #7103
Cypress Scripts - Create from git add flow ODC-4976 #7103
Conversation
/hold |
/retest |
/hold cancel |
@makambalaji You have typescript errors from the looks of things:
|
frontend/packages/dev-console/integration-tests/features/addFlow/create-from-catalog.feature
Show resolved
Hide resolved
frontend/packages/dev-console/integration-tests/features/addFlow/create-from-catalog.feature
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/integration-tests/features/addFlow/create-from-catalog.feature
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/integration-tests/features/addFlow/create-from-git.feature
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/integration-tests/features/addFlow/create-from-git.feature
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/integration-tests/features/addFlow/create-from-git.feature
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/integration-tests/features/addFlow/create-from-git.feature
Outdated
Show resolved
Hide resolved
/hold |
/retest |
/hold cancel |
/lgtm |
@@ -0,0 +1,192 @@ | |||
export const cardTitle = 'div.catalog-tile-pf-title'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file name has 2 ..
, add-flow-po..ts
export function createGitWorkload( | ||
gitUrl: string = 'https://github.com/sclorg/nodejs-ex.git', | ||
componentName: string = 'nodejs-ex-git', | ||
resourceType: string = 'Deployment', | ||
appName: string = 'nodejs-ex-git-app', | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit : can we make use of arrow function?
export function createGitWorkload( | |
gitUrl: string = 'https://github.com/sclorg/nodejs-ex.git', | |
componentName: string = 'nodejs-ex-git', | |
resourceType: string = 'Deployment', | |
appName: string = 'nodejs-ex-git-app', | |
) { | |
export const createGitWorkload( | |
gitUrl: string = 'https://github.com/sclorg/nodejs-ex.git', | |
componentName: string = 'nodejs-ex-git', | |
resourceType: string = 'Deployment', | |
appName: string = 'nodejs-ex-git-app', | |
) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I will update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i still see this 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its updated
import { addPage } from '../add-flow/add-page'; | ||
import { addOptions } from '../../constants/add'; | ||
import { pageTitle } from '../../constants/pageTitle'; | ||
import { topologyPO } from '../../pageObjects/topology-po'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious what does P0
mean here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pageobjects
case 'Edit Application Grouping': | ||
case nodeActions.EditApplicatoinGrouping: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why two similar switch case one with const and one string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's like a or condition, where either or case will pass then the statement will get executed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that i got my doubt why we need condition as both looks similar to me 'Edit Application Grouping'
and nodeActions.EditApplicatoinGrouping
shouldn't the const as well have same values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes we use to pass them from gherkin scripts like
user selects "Move Sink" from context menu
and some times without "" (double quotes) so it should work for both. So I used these technique
@invincibleJai - Updated as per your comments, Can you please re-review it |
…ow/create-from-git.feature Co-authored-by: Sanket Pathak <sanketpathak95@gmail.com>
@@ -0,0 +1,102 @@ | |||
import { catalogPO } from '../../pageObjects/add-flow-po.'; | |||
import { caatalogCards, catalogTypes } from '../../constants/add'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: caatalogCards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
frontend/packages/dev-console/integration-tests/support/pages/add-flow/git-page.ts
Outdated
Show resolved
Hide resolved
case 'Edit Application Grouping': | ||
case nodeActions.EditApplicatoinGrouping: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that i got my doubt why we need condition as both looks similar to me 'Edit Application Grouping'
and nodeActions.EditApplicatoinGrouping
shouldn't the const as well have same values?
export const topologyActions = { | ||
selectAction: (action: nodeActions | string) => { | ||
switch (action) { | ||
case nodeActions.EditApplicatoinGrouping || 'Edit Application Grouping': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what you had before was fine then having ||
here , my doubt was why we need condition as both looks similar to me 'Edit Application Grouping' and nodeActions.EditApplicatoinGrouping shouldn't the const as well have same values?
and as i see nodeActions.EditApplicatoinGrouping
as well have same value 'Edit Application Grouping'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes we use to pass them from gherkin scripts like
user selects "Move Sink" from context menu
and some times without "" (double quotes) so it should work for both. So I used these technique
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah does that matter in switch case string is string right check here https://jsfiddle.net/invincibleJai/3tov1ags/3/
…add-flow/git-page.ts Co-authored-by: Jaivardhan Kumar <mailjai.vardhan@gmail.com>
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: invincibleJai, makambalaji, sanketpathak The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Renamed the feature files and added the scripts related to git add flow
Defect Raised :
ODC-5108 - Page redirecting to topology list view instead of topology graph view
Web Accessibility testing defect raised - ODC-5119, ODC-5129
Please Note: This scripts are not integrated with CI
If need to verify, execute the below command "npm run test-cypress-devconsole" on fronted
Test Results:
No. of smoke test cases in this pr : 2 [Execution time: 55 sec]
No. of regression test cases in this pr: 12 [Execution time: 9 min]