Skip to content

Commit

Permalink
fix: e2e webrelay test
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed Feb 9, 2024
1 parent c7c0a41 commit 330e1d9
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions e2e/settings.e2e.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import jestExpect from 'expect';
import parse from 'url-parse';

import {
sleep,
Expand Down Expand Up @@ -491,7 +490,7 @@ d('Settings', () => {
markComplete('settings-electrum');
});

it.skip('Can connect to different Slashtags Web Relay', async () => {
it('Can connect to different Slashtags Web Relay', async () => {
if (checkComplete('settings-webrelay')) {
return;
}
Expand All @@ -504,12 +503,8 @@ d('Settings', () => {
by.id('ConnectedUrl'),
).getAttributes();

// add port to url
const url = parse(origRelay, true);
url.set('hostname', url.hostname + ':443');
const relayUrl = url.toString();

await element(by.id('UrlInput')).replaceText(relayUrl);
const stagingRelay = 'https://dht-relay.synonym.to/staging/web-relay';
await element(by.id('UrlInput')).replaceText(stagingRelay);
await element(by.id('Status')).tap(); // close keyboard
await element(by.id('ConnectToUrl')).tap();
await sleep(1000);
Expand All @@ -519,7 +514,7 @@ d('Settings', () => {
by.id('ConnectedUrl'),
).getAttributes();

jestExpect(newRelay).toBe(relayUrl);
jestExpect(newRelay).toBe(stagingRelay);

// now change it back
await element(by.id('UrlInput')).replaceText(origRelay);
Expand Down

0 comments on commit 330e1d9

Please sign in to comment.