-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref #40826 coupon testing done #130
Conversation
|
||
/** @type {import('@playwright/test').Page} */ | ||
let page; | ||
const wait_secs = 2000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
沒有使用到的變數可以先移除
await page.getByLabel('Event').check(); | ||
await page.locator('[id="_qf_Set_next-bottom"]').click(); | ||
await page.getByLabel('Field Label\n *').fill('A'); | ||
await page.getByLabel('Price').fill('200'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
金額的部分希望可以使用變數來處理,而不是直接寫固定的值
例如:
const priceValue = '200'; //要在更上方定義
await page.getByLabel('Price').fill(priceValue)
await page.getByRole('row', { name: 'Limited on Events' }).getByPlaceholder('-- Select --').click(); | ||
await page.locator('#select2-civicrm_event-results > li').nth(0).click(); | ||
await page.getByLabel('Discounted Fees*').fill('1'); | ||
await page.getByLabel('Minimum Amount\n *').fill('1'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
金額的部分希望可以使用變數來處理,而不是直接寫固定的值
await page3.locator('[id="\\#coupon_valid"]').click(); | ||
await page3.getByRole('button', { name: 'Continue >>' }).click(); | ||
await expect(page3).toHaveTitle('Confirm Your Registration Information | netiCRM'); | ||
await expect(page3.getByText('Total Amount: NT$ 199.00')).toBeVisible(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
金額的部分希望可以使用變數來處理,而不是直接寫固定的值
No description provided.