mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-29 19:10:43 +08:00
fix(editor): Save button never shows saved state after saving credentials (#28486)
This commit is contained in:
+1
-1
@@ -1433,7 +1433,7 @@ const { width } = useElementSize(credNameRef);
|
||||
:class="$style.saveButton"
|
||||
:disabled="!hasUnsavedChanges && !isTesting && !!credentialId"
|
||||
:is-saving="isSaving || isTesting"
|
||||
:saved="false"
|
||||
:saved="!hasUnsavedChanges && !isTesting && !!credentialId"
|
||||
:saving-label="
|
||||
isTesting
|
||||
? i18n.baseText('credentialEdit.credentialEdit.testing')
|
||||
|
||||
@@ -91,15 +91,12 @@ export class CredentialModal extends BaseModal {
|
||||
|
||||
/**
|
||||
* Wait for save to fully complete.
|
||||
* After saving (and optional credential testing), the button becomes
|
||||
* disabled (no unsaved changes) and is no longer loading
|
||||
* After saving (and optional credential testing), the button shows "Saved" label.
|
||||
*/
|
||||
async waitForSaveComplete(): Promise<void> {
|
||||
const btn = this.getSaveButton().locator('button');
|
||||
await expect(async () => {
|
||||
await expect(btn).toBeDisabled();
|
||||
await expect(btn).not.toHaveAttribute('aria-busy', 'true');
|
||||
}).toPass({ timeout: 10000 });
|
||||
await expect(this.getSaveButton().getByText('Saved', { exact: true })).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
}
|
||||
|
||||
async save(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user