mirror of
https://github.com/portainer/portainer.git
synced 2025-08-10 08:15:25 +02:00
feat(wizard/docker): dataCy and names attributes to fields/buttons
This commit is contained in:
parent
0dc1527bf4
commit
7c0ec966cb
9 changed files with 25 additions and 4 deletions
|
@ -48,8 +48,9 @@ export function Switch({
|
|||
checked={checked}
|
||||
disabled={disabled || limitedToBE}
|
||||
onChange={({ target: { checked } }) => onChange(checked)}
|
||||
data-cy={dataCy}
|
||||
/>
|
||||
<span className="slider round" data-cy={dataCy} />
|
||||
<span className="slider round" />
|
||||
</label>
|
||||
{limitedToBE && <BEFeatureIndicator featureId={featureId} />}
|
||||
</>
|
||||
|
|
|
@ -43,6 +43,7 @@ export function EnvironmentTypeSelectView() {
|
|||
<Button
|
||||
disabled={types.length === 0}
|
||||
onClick={() => startWizard()}
|
||||
data-cy="wizard_button-start-wizard"
|
||||
>
|
||||
Start Wizard
|
||||
</Button>
|
||||
|
|
|
@ -82,10 +82,14 @@ export function EnvironmentCreationView() {
|
|||
'flex justify-between'
|
||||
)}
|
||||
>
|
||||
<Button disabled={isFirstStep} onClick={onPreviousClick}>
|
||||
<Button
|
||||
disabled={isFirstStep}
|
||||
onClick={onPreviousClick}
|
||||
data-cy="wizard_button-previous"
|
||||
>
|
||||
<i className="fas fa-arrow-left space-right" /> Previous
|
||||
</Button>
|
||||
<Button onClick={onNextClick}>
|
||||
<Button onClick={onNextClick} data-cy="wizard_button-next">
|
||||
{isLastStep ? 'Finish' : 'Next'}
|
||||
<i className="fas fa-arrow-right space-left" />
|
||||
</Button>
|
||||
|
|
|
@ -80,6 +80,7 @@ export function APIForm({ onCreate }: Props) {
|
|||
loadingText="Connecting environment..."
|
||||
isLoading={mutation.isLoading}
|
||||
disabled={!dirty || !isValid}
|
||||
data-cy="wizard_button-connect"
|
||||
>
|
||||
<i className="fa fa-plug" aria-hidden="true" /> Connect
|
||||
</LoadingButton>
|
||||
|
|
|
@ -16,6 +16,8 @@ export function TLSFieldset() {
|
|||
<div className="form-group">
|
||||
<div className="col-sm-12">
|
||||
<SwitchField
|
||||
dataCy="switch-enable-tls"
|
||||
name="switch-enable-tls"
|
||||
label="TLS"
|
||||
checked={values.tls}
|
||||
onChange={(checked) => setFieldValue('tls', checked)}
|
||||
|
@ -28,6 +30,8 @@ export function TLSFieldset() {
|
|||
<div className="form-group">
|
||||
<div className="col-sm-12">
|
||||
<SwitchField
|
||||
dataCy="switch-skip-cert-verification"
|
||||
name="switch-skip-cert-verification"
|
||||
label="Skip Certification Verification"
|
||||
checked={!!values.skipVerify}
|
||||
onChange={(checked) => setFieldValue('skipVerify', checked)}
|
||||
|
|
|
@ -58,6 +58,7 @@ export function SocketForm({ onCreate }: Props) {
|
|||
loadingText="Connecting environment..."
|
||||
isLoading={mutation.isLoading}
|
||||
disabled={!dirty || !isValid}
|
||||
data-cy="wizard_button-connect"
|
||||
>
|
||||
<i className="fa fa-plug" aria-hidden="true" /> Connect
|
||||
</LoadingButton>
|
||||
|
@ -94,6 +95,8 @@ function OverrideSocketFieldset() {
|
|||
<div className="form-group">
|
||||
<div className="col-sm-12">
|
||||
<SwitchField
|
||||
dataCy="switch-override-socket-path"
|
||||
name="switch-override-socket-path"
|
||||
checked={values.overridePath}
|
||||
onChange={(checked) => setFieldValue('overridePath', checked)}
|
||||
label="Override default socket path"
|
||||
|
|
|
@ -57,6 +57,7 @@ export function AgentForm({ onCreate, showGpus = false }: Props) {
|
|||
loadingText="Connecting environment..."
|
||||
isLoading={mutation.isLoading}
|
||||
disabled={!dirty || !isValid}
|
||||
data-cy="wizard_button-connect"
|
||||
>
|
||||
<i className="fa fa-plug" aria-hidden="true" /> Connect
|
||||
</LoadingButton>
|
||||
|
|
|
@ -55,6 +55,7 @@ export function EdgeAgentForm({ onCreate, readonly, showGpus = false }: Props) {
|
|||
isLoading={createMutation.isLoading}
|
||||
loadingText="Creating environment..."
|
||||
disabled={!isValid}
|
||||
data-cy="wizard_button-create"
|
||||
>
|
||||
<i className="fa fa-plug space-right" />
|
||||
Create
|
||||
|
|
|
@ -48,7 +48,12 @@ export function EdgeAgentTab({
|
|||
|
||||
<div className="row">
|
||||
<div className="flex justify-end">
|
||||
<Button color="primary" type="reset" onClick={handleReset}>
|
||||
<Button
|
||||
color="primary"
|
||||
type="reset"
|
||||
onClick={handleReset}
|
||||
data-cy="wizard_button-add-another-environment"
|
||||
>
|
||||
Add another environment
|
||||
</Button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue