Skip to content

Commit

Permalink
Revert "test: add e2e test for demo config workflow"
Browse files Browse the repository at this point in the history
This reverts commit c2a562d.
  • Loading branch information
MinHtet-O committed Jun 11, 2024
1 parent 51b57eb commit ada313d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .testcaferc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"appCommand": "npm run serve-static",
"src": ["integration/**/**.spec.ts"],
"src": ["integration/**/*.spec.ts"],
"cache": true,
"compilerOptions": {
"typescript": {
Expand Down
2 changes: 1 addition & 1 deletion integration/helper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Selector, t } from "testcafe";

const PasswordField = Selector("[data-testid='password-field']");
export const ButtonLogin = Selector("[data-testid='login-button']");
const ButtonLogin = Selector("[data-testid='login-button']");
const ConfigFileDropZoneInput = Selector("[data-testid='config-file-dropzone'] input");
// fixtures

Expand Down
59 changes: 0 additions & 59 deletions integration/load-demo-config.spec.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/common/config/decrypt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const decryptWalletOrSigner = async (
};

const provider = config.network === "local" ? new providers.JsonRpcProvider() : utils.generateProvider(opts);

if (isWalletOption(config.wallet)) {
// For backward compatibility when the wallet is still string
return decryptEncryptedJson(config.wallet, password, progressCallback, provider);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const ConfigFileDropZone: FunctionComponent<ConfigFileDropZone> = ({ onCo
</div>
<div className="border-2 border-gray-200 border-dashed h-10 hidden sm:block" />
<Button
data-testid="load-demo-config-button"
onClick={(e) => {
e.stopPropagation();
setFileErrors([]);
Expand Down
3 changes: 2 additions & 1 deletion src/components/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import { ConfigFileDropZoneContainer } from "./ConfigFileDropZone";
import { WalletDecryptionContainer } from "./WalletDecryption/WalletDecryptionContainer";

export const HomeContainer: FunctionComponent = () => {
const { config } = useConfigContext();
const { config, isDemo } = useConfigContext();
const { configFile } = usePersistedConfigFile();
console.log(`Isdemo from Home Container: ${isDemo}`);
// If wallet has been decrypted, redirect to forms
if (config) return <Redirect to="/forms-selection" />;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ export const WalletDecryptionContainer: FunctionComponent = () => {
}
}, [isDemo, configFile, onDecryptConfigFile]);
return (
<>
<WalletDecryption
decryptProgress={decryptProgress}
isIncorrectPassword={isIncorrectPassword}
onDecryptConfigFile={onDecryptConfigFile}
onResetConfigFile={onResetConfigFile}
/>
</>
<WalletDecryption
decryptProgress={decryptProgress}
isIncorrectPassword={isIncorrectPassword}
onDecryptConfigFile={onDecryptConfigFile}
onResetConfigFile={onResetConfigFile}
/>
);
};

0 comments on commit ada313d

Please sign in to comment.