Browse Source

feat: solve test fail

pull/10939/head
kiner-tang(文辉) 3 years ago
parent
commit
da886263a3
  1. 1
      jest.config.ts
  2. 1
      package.json
  3. 11432
      pnpm-lock.yaml
  4. 1398
      src/pages/user/login/__snapshots__/login.test.tsx.snap
  5. 3
      src/pages/user/login/index.tsx

1
jest.config.ts

@ -7,7 +7,6 @@ export default async () => {
}),
});
console.log();
return {
...config,
testEnvironmentOptions: {

1
package.json

@ -84,6 +84,7 @@
"@umijs/fabric": "^2.14.1",
"@umijs/lint": "^4.0.78",
"@umijs/max": "^4.0.78",
"canvas": "^2.11.2",
"cross-env": "^7.0.3",
"eslint": "^8.48.0",
"express": "^4.18.2",

11432
pnpm-lock.yaml

File diff suppressed because it is too large

1398
src/pages/user/login/__snapshots__/login.test.tsx.snap

File diff suppressed because it is too large

3
src/pages/user/login/index.tsx

@ -126,7 +126,8 @@ const Login: React.FC = () => {
message.success(defaultLoginSuccessMessage);
await fetchUserInfo();
const urlParams = new URL(window.location.href).searchParams;
history.push(urlParams.get('redirect') || '/');
// history.push(urlParams.get('redirect') || '/');
window.location.href = urlParams.get('redirect') || '/';
return;
}
console.log(msg);

Loading…
Cancel
Save