-
Notifications
You must be signed in to change notification settings - Fork 406
E2e/feature/ri 3977 recommendation voting #1621
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
E2e/feature/ri 3977 recommendation voting #1621
Conversation
Delete unused nth from verifyVoteDisabled
Add assert message
Delete .only
@@ -0,0 +1,33 @@ | |||
import {Selector, t} from 'testcafe'; | |||
|
|||
export class RecommendationsPage { |
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.
We already have recommendations.e2e.ts file with tests on recommendations,
also page objects for recommendations are in memory-efficiency-page.ts
so you can move this file content into memory-efficiency-page.ts or
move existing recommendations selectors from memory-efficiency-page.ts to your new file
notUsefulVoteBtn = Selector('[data-testid=not-useful-vote-btn]').nth(0); | ||
recommendationsFeedbackBtn = Selector('[data-testid=recommendation-feedback-btn]'); | ||
|
||
async voteForVeryUsefulAndVerifyDisabled(): Promise<void> { |
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 this.verifyVoteDisabled(); | ||
} | ||
|
||
async verifyVoteDisabled(): Promise<void>{ |
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.
we are trying to not use methods for expects into pageObject folder
for this we use tests\e2e\common-actions
please move this function to common-actions
const recommendationPage = new RecommendationsPage(); | ||
const common = new Common(); | ||
|
||
fixture `Upvote recommendations` |
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.
please move this tests to tests\e2e\tests\critical-path\memory-efficiency\recommendations.e2e.ts
await t.click(memoryEfficiencyPage.newReportBtn); | ||
await recommendationPage.voteForNotUsefulAndVerifyDisabled(); | ||
// Verify that user can see the popup with link when he votes for “Not useful” | ||
await t.expect(recommendationPage.recommendationsFeedbackBtn.visible).ok(); |
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.
pls add error message here .ok()
|
||
const memoryEfficiencyPage = new MemoryEfficiencyPage(); | ||
export class MemoryEfficiencyActions { | ||
async voteForVeryUsefulAndVerifyDisabled(): Promise<void> { |
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.
just need a description for each method here
like:
/**
* Check that voted very useful is disabled
*/
Add comments to methods
No description provided.