Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion extension/chrome/settings/modules/my_key.htm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
      
<a href="#" class="action_download_pubkey">Save public key to a file</a>
</div>
<div class="line show_when_showing_public pubkey_link_container" style="display: none">Share your public key: <a href="" target="_blank"></a></div>
<div class="line show_when_showing_public pubkey_link_container" style="display: none" data-test="container-shareable-pubkey-link">
Share your public key: <a href="" target="_blank"></a>
</div>
<div class="line key_status_contatiner"></div>
<div class="line">Key creation: <span class="key_creation" data-test="content-key-creation"></span></div>
<div class="line">Key expiration: <span class="key_expiration" data-test="content-key-expiration"></span></div>
Expand Down
7 changes: 6 additions & 1 deletion test/source/tests/flaky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export const defineFlakyTests = (testVariant: TestVariant, testWithBrowser: Test
{ submitPubkey: true, usedPgpBefore: true },
{ isSavePassphraseChecked: false, isSavePassphraseHidden: false }
);
await SettingsPageRecipe.toggleScreen(settingsPage, 'additional');
await settingsPage.waitAndClick('@action-open-pubkey-page');
const myKeyFrame = await settingsPage.getFrame(['my_key.htm']);
expect(await myKeyFrame.isElementPresent('@container-shareable-pubkey-link')).to.be.true;
})
);

Expand Down Expand Up @@ -245,6 +249,7 @@ export const defineFlakyTests = (testVariant: TestVariant, testWithBrowser: Test
await SetupPageRecipe.createKey(settingsPage, 'unused', 'none', {
selectKeyAlgo: 'rsa3072',
key: { passphrase: 'long enough to suit requirements' },
submitPubkey: false,
});
await SettingsPageRecipe.toggleScreen(settingsPage, 'additional');

Expand All @@ -253,11 +258,11 @@ export const defineFlakyTests = (testVariant: TestVariant, testWithBrowser: Test
t,
`chrome/settings/modules/my_key.htm?placement=settings&parentTabId=60%3A0&acctEmail=${acctEmail}&fingerprint=${fingerprint}`
);
expect(await myKeyFrame.isElementPresent('@container-shareable-pubkey-link')).to.be.false;
const downloadedFiles = await myKeyFrame.awaitDownloadTriggeredByClicking('@action-download-prv');
// const longid = OpenPGPKey.fingerprintToLongid(fingerprint);
const longid = fingerprint.substring(fingerprint.length - 16);
const fileName = `flowcrypt-backup-usernosubmitclientconfigurationflowcrypttest-0x${longid}.asc`;

const key = await KeyUtil.parse(downloadedFiles[fileName].toString());
expect(key.algo.bits).to.equal(3072);
expect(key.algo.algorithm).to.equal('rsaEncryptSign');
Expand Down
Loading