Skip to content

Commit

Permalink
Use utilities, delete utils (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese authored Dec 1, 2023
1 parent 068bc93 commit 3523218
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/afp/dashboard.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check
const { test, expect } = require('@playwright/test');
const utils = require('./utils');
const utilities = require('../utilities');

test('Dashboard', async ({ page }) => {
await page.goto('/');
Expand All @@ -9,7 +9,7 @@ test('Dashboard', async ({ page }) => {
await page.goto('/login');
await expect(page.locator('text="Login"')).toBeVisible();
// perform login
await page.fill('input[name="username"]', utils.USERNAME);
await page.fill('input[name="username"]', utilities.USERNAME);
await page.fill('input[name="password"]', "123");
await page.getByRole('button', { name: 'Submit' }).click();

Expand Down
8 changes: 0 additions & 8 deletions tests/afp/utils.js

This file was deleted.

3 changes: 3 additions & 0 deletions tests/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module.exports = {
/** Cardholder name. */
NAME_ON_CARD: 'J. Smith',

/** valid AccountHolder id for AfP tests: use env variable to not expose valid Id */
USERNAME: process.env.AFP_USERNAME || "na",

/** Utility function to fill card details on the Adyen.Web.Component - Sets default values automatically if you do not overwrite it manually.
* See: https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Components.
* Example usage:
Expand Down

0 comments on commit 3523218

Please sign in to comment.