Skip to content

Commit

Permalink
Add negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
martgil committed Dec 29, 2024
1 parent fbb5a07 commit a7ab6a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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
3 changes: 3 additions & 0 deletions test/source/tests/flaky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,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,6 +254,8 @@ export const defineFlakyTests = (testVariant: TestVariant, testWithBrowser: Test
t,
`chrome/settings/modules/my_key.htm?placement=settings&parentTabId=60%3A0&acctEmail=${acctEmail}&fingerprint=${fingerprint}`
);
await myKeyFrame.waitAll(['@container-shareable-pubkey-link']);
expect(await myKeyFrame.isElementPresent('@container-shareable-pubkey-link')).to.equal(false);
const downloadedFiles = await myKeyFrame.awaitDownloadTriggeredByClicking('@action-download-prv');
// const longid = OpenPGPKey.fingerprintToLongid(fingerprint);
const longid = fingerprint.substring(fingerprint.length - 16);
Expand Down

0 comments on commit a7ab6a3

Please sign in to comment.