generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/cdctoolbox 462 #107
Open
Helsinky
wants to merge
69
commits into
dev
Choose a base branch
from
feature/CDCTOOLBOX-462
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,696
−85
Open
Changes from 68 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
8c49d59
Adding second implementation
76dae99
Adding files
58eb20a
CDCTOOLBOX-462:Continuing implementation
88e602e
Local changes
3a6bca0
Local changes
df7beda
Local changes. Lite/Full
4f99940
CDCTOOLBOX-462: Lite configuration
9fae37b
CDCTOOLBOX-462:Fixing Mandatory fields and tooltip
bbbeae8
feature/CDCTOOLBOX-462: Fixing CSS Changes
e8d2b39
feature:CDCTOOLBOX-462: Changing azure templates
959cdcf
Fixing local
4789bc1
feature/CDCTOOLBOX-462:Centralizing feature
1e4c9af
feature/CDCTOOLBOX-462: Fixing second part changes
8959101
Local changes
16db78b
feature/CDCTOOLBOX-462: Removing other servers
aa56a33
feature/CDCTOOLBOx-462: Adding copyright comment
b910eb3
Adding local testing
cb98c5d
feature/CDCTOOLBOX-462:Adding jest testing for server import
799edcb
feature/CDCTOOLBOX-462:Adding jest testing for server import
9f4a220
feature/CDCTOOLBOX-462:Adding tests
1dbd608
feature/CDCTOOLBOX-462:Fixing cypress testing
b375fb9
feature/CDCTOOLBOX-462:Remove cypress file
bb1bcdd
feature/CDCTOOLBOX-462:Changing button ID
7831838
feature/CDCTOOLBOX-462:Adding cypress testing
0888066
feature/CDCTOOLBOX-462:Ading cypress tests
26347c5
feature/CDCTOOLBOX-462:Adding cypress testing
ca54a6e
feature/CDCTOOLBOX-462:Fixing server import jest testing
30e5fb1
featurEe
80a41d2
feature/CDCTOOLBOX-462:Fixing duplicated code from templates
ca429c5
feature/CDCTOOLBOX-462:Adding one more common data
7ce7145
feature/CDCTOOLBOX-462: ADDING MORE COMMON STEPS
e89dbb5
feature/CDCTOOLBOX-462: ADDING GENERIC FUNTION
5d310a2
feature/CDCTOOLBOX-462:Adding some refactoring
472cf4e
feature/CDCTOOLBOX-462:Refactoring dinamic steps
71f90f5
feature/CDCTOOLBOX-462:Removing and refactoring empty lines and hardC…
401b02d
feature/CDCTOOLBOX-462:Refactoring code for PR
0e0cb1a
feature/CDCTOOLBOX-462:Adding first feature and Collapsable panels
d146630
feature/CDCTOOLBOX-462:Fixing view
50ba9ca
feature/CDCTOOLBOX-462:Adding the first feature and joining them
dac5de7
feature/CDCTOOLBOX-462:Fixing requested changes
d03da50
feature/CDCTOOLBOX-462:Fixing requested changes
454fa2b
feature/CDCTOOLBOX-462:Fixing cypress testing
01a689b
feature/CDCTOOLBOX-462:Fixing code smells
50b9a4d
feature/CDCTOOLBOX-462:Fixing changes
6a464be
feature/CDCTOOLBOX-462:Adding slice tests
af48d9d
feature/CDCTOOLBOX-462:Add empty lines on the treeSearch class
05864b5
CDCTOOLBOX-462:Fixing changes
a2036d1
feature/CDCTOOLBOX-462:Changing dataflow id on the expected message
7643826
feature/CDCTOOLBOX-462:Fixing changes
38ba44a
feature/CDCTOOLBOX-462:Fixing import Redux utils changes
3493297
feature/CDCTOOLBOX-462:Fixing cypress testing
c3340aa
CDCTOOLBOX-462:Adding more tests
956a382
CDCTOOLBOX-462:Adding redirection link and adjusting tests
00d5fd6
feature/CDCTOOLBOX-462:Adding tests
f040bf9
feature/CDCTOOLBOX-462:Removing code smells
e849ad4
feature/CDCTOOBOX-462:Removing useless code
00fcd82
feature/CDCTOOLBOX-462:Fixing url from dataflow success message
4c4c5dc
feature/CDCTOOLBOX-462:Fixing checkmarx
067db8e
feature/CDCDTOOLBOX-462: Fixing requested changes
3839449
feature/CDCTOOLBOX-462:Refactoring condition for mandatory fields
7044434
feature/CDCTOOLBOX-462:Fixing redirectional url
e92897c
feature/CDCTOOLBOX-462:Fixing cypress testing
7abbc88
feature/CDCTOOLBOX-462:Changing function name
85d7583
feature/CDCTOOLBOX-462:Fixing grey page after url link
407da21
feature/CDCTOOLBOX-462:Adding validation before replacing variables
d1a9621
feature/CDCTOOLBOX-462:Fixing cypress testing
f758e6a
feature/CDCTOOLBOX-462:Adding tests
661ab8d
feature/CDCTOOLBOX-462:Fixing testing
9487506
feature/CDCTOOLBOX-462:Refactoring dataflow template
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright: Copyright 2023 SAP SE or an SAP affiliate company and cdc-tools-chrome-extension contributors | ||
* License: Apache-2.0 | ||
*/ | ||
|
||
import * as dataTest from './dataTest' | ||
import * as utils from './utils' | ||
|
||
describe('Server Import test suite', () => { | ||
context('Import Full for Azure local storage', () => { | ||
beforeEach(() => { | ||
utils.startUp(dataTest.importAccounts) | ||
cy.get('#serverImportPanel').click() | ||
utils.checkServerImportState('Full') | ||
}) | ||
it('Import account', () => { | ||
cy.intercept('POST', 'idx.createDataflow', { | ||
body: dataTest.mockedGigyaResponseOk, | ||
}) | ||
cy.intercept('POST', 'idx.search', { | ||
body: dataTest.mockedSearchDataflowsResponse, | ||
}) | ||
|
||
cy.get('#serverImportSaveButton').should('have.attr', 'disabled', 'disabled') | ||
cy.get('#\\{\\{dataflowName\\}\\}').shadow().find('.ui5-input-inner').type('dataflowName') | ||
cy.get('#\\{\\{accountName\\}\\}').shadow().find('.ui5-input-inner').type('accountName') | ||
cy.get('#\\{\\{accountKey\\}\\}').shadow().find('.ui5-input-inner').type('accountKey') | ||
cy.get('#\\{\\{container\\}\\}').shadow().find('.ui5-input-inner').type('container') | ||
cy.get('#\\{\\{readFileNameRegex\\}\\}').shadow().find('.ui5-input-inner').should('have.value', '') | ||
cy.get('#\\{\\{blobPrefix\\}\\}').shadow().find('.ui5-input-inner').should('have.value', '') | ||
cy.get('#serverImportSaveButton').should('not.be.disabled').click() | ||
cy.get('#serverImportSuccessPopup').find('span').eq(0).should('have.text', dataTest.serverImportSuccessMessage) | ||
}) | ||
}) | ||
}) |
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
33 changes: 33 additions & 0 deletions
33
src/components/server-import-form/server-import-component.styles.js
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,33 @@ | ||
const styles = { | ||
formContainer: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
width: '100%', | ||
margin: '0 auto', | ||
padding: '10px', | ||
borderRadius: '4px', | ||
}, | ||
outerDiv: { | ||
marginLeft: '10px', | ||
width: '100%', | ||
}, | ||
labelIconContainer: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
width: '100%', | ||
}, | ||
tooltipIconStyle: { | ||
alignSelf: 'center', | ||
marginLeft: '6px', | ||
color: '#1d2d3e', | ||
}, | ||
inputStyle: { | ||
width: '98%', | ||
}, | ||
outerDivFormItem: { | ||
width: '100%', | ||
}, | ||
MandatoryFieldIcon: { color: '#ba066c' }, | ||
} | ||
|
||
export default styles |
18 changes: 18 additions & 0 deletions
18
src/components/server-import-form/server-import-custom-label-component.jsx
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 { createUseStyles } from 'react-jss' | ||
import { Label } from '@ui5/webcomponents-react' | ||
import styles from './server-import-component.styles.js' | ||
|
||
const CustomLabel = ({ name }) => { | ||
const useStyles = createUseStyles(styles, { name: 'Server Import' }) | ||
const classes = useStyles() | ||
const parts = name.split('*') | ||
return ( | ||
<Label> | ||
{parts[0]} | ||
{parts.length > 1 && <span className={classes.MandatoryFieldIcon}>*</span>} | ||
{parts[1]} | ||
</Label> | ||
) | ||
} | ||
|
||
export default CustomLabel |
60 changes: 60 additions & 0 deletions
60
src/components/server-import-form/server-import-form.container.jsx
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,60 @@ | ||
import { useState } from 'react' | ||
import { Icon, Input, Popover } from '@ui5/webcomponents-react' | ||
import { createUseStyles } from 'react-jss' | ||
import styles from './server-import-component.styles.js' | ||
import CustomLabel from './server-import-custom-label-component.jsx' | ||
|
||
const FormItemWithIcon = ({ field, handleInputChange }) => { | ||
const useStyles = createUseStyles(styles, { name: 'Server Import' }) | ||
const classes = useStyles() | ||
const [isMouseOverIcon, setIsMouseOverIcon] = useState(false) | ||
const [tooltipTarget, setTooltipTarget] = useState('') | ||
|
||
const onMouseOverHandler = (event) => { | ||
if (event.target.shadowRoot) { | ||
setTooltipTarget(event.target.shadowRoot.host.id) | ||
setIsMouseOverIcon(true) | ||
} | ||
} | ||
const onMouseOutHandler = () => { | ||
setIsMouseOverIcon(false) | ||
} | ||
|
||
const openPopover = (id) => { | ||
return isMouseOverIcon && tooltipTarget === `${id}TooltipIcon` | ||
} | ||
return ( | ||
<div className={classes.outerDiv}> | ||
<div className={classes.labelIconContainer}> | ||
<CustomLabel name={field.name} /> | ||
{field.tooltip && ( | ||
<> | ||
<Icon | ||
id={`${field.id}TooltipIcon`} | ||
name="message-information" | ||
design="Neutral" | ||
onMouseOver={onMouseOverHandler} | ||
onMouseOut={onMouseOutHandler} | ||
className={classes.tooltipIconStyle} | ||
/> | ||
<Popover className={classes.popoverStyle} id={`${field.id}Popover`} opener={`${field.id}TooltipIcon`} open={openPopover(field.id)} placementType="Right"> | ||
{field.tooltip} | ||
</Popover> | ||
</> | ||
)} | ||
</div> | ||
|
||
<Input | ||
id={field.id} | ||
type={field.type} | ||
name={field.name} | ||
placeholder={field.placeholder} | ||
className={classes.inputStyle} | ||
value={field.value !== undefined ? field.value : ''} | ||
onInput={(event) => handleInputChange(event, field.id)} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
||
export default FormItemWithIcon |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,4 @@ | |
* License: Apache-2.0 | ||
*/ | ||
|
||
|
||
export const ZIP_FILE_MIME_TYPE = 'application/zip' |
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
* License: Apache-2.0 | ||
*/ | ||
|
||
|
||
export const testErrorObject = { | ||
callId: '1234567890', | ||
errorCode: 500000, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
don't you have already a success response defined for previous tests?
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.
Resolved, I've reused a success message that was using on another test.
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.
This object is not used in the code/tests