Skip to content

Commit

Permalink
some PR improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Vlasiuk committed Jan 17, 2024
1 parent 711be9b commit 0ee187f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import static com.epam.jdi.light.asserts.core.SoftAssert.jdiAssert;

public class CardAssert extends UIAssert<CardAssert, Card> {

@JDIAction(value = "Assert that '{name}' has text '{0}'", isAssert = true)
public CardAssert cardText(String value) {
jdiAssert(element().getCardText().equals(value), Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
Expand All @@ -29,21 +30,21 @@ public CardAssert srcImageAttribute(String value) {

@JDIAction(value = "Assert that '{name}' has '{0}' buttons", isAssert = true)
public CardAssert numberOfButtonsOnCard(int number) {
jdiAssert(element().getButtons().size() == number, Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
jdiAssert(element().actionButtons().size() == number, Matchers.is(true), "ERROR MESSAGE IS REQUIRED");
return this;
}

@JDIAction("Assert that '{name}' has align end actions")
public CardAssert alignEndActions() {
jdiAssert(element().actionsEndAlign(), Matchers.is(true),
"Card actions are in start align position");
"Card actions are in start align position");
return this;
}

@JDIAction("Assert that '{name}' has align start actions")
public CardAssert alignStartActions() {
jdiAssert(element().actionsEndAlign(), Matchers.is(false),
"Card actions are in end align position");
"Card actions are in end align position");
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

public class Card extends UIBaseElement<CardAssert> {

@JDIAction("Get '{name}' header")
public UIElement getHeader() {
return this.find(".mat-mdc-card-header");
Expand Down Expand Up @@ -60,8 +61,8 @@ public UIElement getContent() {
return this.find(".mat-mdc-card-content");
}

@JDIAction("Get '{name}' buttons")
public WebList getButtons() {
@JDIAction("Get '{name}' action buttons")
public WebList actionButtons() {
return this.finds(".//mat-card-actions//button");
}

Expand All @@ -72,12 +73,12 @@ public String getCardText() {

@JDIAction("Get button with text '{text}'")
public Button getButtonByText(String text) {
return new Button().setCore(Button.class, this.getButtons().get(text));
return new Button().setCore(Button.class, this.actionButtons().get(text));
}

@JDIAction("Get button with number '{number}'")
public Button getButtonByNumber(int number) {
return new Button().setCore(Button.class, this.getButtons().get(number));
return new Button().setCore(Button.class, this.actionButtons().get(number));
}

@JDIAction("Get if {name} has align end actions")
Expand All @@ -102,7 +103,7 @@ public CardImageSize cardImageSize() {
return defineSize(image);
}

public CardImageSize defineSize(UIElement image) {
private CardImageSize defineSize(UIElement image) {
CardImageSize size = CardImageSize.UNKNOWN;
if (image.hasClass("mat-mdc-card-xl-image")) {
size = EXTRALARGE;
Expand Down

11 comments on commit 0ee187f

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-e3689c96 discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/feedback/ProgressPage.java) and submitted as #5340. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-085f6320 discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/inputs/ButtonGroupPage.java) and submitted as #5341. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-a01c807d discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/inputs/DateTimePickersPage.java) and submitted as #5342. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-7a9e789c discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/inputs/TextFieldPage.java) and submitted as #5343. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-6a286db9 discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/layout/BoxPage.java) and submitted as #5344. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-ed21c7ff discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/layout/HiddenPage.java) and submitted as #5345. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-a18e632c discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/ContextMenuPage.java) and submitted as #5346. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-534ad06c discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/TabPage.java) and submitted as #5347. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-841f5224 discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/navigation/TemporaryDrawerPage.java) and submitted as #5348. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

Puzzle 5297-9b4187da discovered in jdi-light-material-ui-tests/src/main/java/io/github/com/pages/surfaces/BackToTopAppBarPage.java) and submitted as #5349. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 0ee187f Jan 17, 2024

Choose a reason for hiding this comment

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

I wasn't able to retrieve PDD puzzles from the code base and submit them to github. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

POST https://api.github.com/repos/jdi-testing/jdi-light/issues: 403 - You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later. If you reach out to GitHub Support for help, please include the request ID...

Please, copy and paste this stack trace to GitHub:

Octokit::TooManyRequests
POST https://api.github.com/repos/jdi-testing/jdi-light/issues: 403 - You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later. If you reach out to GitHub Support for help, please include the request ID C6D2:16832F:593C202:5A24C7A:65A7B256. // See: https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits
/app/vendor/bundle/ruby/3.1.0/gems/octokit-7.1.0/lib/octokit/response/raise_error.rb:14:in `on_complete'
/app/vendor/bundle/ruby/3.1.0/gems/faraday-2.7.11/lib/faraday/middleware.rb:18:in `block in call'
/app/vendor/bundle/ruby/3.1.0/gems/faraday-2.7.11/lib/faraday/response.rb:42:in `on_complete'
/app/vendor/bundle/ruby/3.1.0/gems/faraday-2.7.11/lib/faraday/middleware.rb:17:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/octokit-7.1.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
/app/vendor/bundle/ruby/3.1.0/gems/octokit-7.1.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/faraday-2.7.11/lib/faraday/rack_builder.rb:153:in `build_response'
/app/vendor/bundle/ruby/3.1.0/gems/faraday-2.7.11/lib/faraday/connection.rb:444:in `run_request'
/app/vendor/bundle/ruby/3.1.0/gems/faraday-2.7.11/lib/faraday/connection.rb:280:in `post'
/app/vendor/bundle/ruby/3.1.0/gems/sawyer-0.9.2/lib/sawyer/agent.rb:99:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/octokit-7.1.0/lib/octokit/connection.rb:156:in `request'
/app/vendor/bundle/ruby/3.1.0/gems/octokit-7.1.0/lib/octokit/connection.rb:28:in `post'
/app/vendor/bundle/ruby/3.1.0/gems/octokit-7.1.0/lib/octokit/client/issues.rb:102:in `create_issue'
/app/objects/vcs/github.rb:75:in `create_issue'
/app/objects/tickets/tickets.rb:44:in `submit'
/app/objects/tickets/milestone_tickets.rb:35:in `submit'
/app/objects/tickets/logged_tickets.rb:50:in `submit'
/app/objects/tickets/tagged_tickets.rb:35:in `submit'
/app/objects/tickets/commit_tickets.rb:36:in `submit'
/app/objects/tickets/emailed_tickets.rb:35:in `submit'
/app/objects/tickets/sentry_tickets.rb:45:in `submit'
/app/objects/puzzles.rb:109:in `block in expose'
/app/objects/puzzles.rb:97:in `loop'
/app/objects/puzzles.rb:97:in `expose'
/app/objects/puzzles.rb:44:in `deploy'
/app/objects/jobs/job.rb:38:in `proceed'
/app/objects/jobs/job_starred.rb:32:in `proceed'
/app/objects/jobs/job_recorded.rb:31:in `proceed'
/app/objects/jobs/job_emailed.rb:33:in `proceed'
/app/objects/jobs/job_commiterrors.rb:33:in `proceed'
/app/objects/jobs/job_detached.rb:48:in `exclusive'
/app/objects/jobs/job_detached.rb:36:in `block in proceed'
/app/objects/jobs/job_detached.rb:36:in `fork'
/app/objects/jobs/job_detached.rb:36:in `proceed'
/app/0pdd.rb:531:in `process_request'
/app/0pdd.rb:367:in `block in <top (required)>'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1706:in `block in compile!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1037:in `route_eval'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1019:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1068:in `block in process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1066:in `process_route'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1017:in `block in route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `each'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1014:in `route!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1138:in `block in dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1133:in `dispatch!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `block in call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `catch'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1109:in `invoke'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:949:in `call!'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:938:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/deflater.rb:44:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/xss_header.rb:20:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/path_traversal.rb:18:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/json_csrf.rb:28:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/base.rb:53:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.6/lib/rack/protection/frame_options.rb:33:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:261:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:254:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:219:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:2018:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `block in call'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1792:in `synchronize'
/app/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.6/lib/sinatra/base.rb:1576:in `call'
/app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.8/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

Please sign in to comment.