-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b58761b
commit 78537bd
Showing
8 changed files
with
91 additions
and
4 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
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
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
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
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
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
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,31 @@ | ||
import { test as base } from '@playwright/test'; | ||
import type { Task } from '../../../types/Task'; | ||
import type { FixtureTypes} from '../../../types/FixtureTypes'; | ||
import { Address } from '../../../types/ShopwareTypes'; | ||
|
||
export const AddNewAddress = base.extend<{ AddNewAddress: Task }, FixtureTypes>({ | ||
AddNewAddress: async ({ ShopCustomer, StorefrontAccountAddresses, StorefrontAccountAddressCreate }, use)=> { | ||
const task = (address: Address) => { | ||
return async function AddNewAddress() { | ||
|
||
await ShopCustomer.goesTo(StorefrontAccountAddresses.url()); | ||
await StorefrontAccountAddresses.addNewAddressButton.click(); | ||
|
||
await StorefrontAccountAddressCreate.firstNameInput.fill(address.firstName); | ||
await StorefrontAccountAddressCreate.lastNameInput.fill(address.lastName); | ||
await StorefrontAccountAddressCreate.companyInput.fill(address.company); | ||
await StorefrontAccountAddressCreate.departmentInput.fill(address.department); | ||
await StorefrontAccountAddressCreate.streetInput.fill(address.street); | ||
await StorefrontAccountAddressCreate.zipcodeInput.fill(address.zipCode); | ||
await StorefrontAccountAddressCreate.cityInput.fill(address.city); | ||
await StorefrontAccountAddressCreate.countryDropdown.selectOption({label: address.country}); | ||
await StorefrontAccountAddressCreate.stateDropdown.selectOption({label: address.state}); | ||
|
||
await StorefrontAccountAddressCreate.saveAddressButton.click(); | ||
|
||
} | ||
}; | ||
|
||
await use(task); | ||
}, | ||
}); |
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