generated from adobecom/milo-college
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Smoke Tests #176
Merged
Merged
Smoke Tests #176
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
42c9c90
Testing pop-up selector timeout
0088a32
Testing pop-up selector timeout
f77a56c
Testing pop-up selector timeout
2a1a70e
Testing pop-up selector timeout
ee63087
Testing pop-up selector timeout
3ea522e
Testing pop-up selector timeout
bfc9068
Sync nala branch with stage
187e064
Testing region selectors
565cda4
Smoke Tests
sashaCodeTest 06395e5
Lint fix
sashaCodeTest 67fe3f2
Merge branch 'nala' into MWPW-164551-smoke-tests
cod17828 a11a124
Implemented requested changes
sashaCodeTest e2b9c37
Merge branch 'MWPW-164551-smoke-tests' of github.com:adobecom/dme-par…
sashaCodeTest 849eaad
Implemented requested changes
sashaCodeTest 9bc685b
Requested change for price list locator
sashaCodeTest 077e1ec
Change for price list locator
sashaCodeTest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
export default class SmokeTest { | ||
constructor(page) { | ||
this.page = page; | ||
this.joinNowButton = page.locator('text="Join Now"'); | ||
this.signInButton = page.locator('.feds-signIn'); | ||
this.GNav = page.locator('.feds-topnav'); | ||
this.profileIcon = page.locator('.feds-profile-button'); | ||
this.priceList = page.locator('a[href="https://partners.stage.adobe.com/na/channelpartners/home/pricelists/"]'); | ||
this.tableSelector = '.table-container'; | ||
this.searchGnav = page.locator('.feds-search-trigger'); | ||
this.searchGnavField = page.locator('.feds-search-input'); | ||
this.searchFieldPage = page.locator('#search'); | ||
this.announcemnts = page.locator('text="Announcements"'); | ||
} | ||
|
||
async verifyButtonExist() { | ||
const joinNowExist = await this.joinNowButton.isVisible(); | ||
const signInExists = await this.signInButton.isVisible(); | ||
|
||
return { | ||
joinNowButton: joinNowExist, | ||
signInButton: signInExists, | ||
}; | ||
} | ||
|
||
async verifyProtectedGnav() { | ||
const gNavExists = await this.GNav.isVisible(); | ||
|
||
return { GNav: gNavExists }; | ||
} | ||
|
||
async verifyProfileIcon() { | ||
const profileIconExists = await this.profileIcon.isVisible(); | ||
|
||
return { profileIcon: profileIconExists }; | ||
} | ||
|
||
async getCurrentUrl() { | ||
return this.page.url(); | ||
} | ||
|
||
async clickDownloadButtonInFirstRow() { | ||
const firstRowWithDownload = this.page | ||
.locator(`${this.tableSelector} tr:has(td[headers="download"])`) | ||
.first(); | ||
const downloadButton = firstRowWithDownload.locator('#button'); | ||
await downloadButton.click(); | ||
} | ||
|
||
async searchPageDownloadButton() { | ||
const downloadButton = this.page.locator('.button.anchor.hidden').first(); | ||
await downloadButton.click(); | ||
} | ||
|
||
async announcmentCardVerification() { | ||
const shadowHostCard = await this.page | ||
.locator( | ||
'announcements-cards.content.announcements-wrapper[data-idx="0"]', | ||
) | ||
.elementHandle(); | ||
const shadowRootCard = await shadowHostCard.evaluateHandle( | ||
(node) => node.shadowRoot, | ||
); | ||
|
||
const announcementsCrad = await shadowRootCard.$$('.card-wrapper'); | ||
const firstCard = announcementsCrad[0]; | ||
await firstCard.isVisible(); | ||
} | ||
} |
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,121 @@ | ||
export default { | ||
FeatureName: 'Smoke Tests', | ||
features: [ | ||
{ | ||
tcid: '1', | ||
name: '@lending-page-validation-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
baseURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
}, | ||
|
||
{ | ||
tcid: '2', | ||
name: '@home-page-validation-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
baseURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-latin-na-platinum:', | ||
signInButtonInternationalText: 'Sign In', | ||
}, | ||
}, | ||
|
||
{ | ||
tcid: '3', | ||
name: '@price-list-validation-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
basedURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-distributor-us:', | ||
signInButtonInternationalText: 'Sign In', | ||
expectedPublicPageURL: | ||
'https://partners.stage.adobe.com/na/channelpartners/home/pricelists/', | ||
}, | ||
}, | ||
|
||
{ | ||
tcid: '4', | ||
name: '@search-page-validation-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
basedURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-distributor-us:', | ||
signInButtonInternationalText: 'Sign In', | ||
searchText: 'pdf', | ||
}, | ||
}, | ||
|
||
{ | ||
tcid: '5', | ||
name: '@user-redirection-apac-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
basedURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-distributor-india:', | ||
expectedPublicPageURL: | ||
'https://partners.stage.adobe.com/apac/channelpartners/drafts/automation/regression/protected-home#', | ||
signInButtonInternationalText: 'Sign In', | ||
}, | ||
}, | ||
|
||
{ | ||
tcid: '6', | ||
name: '@user-redirection-emea-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
basedURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-emea-platinum:', | ||
expectedPublicPageURL: | ||
'https://partners.stage.adobe.com/emea/channelpartners/drafts/automation/regression/protected-home#', | ||
signInButtonInternationalText: 'Sign In', | ||
}, | ||
}, | ||
|
||
{ | ||
tcid: '7', | ||
name: '@user-redirection-jp-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
basedURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-distributor-japan:', | ||
expectedPublicPageURL: | ||
'https://partners.stage.adobe.com/jp/channelpartners/drafts/automation/regression/protected-home#', | ||
signInButtonInternationalText: 'Sign In', | ||
}, | ||
}, | ||
|
||
{ | ||
tcid: '8', | ||
name: '@user-redirection-latam-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
basedURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-latin-america-na-platinum:', | ||
expectedPublicPageURL: | ||
'https://partners.stage.adobe.com/latam/channelpartners/drafts/automation/regression/protected-home#', | ||
signInButtonInternationalText: 'Sign In', | ||
}, | ||
}, | ||
|
||
{ | ||
tcid: '9', | ||
name: '@announcement-page-validation-smoke-test', | ||
path: 'https://partners.stage.adobe.com/channelpartners/drafts/automation/regression/public-page?georouting=off', | ||
tags: '@dme-smoke-test', | ||
baseURL: 'https://www.stage.adobe.com?akamaiLocale=us', | ||
data: { | ||
partnerLevel: 'cpp-na-certified:', | ||
expectedPublicPageURL: | ||
'https://partners.stage.adobe.com/latam/channelpartners/drafts/automation/regression/protected-home#', | ||
signInButtonInternationalText: 'Sign In', | ||
}, | ||
}, | ||
], | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 this is this going to work on prod, right?
We should find a way that the smoke tests pass on prod and on stage