-
Notifications
You must be signed in to change notification settings - Fork 51
#5947 Add info modal for key with newer expiry than existing key #5951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sosnovsky
merged 11 commits into
master
from
issue-5947-detected-newer-key-version-upon-key-import
Mar 26, 2025
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e73150b
feat: add info modal for key with newer expiry than existing key
e8230cd
test: add test
7fa8c72
Merge remote-tracking branch 'origin/master' into issue-5947-detected…
d5ba555
refactor: remove data-test
44058d9
Merge remote-tracking branch 'origin/master' into issue-5947-detected…
4351bc0
Merge remote-tracking branch 'origin/master' into issue-5947-detected…
cadf3d0
test: fix failing test
d273527
Merge remote-tracking branch 'origin/master' into issue-5947-detected…
martgil 4b3eda4
refactor: add user redirection going to my_key_update.htm
martgil cc795a0
test: update test
martgil 7155fd2
test: fix failing test
martgil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -813,6 +813,35 @@ export const defineSettingsTests = (testVariant: TestVariant, testWithBrowser: T | |
expect(pubkeyExpiration).to.equal(expectedExpiration); | ||
}) | ||
); | ||
test( | ||
'settings - inform user when importing newer key version', | ||
testWithBrowser(async (t, browser) => { | ||
t.context.mockApi!.configProvider = new ConfigurationProvider({ | ||
attester: { | ||
pubkeyLookup: {}, | ||
}, | ||
}); | ||
const acct = '[email protected]'; | ||
const settingsPage = await BrowserRecipe.openSettingsLoginApprove(t, browser, acct); | ||
const key50yearExpiry = testConstants.keyWith50yearsExpiry; | ||
await SetupPageRecipe.manualEnter(settingsPage, '', { | ||
key: { | ||
title: '?', | ||
armored: key50yearExpiry, | ||
passphrase: 'passphrase', | ||
longid: '6B673BAB02EC3E43', | ||
}, | ||
}); | ||
await SettingsPageRecipe.toggleScreen(settingsPage, 'additional'); | ||
const addKeyPopup = await SettingsPageRecipe.awaitNewPageFrame(settingsPage, '@action-open-add-key-page', ['add_key.htm']); | ||
await addKeyPopup.waitAndClick('@source-paste'); | ||
await addKeyPopup.waitAndType('@input-armored-key', testConstants.keyWith80yearsExpiry); | ||
await addKeyPopup.waitAndType('@input-passphrase', 'passphrase'); | ||
await addKeyPopup.waitAndClick('@action-add-private-key-btn'); | ||
const expectedInfoMsg = "The key you're trying to import is a newer version of one you already have, based on its expiry date"; | ||
await addKeyPopup.waitAndRespondToModal('info', 'confirm', expectedInfoMsg); | ||
}) | ||
); | ||
test( | ||
'settings - attachment previews are rendered according to their types', | ||
testWithBrowser(async (t, browser) => { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.