forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor: extract test user data and improve "New offers" test flow
- Extract test user data (seed phrases, DIDs, usernames) from importUser into separate getTestUserData function
- Refactor importUser to use getTestUserData internally, maintaining backward compatibility
- Update "New offers for another user" test to use new getTestUserData function
- Replace hardcoded seed phrase with programmatic retrieval using getTestUserData('00')
- Add proper TypeScript type annotations to array functions in testUtils
- Improve test maintainability by centralizing test user data management
This allows tests to access user data without executing import flow, providing more flexibility for test scenarios.
This commit is contained in:
@@ -189,6 +189,7 @@ export default class ImportAccountView extends Vue {
|
||||
* Uses importFromMnemonic utility for secure import
|
||||
*/
|
||||
public async onImportClick() {
|
||||
console.log("[ImportAccountView] onImportClick", this.mnemonic);
|
||||
if (!this.mnemonic?.trim()) {
|
||||
this.notify.warning(
|
||||
"Seed phrase is required to import an account.",
|
||||
@@ -206,6 +207,7 @@ export default class ImportAccountView extends Vue {
|
||||
|
||||
// Check what was actually imported
|
||||
const settings = await this.$accountSettings();
|
||||
console.log("[ImportAccountView] settings", JSON.stringify(settings, null, 2));
|
||||
|
||||
// Check account-specific settings
|
||||
if (settings?.activeDid) {
|
||||
|
||||
Reference in New Issue
Block a user