mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-02-02 09:48:13 -05:00
UI test for change password
Help docs
This commit is contained in:
parent
cfbd7f05d0
commit
91fe448782
@ -87,6 +87,14 @@ INSERT INTO `certificate_authority` (
|
|||||||
0,
|
0,
|
||||||
5,
|
5,
|
||||||
1
|
1
|
||||||
|
), (
|
||||||
|
strftime('%s', 'now'),
|
||||||
|
strftime('%s', 'now'),
|
||||||
|
"SSL.com",
|
||||||
|
"ssl.com",
|
||||||
|
0,
|
||||||
|
10,
|
||||||
|
1
|
||||||
), (
|
), (
|
||||||
strftime('%s', 'now'),
|
strftime('%s', 'now'),
|
||||||
strftime('%s', 'now'),
|
strftime('%s', 'now'),
|
||||||
@ -103,14 +111,6 @@ INSERT INTO `certificate_authority` (
|
|||||||
0,
|
0,
|
||||||
5,
|
5,
|
||||||
1
|
1
|
||||||
), (
|
|
||||||
strftime('%s', 'now'),
|
|
||||||
strftime('%s', 'now'),
|
|
||||||
"SSL.com",
|
|
||||||
"ssl.com",
|
|
||||||
0,
|
|
||||||
10,
|
|
||||||
1
|
|
||||||
);
|
);
|
||||||
|
|
||||||
-- System User
|
-- System User
|
||||||
|
@ -70,6 +70,7 @@ function NavigationHeader({
|
|||||||
<Box pl={2}>
|
<Box pl={2}>
|
||||||
<Menu>
|
<Menu>
|
||||||
<MenuButton
|
<MenuButton
|
||||||
|
data-testid="profile-menu"
|
||||||
as={Button}
|
as={Button}
|
||||||
rounded="full"
|
rounded="full"
|
||||||
variant="link"
|
variant="link"
|
||||||
@ -84,6 +85,7 @@ function NavigationHeader({
|
|||||||
{intl.formatMessage({ id: "profile.title" })}
|
{intl.formatMessage({ id: "profile.title" })}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
data-testid="profile-menu-change-password"
|
||||||
icon={<Icon as={FiLock} />}
|
icon={<Icon as={FiLock} />}
|
||||||
onClick={passwordDisclosure.onOpen}>
|
onClick={passwordDisclosure.onOpen}>
|
||||||
{intl.formatMessage({ id: "change-password" })}
|
{intl.formatMessage({ id: "change-password" })}
|
||||||
|
@ -72,5 +72,6 @@ pre {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: var(--chakra-fontSizes-lg);
|
font-size: var(--chakra-fontSizes-lg);
|
||||||
font-weight: var(--chakra-fontWeights-semibold);
|
font-weight: var(--chakra-fontWeights-semibold);
|
||||||
|
color: var(--chakra-colors-teal-500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,25 @@
|
|||||||
|
|
||||||
## HTTP Certificate
|
## HTTP Certificate
|
||||||
|
|
||||||
todo
|
A HTTP validated certificate means that the Certificate Authority (CA) will
|
||||||
|
attempt to reach your domains over HTTP (not HTTPS!) and if successful, the CA
|
||||||
|
will issue your certificate.
|
||||||
|
|
||||||
|
For this method, you will have to have a _Host_ created for your domains(s) that
|
||||||
|
is accessible with HTTP. After a certificate has been given, you can modify the
|
||||||
|
_Host_ to also use this certificate for HTTPS connections. However, the _Host_
|
||||||
|
will still need to be configured for HTTP access in order for the certificate to
|
||||||
|
renew.
|
||||||
|
|
||||||
## DNS Certificate
|
## DNS Certificate
|
||||||
|
|
||||||
todo
|
A DNS validated certificate requires you to create a DNS Provider. This DNS
|
||||||
|
Provider will be used to create temporary records on your domain and then the CA
|
||||||
|
will query those records to be sure you're the owner and if successful, the CA
|
||||||
|
will issue your certificate.
|
||||||
|
|
||||||
|
You do not need a _Host_ to be created prior to requesting this type of
|
||||||
|
certificate. Nor do you need to have your _Host_ configured for HTTP access.
|
||||||
|
|
||||||
## Custom Certificate
|
## Custom Certificate
|
||||||
|
|
||||||
@ -15,3 +29,7 @@ todo
|
|||||||
## MKCert Certificate
|
## MKCert Certificate
|
||||||
|
|
||||||
todo
|
todo
|
||||||
|
|
||||||
|
## Choosing a Certificate Authority
|
||||||
|
|
||||||
|
If you're not sure, use **ZeroSSL.**
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
# DNS Providers Help
|
# DNS Providers Help
|
||||||
|
|
||||||
todo
|
A DNS Provider is a service that hosts your domain(s) and this will be
|
||||||
|
specifically used when requesting new _Certificates_ via DNS Validation.
|
||||||
|
|
||||||
|
It is preferred to use DNS Validation, so check if your domain is hosted with
|
||||||
|
one of the supported Acme.sh providers:
|
||||||
|
|
||||||
|
- [DNS Page 1](https://github.com/acmesh-official/acme.sh/wiki/dnsapi)
|
||||||
|
- [DNS Page 2](https://github.com/acmesh-official/acme.sh/wiki/dnsapi2)
|
||||||
|
|
||||||
|
Should your DNS Provider be supported by Acme.sh and not available in this
|
||||||
|
project, please
|
||||||
|
[open an issue on Github](https://github.com/NginxProxyManager/nginx-proxy-manager/issues/new/choose).
|
||||||
|
@ -76,7 +76,7 @@ function ChangePasswordModal({ isOpen, onClose }: ChangePasswordModalProps) {
|
|||||||
return errors;
|
return errors;
|
||||||
}}>
|
}}>
|
||||||
{({ isSubmitting, values }: any) => (
|
{({ isSubmitting, values }: any) => (
|
||||||
<Form>
|
<Form data-testid="change-password">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
{intl.formatMessage({ id: "change-password" })}
|
{intl.formatMessage({ id: "change-password" })}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
@ -156,10 +156,16 @@ function ChangePasswordModal({ isOpen, onClose }: ChangePasswordModalProps) {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<PrettyButton mr={3} isLoading={isSubmitting}>
|
<PrettyButton
|
||||||
|
mr={3}
|
||||||
|
isLoading={isSubmitting}
|
||||||
|
data-testid="save">
|
||||||
{intl.formatMessage({ id: "form.save" })}
|
{intl.formatMessage({ id: "form.save" })}
|
||||||
</PrettyButton>
|
</PrettyButton>
|
||||||
<Button onClick={onClose} isLoading={isSubmitting}>
|
<Button
|
||||||
|
onClick={onClose}
|
||||||
|
isLoading={isSubmitting}
|
||||||
|
data-testid="cancel">
|
||||||
{intl.formatMessage({ id: "form.cancel" })}
|
{intl.formatMessage({ id: "form.cancel" })}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
|
@ -22,14 +22,20 @@ describe('UI Setup and Login', () => {
|
|||||||
cy.clearLocalStorage();
|
cy.clearLocalStorage();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should be able to login', function() {
|
it('Should be able to login and change password', function() {
|
||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
cy.get('input[name="email"]').type('cypress@example.com');
|
cy.get('input[name="email"]').type('cypress@example.com');
|
||||||
cy.get('input[name="password"]').type('changeme');
|
cy.get('input[name="password"]').type('changeme');
|
||||||
cy.get('form button:last').click();
|
cy.get('form button:last').click();
|
||||||
|
|
||||||
// To fix after chakra change:
|
// change password
|
||||||
// cy.get('.navbar-nav .avatar').should('be.visible');
|
cy.get('button[data-testid="profile-menu"]').should('be.visible').click();
|
||||||
|
cy.get('button[data-testid="profile-menu-change-password"]').should('be.visible').click();
|
||||||
|
cy.get('input[name="current"]').type('changeme');
|
||||||
|
cy.get('input[name="password"]').type('ihavebeenchanged');
|
||||||
|
cy.get('input[name="password2"]').type('ihavebeenchanged');
|
||||||
|
cy.get('form button[data-testid="save"]').click();
|
||||||
|
cy.get('form[data-testid="change-password"]').should('not.exist');
|
||||||
|
|
||||||
// logout:
|
// logout:
|
||||||
cy.clearLocalStorage();
|
cy.clearLocalStorage();
|
||||||
|
Loading…
Reference in New Issue
Block a user