fix(editor): Save button never shows saved state after saving credentials (#28486)

This commit is contained in:
Elias Meire
2026-04-23 07:59:45 +00:00
committed by GitHub
parent e25a78e346
commit 4352749ec9
2 changed files with 5 additions and 8 deletions
@@ -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> {