Skip to content
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

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

Chloe60492
Copy link
Contributor

No description provided.


/** @type {import('@playwright/test').Page} */
let page;
const wait_secs = 2000;
Copy link
Contributor

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');
Copy link
Contributor

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');
Copy link
Contributor

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

金額的部分希望可以使用變數來處理,而不是直接寫固定的值

@apple843119 apple843119 merged commit 1740ab3 into NETivism:develop Sep 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants