-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! feat: add azu…
…re branch detection Signed-off-by: Oleksii Orel <[email protected]>
- Loading branch information
Showing
6 changed files
with
420 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...end/src/components/ImportFromGit/RepoOptionsAccordion/AdvancedOptions/__mocks__/index.tsx
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,42 @@ | ||
/* | ||
* Copyright (c) 2018-2024 Red Hat, Inc. | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { Props } from '@/components/ImportFromGit/RepoOptionsAccordion/AdvancedOptions'; | ||
|
||
export class AdvancedOptions extends React.PureComponent<Props> { | ||
public render() { | ||
const { | ||
containerImage, | ||
temporaryStorage, | ||
createNewIfExisting, | ||
memoryLimit, | ||
cpuLimit, | ||
onChange, | ||
} = this.props; | ||
|
||
return ( | ||
<div> | ||
<div>Advanced Options</div> | ||
<div data-testid="advanced-options">{`${containerImage}, ${temporaryStorage}, ${createNewIfExisting}, ${memoryLimit}, ${cpuLimit}`}</div> | ||
<button | ||
onClick={() => | ||
onChange('newContainerImage', !temporaryStorage, !createNewIfExisting, 1073741824, 1) | ||
} | ||
> | ||
Advanced Options Change | ||
</button> | ||
</div> | ||
); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...tend/src/components/ImportFromGit/RepoOptionsAccordion/GitRepoOptions/__mocks__/index.tsx
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,40 @@ | ||
/* | ||
* Copyright (c) 2018-2024 Red Hat, Inc. | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { Props } from '@/components/ImportFromGit/RepoOptionsAccordion/GitRepoOptions'; | ||
|
||
export class GitRepoOptions extends React.PureComponent<Props> { | ||
public render() { | ||
const { gitBranch, remotes, devfilePath, hasSupportedGitService, onChange } = this.props; | ||
|
||
return ( | ||
<div> | ||
<div>Git Repo Options</div> | ||
<div data-testid="git-repo-options">{`${gitBranch}, ${JSON.stringify(remotes)}, ${devfilePath}, ${hasSupportedGitService}`}</div> | ||
<button | ||
onClick={() => | ||
onChange( | ||
'newBranch', | ||
[{ name: 'test-updated', url: 'http://test' }], | ||
'newDevfilePath', | ||
true, | ||
) | ||
} | ||
> | ||
Git Repo Options Change | ||
</button> | ||
</div> | ||
); | ||
} | ||
} |
171 changes: 171 additions & 0 deletions
171
...components/ImportFromGit/RepoOptionsAccordion/__tests__/__snapshots__/index.spec.tsx.snap
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,171 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`RepoOptionsAccordion snapshot with default values 1`] = ` | ||
<div | ||
aria-label="" | ||
className="pf-c-accordion" | ||
> | ||
<h3> | ||
<button | ||
aria-expanded={false} | ||
className="pf-c-accordion__toggle" | ||
data-testid="accordion-item-git-repo-options" | ||
id="accordion-item-git-repo-options" | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
<span | ||
className="pf-c-accordion__toggle-text" | ||
> | ||
Git Repo Options | ||
</span> | ||
<span | ||
className="pf-c-accordion__toggle-icon" | ||
> | ||
<svg | ||
aria-hidden={true} | ||
aria-labelledby={null} | ||
fill="currentColor" | ||
height="1em" | ||
role="img" | ||
style={ | ||
{ | ||
"verticalAlign": "-0.125em", | ||
} | ||
} | ||
viewBox="0 0 256 512" | ||
width="1em" | ||
> | ||
<path | ||
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z" | ||
/> | ||
</svg> | ||
</span> | ||
</button> | ||
</h3> | ||
<div | ||
className="pf-c-accordion__expanded-content" | ||
data-testid="options-content" | ||
hidden={true} | ||
id="" | ||
> | ||
<div | ||
className="pf-c-accordion__expanded-content-body" | ||
> | ||
<div | ||
className="pf-c-panel" | ||
> | ||
<div | ||
className="pf-c-panel__main" | ||
style={ | ||
{ | ||
"--pf-c-panel__main--MaxHeight": undefined, | ||
} | ||
} | ||
> | ||
<div | ||
className="pf-c-panel__main-body" | ||
> | ||
<div> | ||
<div> | ||
Git Repo Options | ||
</div> | ||
<div | ||
data-testid="git-repo-options" | ||
> | ||
undefined, undefined, undefined, false | ||
</div> | ||
<button | ||
onClick={[Function]} | ||
> | ||
Git Repo Options Change | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<h3> | ||
<button | ||
aria-expanded={false} | ||
className="pf-c-accordion__toggle" | ||
data-testid="accordion-item-advanced-options" | ||
id="accordion-item-advanced-options" | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
<span | ||
className="pf-c-accordion__toggle-text" | ||
> | ||
Advanced Options | ||
</span> | ||
<span | ||
className="pf-c-accordion__toggle-icon" | ||
> | ||
<svg | ||
aria-hidden={true} | ||
aria-labelledby={null} | ||
fill="currentColor" | ||
height="1em" | ||
role="img" | ||
style={ | ||
{ | ||
"verticalAlign": "-0.125em", | ||
} | ||
} | ||
viewBox="0 0 256 512" | ||
width="1em" | ||
> | ||
<path | ||
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z" | ||
/> | ||
</svg> | ||
</span> | ||
</button> | ||
</h3> | ||
<div | ||
className="pf-c-accordion__expanded-content" | ||
data-testid="options-content" | ||
hidden={true} | ||
id="" | ||
> | ||
<div | ||
className="pf-c-accordion__expanded-content-body" | ||
> | ||
<div | ||
className="pf-c-panel" | ||
> | ||
<div | ||
className="pf-c-panel__main" | ||
style={ | ||
{ | ||
"--pf-c-panel__main--MaxHeight": undefined, | ||
} | ||
} | ||
> | ||
<div | ||
className="pf-c-panel__main-body" | ||
> | ||
<div> | ||
<div> | ||
Advanced Options | ||
</div> | ||
<div | ||
data-testid="advanced-options" | ||
> | ||
undefined, undefined, undefined, undefined, undefined | ||
</div> | ||
<button | ||
onClick={[Function]} | ||
> | ||
Advanced Options Change | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
Oops, something went wrong.