Skip to content

Commit

Permalink
test: fix update password
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Sep 14, 2024
1 parent 2840762 commit f3b1f4d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libs/backend-api7/e2e/support/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import { Agent } from 'node:https';

const httpClient = axios.create({
baseURL: 'https://localhost:7443',
auth: {
username: 'admin',
password: 'admin',
},
withCredentials: true,
httpsAgent: new Agent({
rejectUnauthorized: false,
}),
Expand Down Expand Up @@ -52,6 +49,11 @@ const activateAPI7 = async () => {
};

const generateToken = async () => {
await httpClient.post(`/api/login`, {
username: 'admin',
password: 'admin',
});
await httpClient.post(`/api/password`, { new_password: 'Admin12345!' });
const resp = await httpClient.post<{ value: { token: string } }>(
`/api/tokens`,
{
Expand Down

0 comments on commit f3b1f4d

Please sign in to comment.