-
Notifications
You must be signed in to change notification settings - Fork 10
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
Make navigation for challenge slick carousel and corresponding test #1995
Make navigation for challenge slick carousel and corresponding test #1995
Conversation
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, update code
this.slickCardsNames = page.locator("div.slick-slide div.name"); | ||
this.slickDots = page.locator("ul.slick-dots li"); | ||
this.slickRightArrow = page.locator("div.challenge-day-block span[aria-label='arrow-right']:nth-child(2) svg"); | ||
|
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.
Invalid locator nth-child(2)
DO not use hardcode.
Please update
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.
$$("span.arrows-next svg")
@@ -15,6 +23,37 @@ class ChallengeInfoPage extends BasePage { | |||
this.challengeTasksNames = page.locator("td:nth-child(2)"); |
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.
Invalid locator nth-child(2)
Please update
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.
$$("td.ant-table-cell > a.table-name[href*='task']")
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.
$x("//a[contains(text(),'Task_second')]")
|
||
class ChallengeInfoPage extends BasePage { | ||
constructor(page) { | ||
super(page); | ||
this.viewChallengeButton = page.getByRole("button", { name: "Переглянути челендж" }); |
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.
Use const for "Переглянути челендж"
@@ -15,10 +15,6 @@ let apiservice, challengespage, challengeinfopage,taskspage, addchallengepage, a | |||
apiservice = new ApiService(page); | |||
challengespage = new ChallengesPage(page); | |||
await apiservice.apiLoginAs('admin'); |
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.
Use Const for "admin"
Kudos, SonarCloud Quality Gate passed! |
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.
ok
This pull request introduces several enhancements to the ChallengeInfoPage and related files. The changes are focused on creating navigation to view the challenge's task on the view page, respective locators, and code formatting in basepage.js.
Changes:
New Feature:
Created a method for navigation to viewChallenge.
Added slick carousel locators.
Implemented a task presence verification method in the carousel.
Created a test to navigate the challenge task carousel.
Code Formatting:
Improved code formatting in basepage.js.
Files Modified:
src/test/playwright/PO/ChallengeInfoPage.js
Added new methods for navigation and task verification.
Modified existing methods for better readability.
src/test/playwright/PO/basepage.js
Improved code formatting.
Updated method names for clarity.
src/test/playwright/tests/challengesManipulation-test.spec.js
Added a test to verify navigation through challenge's existing tasks.
Testing:
Tested the new navigation features locally.
Verified that existing test cases related to challenge manipulation are still valid.