Practice two solution#65
Conversation
Practice two solution rename
* Renaming createApplicationButton method to createPythonApplicationButton (#43) * Renaming createApplicationButton method to createPythonApplicationButton
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds “practice II” solution tests and refactors the assertion surface to be more section-oriented (e.g., asserter.generalSection, asserter.applicationDetailsSection). Also includes a couple of small framework adjustments to support navigation and test dependencies.
Changes:
- Added a new
LowCodePracticeTwoSolutionTestwith multiple end-to-end solution scenarios. - Introduced new assertion section classes and updated
AssertionFacade/ tests to use them. - Updated menu navigation for “Přihlášky” across public vs internal navbars and simplified JUnit dependencies.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/cz/czechitas/automation/LowCodePracticeTwoSolutionTest.java | New practice-II solution E2E tests |
| src/test/java/cz/czechitas/automation/LowCodePracticeSolutionTest.java | Updates email + renames assertion section usage |
| src/test/java/cz/czechitas/automation/ExampleTest.java | Uses new assertion sections + adds navigation exercises |
| src/test/java/cz/czechitas/automation/assertion/LoginAssertion.java | New login-specific assertions |
| src/test/java/cz/czechitas/automation/assertion/HomePageAssertion.java | New home-page-specific assertions |
| src/test/java/cz/czechitas/automation/assertion/GeneralAssertion.java | New general assertions (page/link checks) |
| src/test/java/cz/czechitas/automation/assertion/AssertionFacade.java | Exposes new assertion sections (but keeps old direct methods) |
| src/test/java/cz/czechitas/automation/assertion/ApplicationAssertion.java | Adds checkIsLoggedIn() |
| src/main/java/cz/czechitas/automation/SeleniumActionFacade.java | Minor change in generateRandomName return |
| src/main/java/cz/czechitas/automation/PublicMenuAction.java | Makes “Přihlášky” navigation work on both public/internal navbars |
| README.md | Updates assertion section name for application details |
| pom.xml | Switches to junit-jupiter aggregate dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var urlElement = elementFinder.findByXPath("//a[text()='www.czechitas.cz']"); | ||
| assertThat(urlElement.getText()).isEqualTo(url); | ||
| } |
| private final ElementFinderInterface elementFinder; | ||
| public final ApplicationAssertion applicationSection; | ||
| public final ApplicationDetailAssertion applicationDetailSection; | ||
|
|
||
| public AssertionFacade(WebDriver webDriver) | ||
| { | ||
| this.elementFinder = new ElementFinder(webDriver); | ||
| public final ApplicationDetailAssertion applicationDetailsSection; | ||
| public final LoginAssertion loginSection; | ||
| public final HomePageAssertion homePageSection; | ||
| public final GeneralAssertion generalSection; | ||
|
|
||
| public AssertionFacade(WebDriver webDriver) { | ||
| var elementFinder = new ElementFinder(webDriver); | ||
| this.elementFinder = elementFinder; | ||
| this.applicationSection = new ApplicationAssertion(elementFinder); | ||
| this.applicationDetailSection = new ApplicationDetailAssertion(elementFinder); | ||
| this.applicationDetailsSection = new ApplicationDetailAssertion(elementFinder); | ||
| this.loginSection = new LoginAssertion(elementFinder); | ||
| this.homePageSection = new HomePageAssertion(elementFinder); | ||
| this.generalSection = new GeneralAssertion(elementFinder); |
| void goToApplicationsSection() { | ||
| var applicationsMenuItem = elementFinder.findByXPath("//*[@id='navbarSupportedContent']//a[contains(text(), 'Přihlášky')]"); | ||
| applicationsMenuItem.click(); | ||
| try { | ||
| var publicApplicationsMenuItem = elementFinder.findByXPath("//*[@id='navbarSupportedContent']//a[contains(text(), 'Přihlášky')]"); | ||
| publicApplicationsMenuItem.click(); | ||
| } | ||
| catch (NoSuchElementException ignored) { | ||
| var internalApplicationsMenuItem = elementFinder.findByXPath("//*[@id='adminNavbar']//a[contains(text(), 'Přihlášky')]"); | ||
| internalApplicationsMenuItem.click(); | ||
| } |
| return Objects.requireNonNull(random.ints(leftLimit, rightLimit + 1) | ||
| .limit(nameLength) | ||
| .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append) | ||
| .toString(); | ||
| .toString()); |
| browser.applicationSection.clickCreateNewApplicationButton(); | ||
| browser.applicationSection.selectProgrammingSection(); | ||
| browser.applicationSection.clickCreatePythonApplicationButton(); | ||
| browser.applicationDetailsSection.selectTerm("20.07. - 24.07.2026"); | ||
| browser.applicationDetailsSection.insertStudentFirstName("Herold"); | ||
| browser.applicationDetailsSection.insertStudentLastName("Proper"); | ||
| browser.applicationDetailsSection.insertBirthdate("29.01.2000"); |
| browser.applicationDetailsSection.clickCreateApplicationButton(); | ||
| asserter.applicationDetailsSection.checkPaymentMethod("Hotově"); | ||
| asserter.applicationDetailsSection.checkFirstName("Herold"); | ||
| //asserter.applicationDetailsSection.checkLastName("Proper"); |
| browser.loginSection.clickLoginMenuLink(); | ||
| browser.loginSection.insertEmail("muj2@tester.cz"); | ||
| browser.loginSection.insertPassword("JTester123"); | ||
| browser.loginSection.clickLoginButton(); | ||
| browser.headerMenu.goToApplicationsSection(); | ||
| browser.profileSection.goToProfilePage(); | ||
| browser.profileSection.insertPassword("Aaabbb123"); | ||
| browser.profileSection.insertPasswordVerification("Aaabbb123"); | ||
| browser.profileSection.clickChangeButton(); | ||
| browser.waitFor(10); | ||
| browser.loginSection.logout(); | ||
| browser.loginSection.clickLoginMenuLink(); | ||
| browser.loginSection.insertEmail("muj2@tester.cz"); | ||
| browser.loginSection.insertPassword("Aaabbb123"); | ||
| browser.loginSection.clickLoginButton(); | ||
| asserter.applicationSection.checkIsLoggedIn(); | ||
| browser.profileSection.goToProfilePage(); | ||
| browser.profileSection.insertPassword("JTester123"); | ||
| browser.profileSection.insertPasswordVerification("JTester123"); | ||
| browser.profileSection.clickChangeButton(); |
| void navigation1() | ||
| { |
| | `asserter.applicationDetailsSection.checkLastName("Novak")` | Check that the student last name is _Novak_ | | ||
| | `asserter.applicationDetailsSection.checkDateOfBirth("01.01.2010")` | Check that the student date of birth is _01.01.2010_ | | ||
| | `asserter.applicationDetailsSection.checkNote("myPrivateNote")` | Check that the note is _myPrivateNote_ | | ||
| - `asserter.applicationDetailsSection.checkRemainingAmountToPay("100.00")` - check that remaining amount to pay is _100.00_ Kč |
No description provided.