-
Notifications
You must be signed in to change notification settings - Fork 36
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
Helpx_Milo Components Script Fixes #235
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6c15306
Helpx_Milo Components Script Fixes
058af49
Merge branch 'main' into main
kirupacommit 6b31244
removed Base reporter from helpx
d5eb7a1
Added Base reporter to the helpx Config File
ce9e2d3
Added daily Run yml file and additional test cases on draft page
e813a1b
Draftpgae_MinorChanges on spec.js and test.js file
323c465
Helpx_Test cases Name changes and Added more test cases for Procedure…
a33eeb4
Helpx Config variable changed to config
de560f5
procedure_test case name changes
1e722ec
Merge branch 'adobecom:main' into main
kirupacommit 534cfca
Merge branch 'main' into main
kirupacommit 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Helpx Nala Daily Run | ||
|
||
on: | ||
schedule: | ||
- cron: "30 15 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
platform_matrix: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
name: Running tests | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
WORKFLOW_NAME: 'Helpx Nala Daily Run' | ||
DAILY_RUN: 'true' | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Run Nala ${{ matrix.os }} | ||
run: bash dailyrun.sh helpx | ||
env: | ||
IMS_EMAIL: ${{ secrets.IMS_EMAIL }} | ||
IMS_PASS: ${{ secrets.IMS_PASS }} | ||
HLX_TKN: ${{ secrets.HLX_TKN }} | ||
SLACK_WH: ${{ secrets.SLACK_WH }} | ||
|
||
- name: Display workflow name | ||
run: echo "The workflow name is $WORKFLOW_NAME" | ||
|
||
- name: Persist JSON Artifact | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: nala-results | ||
path: nala-results.json | ||
retention-days: 30 |
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 |
---|---|---|
@@ -1,15 +1,10 @@ | ||
import { expect } from '@playwright/test'; | ||
import { WebUtil } from '../../libs/webutil.js'; | ||
|
||
export default class BeforeAfter { | ||
constructor(page) { | ||
this.page = page; | ||
|
||
// BeforeAfter Selectors: | ||
this.beforeAftr = page.locator('.beforeafter'); | ||
this.beforeafterVertical = page.locator(selectors['@beforeafter-vertical']); | ||
this.beforeafterVerticalmoved = page.locator( | ||
selectors['@beforeafter-vertical-moved'] | ||
); | ||
this.beforeAftr = page.locator("(//div[@class='before-after-slider vertical'])[1]"); | ||
this.beforeafterVertical = page.locator(['@beforeafter-vertical']); | ||
this.beforeafterVerticalmoved = page.locator(['@beforeafter-vertical-moved']); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,14 +1,87 @@ | ||
import { expect } from '@playwright/test'; | ||
import { WebUtil } from '../../libs/webutil.js'; | ||
|
||
export default class Procedure { | ||
constructor(page) { | ||
this.page = page; | ||
|
||
// Procedure Selectors: | ||
this.procedure = page.locator('.procedure'); | ||
this.procedureStep = page.locator('li[class=step]'); | ||
this.procedureImage = page.locator('hli[class=step] img'); | ||
this.procedureStep = page.locator("//li[contains(@class,'step')]"); | ||
this.procedureImage = page.locator("//li[@class='step']//descendant::picture/img"); | ||
this.procedureTxtBold = page.locator('li[class=step] strong'); | ||
|
||
//Procedure and Step Component | ||
//Title | ||
this.procedureTitle = page.locator("//h1[@id='procedure-and-step-component']"); | ||
//First procedure Component | ||
this.procedureforb2 = page.locator("//div[contains(@daa-lh,'b2|procedure|nopzn|nopzn')]"); | ||
this.procedureforb2Ol = page.locator("//div[@daa-lh='b2|procedure|nopzn|nopzn']/child::ol"); | ||
this.procedureforb2liFirst = page.locator("//div[@daa-lh='b2|procedure|nopzn|nopzn']/child::ol/li[contains(@class,'step')][1]"); | ||
|
||
|
||
//procedure is not case sensitive | ||
const xpathWithDaaLh = "//div[contains(@daa-lh, 'b4|procedure|nopzn|nopzn')]/ol[@class='stepList']/li[@class='step']/div[contains(text(), 'PROCEDURE-Capital letter')]"; | ||
this.procedurecapitalLetter = page.locator(xpathWithDaaLh).first(); | ||
const xpathForSecondElement = "//div[contains(@daa-lh, 'b5|procedure|nopzn|nopzn')]/ol[@class='stepList']/li[@class='step']/div[contains(.,'PROCEDURE- Capital Letter - Bold -Italic')]"; | ||
this.secondProcedureElement = page.locator(xpathForSecondElement).first(); | ||
|
||
const xpathForThirdElement = "//div[contains(@daa-lh, 'b6|procedure|nopzn|nopzn')]/ol[@class='stepList']/li[@class='step']//div[contains(.,'PROCEDURE-Capital Letter - Bold -Italic-Underline')]"; | ||
this.thirdProcedureElement = page.locator(xpathForThirdElement).first(); | ||
|
||
//Incorrect Procedure Name | ||
const xpathForFailedProcedure = "//div[contains(@class,'proedure')][contains(@data-failed,'true')][contains(@data-reason,'Failed loading proedure block.')]"; | ||
this.failedProcedureElement = page.locator(xpathForFailedProcedure).first(); | ||
|
||
//verify Draft Procedure | ||
const procedureDraft = "//li[contains(.,'Procedure Component with Draft Option')]/following-sibling::li[1][contains(.,'In Procedure Component, adding Text in the Step')]"; | ||
this.draftProcedure = page.locator(procedureDraft).first(); | ||
|
||
//Text in procedure | ||
this.textInProcedureComponent = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[1]/div/p[contains(.,'Some copy-paste features that you can try out with this latest updated workflow are given here.')]"); | ||
this.StrongtextInProcedureComponent = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[2]/div/strong[contains(text(),'Continue')]"); | ||
this.thirdStepLink = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[3]/div/strong/a[contains(@href,'https://account.adobe.com/plans')]"); | ||
this.iconinprocedureComponet = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[6]/div/ol/li/span[contains(@class,'icon icon-objectives margin-left margin-right')]"); | ||
this.notealertinprocedure = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[6]/child::div/child::div[contains(@class,'note alert')]"); | ||
this.noteiconinprocedure = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[6]/child::div/child::div[contains(@class,'note alert')]/span[contains(@class,'note-icon')]"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
this.notecautionInprocedure = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[8]/div/div[contains(@class,'note caution')]"); | ||
this.notetipinProcedure = page.locator("//div[contains(@daa-lh,'b11|procedure|nopzn|nopzn')]/ol/li[8]/div/div[contains(@class,'note tip')]"); | ||
|
||
//Images in procedure | ||
this.webpImageinProcedure = page.locator("//div[@class='procedure']/ol[@class='stepList']/li[@class='step'][1]//img[@title='attach_email_mfa']"); | ||
this.pngImageInprocedure = page.locator("(//img[@loading='lazy'])[1]"); | ||
const xpathLocator = "//div[contains(@daa-lh,'b13|procedure|nopzn|nopzn')]/ol/li[3]/div/p/em[contains(text(),'Great. I will process this for you now')]"; | ||
this.textBeforeImageInProcedure = page.locator(xpathLocator); | ||
this.imageafterTextInProcedure = page.locator(`${xpathLocator}/following::p[1]`); | ||
this.urlBasedURLInProcedure = page.locator("//div[contains(@daa-lh,'b13|procedure|nopzn|nopzn')]/ol/li[4]/descendant::a[contains(@href,'/automation/blocks/procedure/')]"); | ||
|
||
|
||
//Videos In Procedure | ||
this.videoinprocedure = page.locator("//div[@class='procedure']//li[@class='step'][1]//video[@controls]"); | ||
this.youtubevideoinprocedure = page.locator("//div[@class='procedure']//li[@class='step'][2]//iframe[contains(@src, 'youtube.com')]"); | ||
|
||
//Download Component | ||
this.pdfforprocedure = page.locator("//div[@class='procedure']//li[@class='step'][1]//div[@class='download']//a[@class='download-button' and contains(@href, 'SKU%20search%20in%20Hendrix.pdf')]"); | ||
this.xlsxforprocedure = page.locator("//div[@class='procedure']//li[@class='step'][2]//div[@class='download']//a[@class='download-button' and contains(@href, 'All%20Products_080213.xls')]"); | ||
this.pptforprocedure = page.locator("//div[@class='procedure']//li[@class='step'][3]//div[@class='download']//a[@class='download-button' and contains(@href, 'cct_save_tagging-hendrix.pptx')]"); | ||
|
||
//BeforeAfter component | ||
this.beforeafterfirst = page.locator("//input[@orient='vertical']"); | ||
this.beforeaftersecond = page.locator("//div[@class='procedure']//li[@class='step'][2]//div[@class='before-after-slider hidden-tablet']"); | ||
this.beforeafterthird = page.locator("//div[@class='procedure']//li[@class='step'][3]//div[@class='before-after-slider draft hidden-desktop hidden-mobile']"); | ||
|
||
//code block component | ||
this.as3Inprocedure = page.locator("//div[@class='procedure']//li[@class='step'][1]//div[@class='code language-as3']").first(); | ||
this.cplusplusInprocedure = page.locator("//div[@class='procedure']//li[@class='step'][2]//div[@class='code language-c++ line-numbers']").first(); | ||
this.sqlInprocedure = page.locator("//div[@class='procedure']//li[@class='step'][3]//div[@class='code language-sql draft']").first(); | ||
|
||
//All components | ||
this.codeBlock = page.locator("//div[@class='procedure']//li[@class='step'][1]//div[@class='code language-as3']").first(); | ||
this.imageWithinProcedure = page.locator("//div[@class='procedure']//li[@class='step'][2]//h1[@id='image-within-procedure']/following-sibling::p/picture"); | ||
this.ambientVideo = page.locator("//div[@class='procedure']//li[@class='step'][3]//p[contains(text(),'Ambient video')]").first(); | ||
this.downloadSection = page.locator("//div[@class='procedure']//li[@class='step'][4]//div[@class='download']"); | ||
this.miloVideo = page.locator("//div[@class='procedure']//li[@class='step'][5]//div[@class='milo-video']/iframe"); | ||
this.beforeAfterSlider = page.locator("//div[@class='procedure']//li[@class='step'][6]//div[@class='before-after-slider hidden-mobile']"); | ||
this.listWithLinks = page.locator("//div[@class='procedure']//li[@class='step'][7]//ul"); | ||
this.noteUpdate = page.locator("//div[@class='procedure']//li[@class='step'][8]//div[@class='note alert']"); | ||
this.noteAddReason = page.locator("//div[@class='procedure']//li[@class='step'][9]//div[@class='note caution']"); | ||
|
||
} | ||
} |
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.
Is this correct?
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.
Yes, Recently I made some folder changes.
