-
Notifications
You must be signed in to change notification settings - Fork 35
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
commerce: add OST tests cases for Jenkins #426
Conversation
|
||
const page = await browser.newPage(); | ||
// const requestGnavPromise = page.waitForResponse('https://www.adobe.com/libs/blocks/global-navigation/utilities/keyboard/mainNav.js'); | ||
await page.goto('https://www.adobe.com/creativecloud/plans.html?mboxDisable=1&adobe_authoring_enabled=true'); |
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.
are you sure you want this to be run on production?
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.
@JackySun9 essentially yes, given that the adobeIMS token can be retrieved from dexter (AEM) pages only. I could run it on www.stage.adobe.com but lot of development testing, pricing changes and milo migrations are ongoing on that environment, preparing for the future. We could run into the need of more frequent maintenance of these tests.
Any specific reason or concern why not to run on prod page?
selectors/milo/ost.tools.page.js
Outdated
this.priceStrikethroughUse = page.locator('button:near(:text("Strikethrough price"))').first(); | ||
this.checkoutTab = page.locator('//div[@data-key="checkout"]'); | ||
this.checkoutLink = page.locator('//a[@data-type="checkoutUrl"]'); | ||
// this.workflowMenu = page.locator('//div//label[contains(text(), "Workflow")]'); |
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.
Do you still need this line?
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.
@Dli3 Not for now. Removed all commented lines.
tests/milo/ost.tools.test.js
Outdated
features[0].url = 'https://www.adobe.com/creativecloud/plans.html?mboxDisable=1&adobe_authoring_enabled=true'; | ||
await ims.fillOutSignInForm(features[0], page); | ||
await page.waitForLoadState('domcontentloaded'); | ||
await page.waitForTimeout(3000); |
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.
Using https://playwright.dev/docs/test-assertions#expecttopass might be a good alternative to this fixed delay. It could proceed earlier or wait longer as needed.
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.
Changed.
tests/milo/ost.tools.test.js
Outdated
}); | ||
|
||
await test.step('Enter Offer ID in the search field', async () => { | ||
await OST.searchField.waitFor({ state: 'visible', timeout: 10000 }); |
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.
I don't think you need this waitFor line thanks to the fill method's auto-waiting feature. It should wait for the field to be visible out of the box.
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.
Thanks. Will give it a try. I was just precautious because of the stability.
Adding tests cases for Offer Selector Tool to be able to run them on Jenkins, but skipping them for any github actions