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
6 changes: 3 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://localhost:3000',
baseURL: 'https://localhost:3002',
ignoreHTTPSErrors: true,

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
Expand Down Expand Up @@ -64,8 +64,8 @@ export default defineConfig({
}
],
webServer: {
command: 'yarn next start',
url: 'http://localhost:3000',
command: 'yarn start:devnet',
url: 'https://localhost:3002',
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
Expand Down
3 changes: 2 additions & 1 deletion src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const WIDGETS: WidgetType[] = [
widget: NativeAuth,
description:
'A secure authentication token can be used to interact with the backend',
reference: 'https://github.com/multiversx/mx-sdk-js-native-auth-server'
reference: 'https://github.com/multiversx/mx-sdk-js-native-auth-server',
anchor: 'native-auth'
},
{
title: 'Batch Transactions',
Expand Down
2 changes: 1 addition & 1 deletion tests/support/metaMask/setupMetaMaskWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ async function fillFirstSecretRecoveryPhraseWord(page: Page, mnemonic: string) {
await srpInput.click();

const [firstWord] = mnemonic.split(' ');
await srpInput.type(firstWord);
await srpInput.fill(firstWord);
await srpInput.press('Enter');
}
8 changes: 4 additions & 4 deletions tests/support/template/testdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export const NA = 'N/A';

export enum OriginPageEnum {
multiversxWallet = 'devnet-wallet.multiversx.com',
templateHome = 'localhost:3000/home',
templateDashboard = 'localhost:3000/dashboard',
templateUnlock = 'localhost:3000/unlock'
templateHome = 'https://localhost:3002/home',
templateDashboard = 'https://localhost:3002/dashboard',
templateUnlock = 'https://localhost:3002/unlock'
}

export const UrlRegex = {
templateDashboard: /localhost:3000\/dashboard/,
templateDashboard: /https:\/\/localhost:3002\/dashboard/,
multiversxWallet: /devnet-wallet\.multiversx\.com/
} as const;

Expand Down
13 changes: 5 additions & 8 deletions tests/templateActions/nativeAuth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ const keystoreConfig = {
address: TestDataEnums.keystoreWalletAddress1
};

// TODO: Unable to load profile error appears -> check if this is a known issue
// and then adjust the test accordingly (if necessary)
test.describe.skip('Native auth', () => {
test.describe('Native auth', () => {
test.beforeEach(async ({ page }) => {
await TestActions.navigateToConnectWallet(page);
await TestActions.connectWebWallet({ page, loginMethod: keystoreConfig });
Expand All @@ -38,11 +36,10 @@ test.describe.skip('Native auth', () => {
await expect(container).toBeInViewport();

// Check that the address is displayed and matches the account address
const nativeAuthAddress = page
.locator(SelectorsEnum.nativeAuthContainer)
.getByTestId(SelectorsEnum.trimFullAddress);

await expect(nativeAuthAddress).toHaveText(keystoreConfig.address);
const addressRow = page.locator(`${SelectorsEnum.nativeAuthContainer} p`, {
hasText: 'Address:'
});
await expect(addressRow).toContainText(keystoreConfig.address);

// Check that the balance is displayed and matches the account balance
const nativeAuthBalance = await extractBalanceFromContainer({
Expand Down