Skip to content

Commit a7ab6a3

Browse files
committed
Add negative test
1 parent fbb5a07 commit a7ab6a3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

extension/chrome/settings/modules/my_key.htm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
      
3333
<a href="#" class="action_download_pubkey">Save public key to a file</a>
3434
</div>
35-
<div class="line show_when_showing_public pubkey_link_container" style="display: none">Share your public key: <a href="" target="_blank"></a></div>
35+
<div class="line show_when_showing_public pubkey_link_container" style="display: none" data-test="container-shareable-pubkey-link">
36+
Share your public key: <a href="" target="_blank"></a>
37+
</div>
3638
<div class="line key_status_contatiner"></div>
3739
<div class="line">Key creation: <span class="key_creation" data-test="content-key-creation"></span></div>
3840
<div class="line">Key expiration: <span class="key_expiration" data-test="content-key-expiration"></span></div>

test/source/tests/flaky.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ export const defineFlakyTests = (testVariant: TestVariant, testWithBrowser: Test
245245
await SetupPageRecipe.createKey(settingsPage, 'unused', 'none', {
246246
selectKeyAlgo: 'rsa3072',
247247
key: { passphrase: 'long enough to suit requirements' },
248+
submitPubkey: false,
248249
});
249250
await SettingsPageRecipe.toggleScreen(settingsPage, 'additional');
250251

@@ -253,6 +254,8 @@ export const defineFlakyTests = (testVariant: TestVariant, testWithBrowser: Test
253254
t,
254255
`chrome/settings/modules/my_key.htm?placement=settings&parentTabId=60%3A0&acctEmail=${acctEmail}&fingerprint=${fingerprint}`
255256
);
257+
await myKeyFrame.waitAll(['@container-shareable-pubkey-link']);
258+
expect(await myKeyFrame.isElementPresent('@container-shareable-pubkey-link')).to.equal(false);
256259
const downloadedFiles = await myKeyFrame.awaitDownloadTriggeredByClicking('@action-download-prv');
257260
// const longid = OpenPGPKey.fingerprintToLongid(fingerprint);
258261
const longid = fingerprint.substring(fingerprint.length - 16);

0 commit comments

Comments
 (0)