Skip to content

Practice two solution#65

Closed
brumlablo wants to merge 18 commits into
mainfrom
practice-two-solution
Closed

Practice two solution#65
brumlablo wants to merge 18 commits into
mainfrom
practice-two-solution

Conversation

@brumlablo

Copy link
Copy Markdown
Collaborator

No description provided.

@brumlablo
brumlablo requested a review from Copilot May 13, 2026 23:47
@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@brumlablo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 13 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0f11d92d-415d-47c6-9737-acfaa38132bd

📥 Commits

Reviewing files that changed from the base of the PR and between f99ae38 and 8e9f470.

📒 Files selected for processing (12)
  • README.md
  • pom.xml
  • src/main/java/cz/czechitas/automation/PublicMenuAction.java
  • src/main/java/cz/czechitas/automation/SeleniumActionFacade.java
  • src/test/java/cz/czechitas/automation/ExampleTest.java
  • src/test/java/cz/czechitas/automation/LowCodePracticeSolutionTest.java
  • src/test/java/cz/czechitas/automation/LowCodePracticeTwoSolutionTest.java
  • src/test/java/cz/czechitas/automation/assertion/ApplicationAssertion.java
  • src/test/java/cz/czechitas/automation/assertion/AssertionFacade.java
  • src/test/java/cz/czechitas/automation/assertion/GeneralAssertion.java
  • src/test/java/cz/czechitas/automation/assertion/HomePageAssertion.java
  • src/test/java/cz/czechitas/automation/assertion/LoginAssertion.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch practice-two-solution

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 LowCodePracticeTwoSolutionTest with 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.

Comment on lines +26 to +28
var urlElement = elementFinder.findByXPath("//a[text()='www.czechitas.cz']");
assertThat(urlElement.getText()).isEqualTo(url);
}
Comment on lines 20 to +34
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);
Comment on lines 58 to +66
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();
}
Comment on lines +54 to +57
return Objects.requireNonNull(random.ints(leftLimit, rightLimit + 1)
.limit(nameLength)
.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
.toString();
.toString());
Comment on lines +45 to +51
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");
Comment on lines +113 to +132
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();
Comment on lines +39 to +40
void navigation1()
{
Comment thread README.md
| `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č
@brumlablo brumlablo closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants