Skip to content

Commit

Permalink
fixup! fixup! test(connect-popup): remove index.html parts from urls
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Sep 25, 2024
1 parent fac9c2a commit 15f0a01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/connect-popup/e2e/support/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const formatUrl = (baseUrl: string, path: string) => {
const isWebExtension = process.env.IS_WEBEXTENSION === 'true';

const url =
`${baseUrlWithoutParams}${pathWithoutParams}${isWebExtension ? 'index.html' : ''}`.replace(
`${baseUrlWithoutParams}${pathWithoutParams}${isWebExtension ? '/index.html' : ''}`.replace(
'//',
'/',
);
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-popup/e2e/tests/methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ filteredFixtures.forEach(f => {
const [method, submethod] = f.url.split('-');
const fullUrl = formatUrl(
explorerUrl,
`methods/${f.dir}/${method}/index.html${submethod ? '?submethod=' + submethod : ''}`,
`methods/${f.dir}/${method}${submethod ? '?submethod=' + submethod : ''}`,
);
await explorerPage.goto(fullUrl);

Expand Down
10 changes: 5 additions & 5 deletions packages/connect-popup/e2e/tests/passphrase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test('input passphrase in popup and device accepts it', async () => {
log(`test: ${test.info().title}`);

log(`opening ${explorerUrl}#/method/getAddress`);
await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress/index.html`));
await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress`));

log('waiting for submit button');
await waitAndClick(explorerPage, ['@api-playground/collapsible-box']);
Expand Down Expand Up @@ -137,7 +137,7 @@ test('input passphrase in popup and device accepts it', async () => {
test('introduce passphrase in popup and device rejects it', async () => {
log(`test: ${test.info().title}`);

await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress/index.html`));
await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress`));
await waitAndClick(explorerPage, ['@api-playground/collapsible-box']);
await findElementByDataTest(explorerPage, '@submit-button');

Expand Down Expand Up @@ -181,7 +181,7 @@ test('introduce passphrase successfully next time should not ask for it', async

log(`test: ${test.info().title}`);

await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress/index.html`));
await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress`));
await waitAndClick(explorerPage, ['@api-playground/collapsible-box']);
await findElementByDataTest(explorerPage, '@submit-button');

Expand Down Expand Up @@ -229,7 +229,7 @@ test('introduce passphrase successfully reload 3rd party it should ask again for

log(`test: ${test.info().title}`);

await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress/index.html`));
await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress`));
await waitAndClick(explorerPage, ['@api-playground/collapsible-box']);
await findElementByDataTest(explorerPage, '@submit-button');

Expand Down Expand Up @@ -282,7 +282,7 @@ test('passphrase mismatch', async ({ page }) => {

log('start', test.info().title);
log('got to: ', `${url}#/method/getAddress`);
await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress/index.html`));
await explorerPage.goto(formatUrl(explorerUrl, `methods/bitcoin/getAddress`));

log('Trigger getAddress call');
// this is a little hack.
Expand Down

0 comments on commit 15f0a01

Please sign in to comment.