-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update codebase to use 2 spaces in *.ts and *.json
To stick with best practices for JavaScript related languages both the TypeScript and JSON files are set to use two spaces instead of four. This is also defined in the `.editorconfig` file so all systems will handle this the same.
- Loading branch information
1 parent
c0fd2e2
commit 6c3766c
Showing
30 changed files
with
627 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{ts,json}] | ||
indent_size = 2 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
{ | ||
"testForPageErrors": false, | ||
"account": { | ||
"testAccountCreation": false, | ||
"testAccountLogin": true, | ||
"testAccountPasswordChange": true, | ||
"testAccountPageTitles": | ||
{ | ||
"all": true, | ||
"ProductReviewsTest": false | ||
} | ||
}, | ||
"minicart": { | ||
"testCheckoutButton": true | ||
"testForPageErrors": false, | ||
"account": { | ||
"testAccountCreation": false, | ||
"testAccountLogin": true, | ||
"testAccountPasswordChange": true, | ||
"testAccountPageTitles": { | ||
"all": true, | ||
"ProductReviewsTest": false | ||
} | ||
} | ||
}, | ||
"minicart": { | ||
"testCheckoutButton": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
{ | ||
"testForPageErrors": false, | ||
"account": { | ||
"testAccountCreation": false, | ||
"testAccountLogin": true, | ||
"testAccountPasswordChange": true, | ||
"testAccountPageTitles": | ||
{ | ||
"all": true, | ||
"ProductReviewsTest": false | ||
} | ||
}, | ||
"minicart": { | ||
"testMiniCartCheckoutButton": true, | ||
"testMiniCartLink": true, | ||
"testMiniCartQuantity": true, | ||
"testMiniCartDeletion": true | ||
"testForPageErrors": false, | ||
"account": { | ||
"testAccountCreation": false, | ||
"testAccountLogin": true, | ||
"testAccountPasswordChange": true, | ||
"testAccountPageTitles": { | ||
"all": true, | ||
"ProductReviewsTest": false | ||
} | ||
} | ||
}, | ||
"minicart": { | ||
"testMiniCartCheckoutButton": true, | ||
"testMiniCartLink": true, | ||
"testMiniCartQuantity": true, | ||
"testMiniCartDeletion": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
import { test, expect, selectors } from '@playwright/test'; | ||
import { PageTester } from './utils/PageTester'; | ||
import { Contact } from './utils/Contact'; | ||
import {test, expect, selectors} from '@playwright/test'; | ||
import {PageTester} from './utils/PageTester'; | ||
import {Contact} from './utils/Contact'; | ||
import slugs from './fixtures/before/slugs.json'; | ||
import contactSelector from './fixtures/during/selectors/contact.json'; | ||
import globalSelector from './fixtures/during/selectors/global.json'; | ||
import contactValue from './fixtures/during/input-values/contact.json'; | ||
import accountExpected from './fixtures/verify/expects/contact.json'; | ||
|
||
test.describe('Test user flow', () => { | ||
test('Send contactform', async ({page}) => { | ||
const randomNumber = Math.floor(Math.random() * 10000000); | ||
const emailHandle = contactValue.contactEmailHandle; | ||
const emailHost = contactValue.contactEmailHost; | ||
const uniqueEmail = `${emailHandle}${randomNumber}@${emailHost}`; | ||
|
||
test('Send contactform', async ({ page }) => { | ||
const randomNumber = Math.floor(Math.random() * 10000000); | ||
const emailHandle = contactValue.contactEmailHandle; | ||
const emailHost = contactValue.contactEmailHost; | ||
const uniqueEmail = `${emailHandle}${randomNumber}@${emailHost}`; | ||
await page.goto(slugs.contactSlug); | ||
|
||
await page.goto(slugs.contactSlug); | ||
await page.fill(contactSelector.contactNameSelector, contactValue.contactName); | ||
await page.fill(contactSelector.contactEmailSelector, uniqueEmail); | ||
await page.fill(contactSelector.contactTelephoneSelector, contactValue.contactTelephoneNumber); | ||
await page.fill(contactSelector.contactCommentSelector, contactValue.contactComment); | ||
|
||
await page.fill(contactSelector.contactNameSelector, contactValue.contactName); | ||
await page.fill(contactSelector.contactEmailSelector, uniqueEmail); | ||
await page.fill(contactSelector.contactTelephoneSelector, contactValue.contactTelephoneNumber); | ||
await page.fill(contactSelector.contactCommentSelector, contactValue.contactComment); | ||
await page.click(contactSelector.contactButtonSelectorName); | ||
|
||
await page.click(contactSelector.contactButtonSelectorName); | ||
const contactFormSuccessNotificationText = accountExpected.contactFormSuccessNotificationText; | ||
await expect(page.locator(`text=${contactFormSuccessNotificationText}`)).toBeVisible(); | ||
|
||
const contactFormSuccessNotificationText = accountExpected.contactFormSuccessNotificationText; | ||
await expect(page.locator(`text=${contactFormSuccessNotificationText}`)).toBeVisible(); | ||
|
||
console.log(`Contact form submitted by email address "${uniqueEmail}"`); | ||
}); | ||
console.log(`Contact form submitted by email address "${uniqueEmail}"`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
{ | ||
"homepageSlug": "/", | ||
"categorySlug": "/women.html", | ||
"simpleProductSlug": "/push-it-messenger-bag.html", | ||
"configurableProductSlug": "/inez-full-zip-jacket.html", | ||
"cartSlug": "/checkout/cart", | ||
"checkoutSlug": "/checkout", | ||
"searchSlug": "/catalogsearch/result/?q=search", | ||
"loginSlug": "/customer/account/login/", | ||
"forgotPasswordSlug": "/customer/account/forgotpassword/", | ||
"accountCreationSlug": "/customer/account/create/", | ||
"accountEditSlug": "/customer/account/edit/", | ||
"afterAccountCreationSlug": "/customer/account/", | ||
"afterLoginSlug": "/customer/account/", | ||
"afterLogoutSlug": "/customer/account/logoutSuccess/", | ||
"changePasswordSlug": "/customer/account/edit/changepass/", | ||
"accountChangeInformationSlug": "/customer/account/edit/", | ||
"accountAddressBookSlug": "/customer/address/", | ||
"accountNewAddressSlug": "/customer/address/new/", | ||
"accountOrderHistorySlug": "/sales/order/history/", | ||
"accountDownloadsSlug": "/downloadable/customer/products/", | ||
"accountWishlistSlug": "/wishlist/", | ||
"accountSavedPaymentMethodsSlug": "vault/cards/listaction/", | ||
"accountReviewsSlug": "/review/customer/", | ||
"accountNewsletterSubscriptionsSlug": "/newsletter/manage/", | ||
"contactSlug": "/contact/", | ||
"productQuantityChangeSlug": "/checkout/cart/configure/id/" | ||
} | ||
"homepageSlug": "/", | ||
"categorySlug": "/women.html", | ||
"simpleProductSlug": "/push-it-messenger-bag.html", | ||
"configurableProductSlug": "/inez-full-zip-jacket.html", | ||
"cartSlug": "/checkout/cart", | ||
"checkoutSlug": "/checkout", | ||
"searchSlug": "/catalogsearch/result/?q=search", | ||
"loginSlug": "/customer/account/login/", | ||
"forgotPasswordSlug": "/customer/account/forgotpassword/", | ||
"accountCreationSlug": "/customer/account/create/", | ||
"accountEditSlug": "/customer/account/edit/", | ||
"afterAccountCreationSlug": "/customer/account/", | ||
"afterLoginSlug": "/customer/account/", | ||
"afterLogoutSlug": "/customer/account/logoutSuccess/", | ||
"changePasswordSlug": "/customer/account/edit/changepass/", | ||
"accountChangeInformationSlug": "/customer/account/edit/", | ||
"accountAddressBookSlug": "/customer/address/", | ||
"accountNewAddressSlug": "/customer/address/new/", | ||
"accountOrderHistorySlug": "/sales/order/history/", | ||
"accountDownloadsSlug": "/downloadable/customer/products/", | ||
"accountWishlistSlug": "/wishlist/", | ||
"accountSavedPaymentMethodsSlug": "vault/cards/listaction/", | ||
"accountReviewsSlug": "/review/customer/", | ||
"accountNewsletterSubscriptionsSlug": "/newsletter/manage/", | ||
"contactSlug": "/contact/", | ||
"productQuantityChangeSlug": "/checkout/cart/configure/id/" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"playwrightWebsite": "https://playwright.dev/" | ||
} | ||
"playwrightWebsite": "https://playwright.dev/" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
{ | ||
"newAccountFirstName": "John", | ||
"newAccountLastName": "Doe", | ||
"newAccountEmailHandle": "test-user", | ||
"newAccountEmailHost": "gmail.com", | ||
"newAddressCompany": "ACME Company", | ||
"newAddressTelephoneNumber": "0600000000", | ||
"newAddressStreetAddress": "Teststraat 1", | ||
"newAddressZipCode": "1234AA", | ||
"newAddressCityName": "Testdam", | ||
"newAddressProvinceValue": "1", | ||
"newChangedAddressFirstName": "Jane", | ||
"newChangedAddressLastName": "Dont", | ||
"newChangedAddressCompany": "Disney Company", | ||
"newChangedAddressTelephoneNumber": "0612345678", | ||
"newChangedAddressStreetAddress": "Straat Der Testen 100", | ||
"newChangedAddressZipCode": "4321 BB", | ||
"newChangedAddressCityName": "Testdorp" | ||
} | ||
"newAccountFirstName": "John", | ||
"newAccountLastName": "Doe", | ||
"newAccountEmailHandle": "test-user", | ||
"newAccountEmailHost": "gmail.com", | ||
"newAddressCompany": "ACME Company", | ||
"newAddressTelephoneNumber": "0600000000", | ||
"newAddressStreetAddress": "Teststraat 1", | ||
"newAddressZipCode": "1234AA", | ||
"newAddressCityName": "Testdam", | ||
"newAddressProvinceValue": "1", | ||
"newChangedAddressFirstName": "Jane", | ||
"newChangedAddressLastName": "Dont", | ||
"newChangedAddressCompany": "Disney Company", | ||
"newChangedAddressTelephoneNumber": "0612345678", | ||
"newChangedAddressStreetAddress": "Straat Der Testen 100", | ||
"newChangedAddressZipCode": "4321 BB", | ||
"newChangedAddressCityName": "Testdorp" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"contactName": "John Doe", | ||
"contactEmailHandle": "test-user", | ||
"contactEmailHost": "gmail.com", | ||
"contactTelephoneNumber": "0600000000", | ||
"contactComment": "Is this my question?" | ||
} | ||
"contactName": "John Doe", | ||
"contactEmailHandle": "test-user", | ||
"contactEmailHost": "gmail.com", | ||
"contactTelephoneNumber": "0600000000", | ||
"contactComment": "Is this my question?" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"searchProductName": "Bella Tank" | ||
} | ||
"searchProductName": "Bella Tank" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
{ | ||
"registrationFirstNameSelector": "#firstname", | ||
"registrationLastNameSelector": "#lastname", | ||
"registrationEmailAddressSelector": "#email_address", | ||
"registrationPasswordSelector": "#password", | ||
"registrationConfirmPasswordSelector": "#password-confirmation", | ||
"registrationCreateAccountButtonSelector": "button[title='Create an Account']", | ||
"loginEmailAddressSelector": "#email", | ||
"loginPasswordSelector": "#pass", | ||
"loginButtonSelectorName": "button[name='send']", | ||
"accountSaveButtonSelector": "button[title='Save']", | ||
"logoutMenuItemPosition": 8, | ||
"accountMenuItemsSelector": ".nav.items .nav.item a", | ||
"changePasswordLabel": "#change-password", | ||
"currentPasswordFieldSelector": "#current-password", | ||
"newPasswordFieldSelector": "#current-password", | ||
"accountAddressSaveButtonSelector": "button[title='Save Address']", | ||
"accountTelephoneSelector": "#telephone", | ||
"accountCompanySelector": "#company", | ||
"accountStreetAddressSelector": "#street_1", | ||
"accountZipSelector": "#zip", | ||
"accountCitySelector": "#city", | ||
"accountProvinceSelector": "select#region_id", | ||
"accountAddAddressButton": "a.action.add", | ||
"accountEditAddressButtons": "a.action.edit", | ||
"accountDeleteAddressButtons": "a.action.delete", | ||
"subscriptionCheckBoxSelector": "#subscription" | ||
} | ||
"registrationFirstNameSelector": "#firstname", | ||
"registrationLastNameSelector": "#lastname", | ||
"registrationEmailAddressSelector": "#email_address", | ||
"registrationPasswordSelector": "#password", | ||
"registrationConfirmPasswordSelector": "#password-confirmation", | ||
"registrationCreateAccountButtonSelector": "button[title='Create an Account']", | ||
"loginEmailAddressSelector": "#email", | ||
"loginPasswordSelector": "#pass", | ||
"loginButtonSelectorName": "button[name='send']", | ||
"accountSaveButtonSelector": "button[title='Save']", | ||
"logoutMenuItemPosition": 8, | ||
"accountMenuItemsSelector": ".nav.items .nav.item a", | ||
"changePasswordLabel": "#change-password", | ||
"currentPasswordFieldSelector": "#current-password", | ||
"newPasswordFieldSelector": "#current-password", | ||
"accountAddressSaveButtonSelector": "button[title='Save Address']", | ||
"accountTelephoneSelector": "#telephone", | ||
"accountCompanySelector": "#company", | ||
"accountStreetAddressSelector": "#street_1", | ||
"accountZipSelector": "#zip", | ||
"accountCitySelector": "#city", | ||
"accountProvinceSelector": "select#region_id", | ||
"accountAddAddressButton": "a.action.add", | ||
"accountEditAddressButtons": "a.action.edit", | ||
"accountDeleteAddressButtons": "a.action.delete", | ||
"subscriptionCheckBoxSelector": "#subscription" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"contactNameSelector": ".form.contact #name", | ||
"contactEmailSelector": ".form.contact #email", | ||
"contactTelephoneSelector": ".form.contact #telephone", | ||
"contactCommentSelector": ".form.contact #comment", | ||
"contactButtonSelectorName": ".form.contact button[type='submit']" | ||
} | ||
"contactNameSelector": ".form.contact #name", | ||
"contactEmailSelector": ".form.contact #email", | ||
"contactTelephoneSelector": ".form.contact #telephone", | ||
"contactCommentSelector": ".form.contact #comment", | ||
"contactButtonSelectorName": ".form.contact button[type='submit']" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"getStartedSelectorText": "Get started" | ||
} | ||
"getStartedSelectorText": "Get started" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"mainColumn": ".column.main", | ||
"successMessages": ".message.success" | ||
} | ||
"mainColumn": ".column.main", | ||
"successMessages": ".message.success" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"miniCartIconSelector": "#menu-cart-icon", | ||
"miniCartDrawerTitleSelector": "#cart-drawer-title", | ||
"miniCartCheckoutButtonSelector": "a.btn.btn-primary[href$='/checkout/']", | ||
"miniCartCartLinkSelector": "a.underline[href$='/checkout/cart/']", | ||
"miniCartQuantityButtonSelector": "a[href*='checkout/cart/configure/']", | ||
"miniCartDeleteProductButtonSelector": "button[aria-label^='Remove product']", | ||
"miniCartQuantitySelector": "span[x-html='item.qty']" | ||
} | ||
"miniCartIconSelector": "#menu-cart-icon", | ||
"miniCartDrawerTitleSelector": "#cart-drawer-title", | ||
"miniCartCheckoutButtonSelector": "a.btn.btn-primary[href$='/checkout/']", | ||
"miniCartCartLinkSelector": "a.underline[href$='/checkout/cart/']", | ||
"miniCartQuantityButtonSelector": "a[href*='checkout/cart/configure/']", | ||
"miniCartDeleteProductButtonSelector": "button[aria-label^='Remove product']", | ||
"miniCartQuantitySelector": "span[x-html='item.qty']" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"addToCartButtonSelector": "#product-addtocart-button", | ||
"productQuantityInputSelector": "input[name='qty'][type='number']" | ||
} | ||
"addToCartButtonSelector": "#product-addtocart-button", | ||
"productQuantityInputSelector": "input[name='qty'][type='number']" | ||
} |
Oops, something went wrong.