-
Notifications
You must be signed in to change notification settings - Fork 5
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
Pc 686 e2e nieuws werkinstructies #985
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1fcf77f
to
9247d0e
Compare
4ec1be2
to
915b3fb
Compare
Refactored Bericht class in CreateBericht.cs from a record to a regular class and using UpdateAsync method
Reformatted and restructured CreateBericht.cs for better readability and consistency.
Renamed `CreateBerichtExtension` to `ManageBerichtExtension`. Renamed `CreateBericht` to `CreateBerichtAsync` for async clarity. Updated `CreateBerichten` to call `CreateBerichtAsync`. Added `UpdateBerichtAsync` for updating `Bericht` objects. Modified `Bericht` class: added `Key` property, made `Title` required, marked several properties as `new`, and updated `DisposeAsync` to filter by `BerichtType` and `Title`. Removed `UpdateAsync` method, merged its functionality into `UpdateBerichtAsync`. Ensured `DisposeAsync` sets `Key` to `Title` after updating. Updated test scenarios to use async methods, improving efficiency and consistency. Simplified deletion steps in `Scenario19`.
…cenario-24-25-26 Pc-686 End to end tests scenario 24 25 26
…C-686-scenario-27-28-30
Updated NieuwsEnWerkInstructiesScenarios.cs to replace CreateBericht with CreateBerichtAsync in Scenario27, Scenario28, and Scenario30. This change enhances performance and better handles asynchronous operations.
Renamed `CreateBerichtExtension` to `ManageBerichtExtension`. Updated `CreateBericht` to `CreateBerichtAsync` for async conventions. Replaced `OnSaveBericht` with `UpdateBerichtAsync`. Converted `Bericht` from a record to a class with additional properties and methods. Added a constructor to `Bericht` to initialize `_page`. Updated `DisposeAsync` to use `_page` and added detailed filtering logic. Set `Key` property in `CreateBerichtAsync` and added update logic in `UpdateBerichtAsync`. Updated test scenarios to use async methods and adjusted namespace imports and variable names for consistency.
Replaced CreateBericht with CreateBerichtAsync in multiple test methods within the NieuwsEnWerkInstructiesScenarios class. This change affects Scenario31, Scenario32, Scenario33, and other scenarios involving the creation of news items and work instructions. The update ensures asynchronous handling, improving performance and responsiveness.
Added GetAllLinksFromNavAsync in Locators.cs to retrieve all <a> tags within a <nav> element. Introduced FindBerichtOnPagesAsync in ManageBericht.cs to search for specific text across multiple pages with optional URL filtering. Updated NieuwsEnWerkInstructiesScenarios.cs to navigate to a specific section, browse all pages, and verify the absence of a news item using the new method. Included System namespace in ManageBericht.cs.
Added GetAllLinksFromNavAsync in Locators.cs to retrieve all link elements within a <nav> element. Introduced FindBerichtOnPagesAsync in ManageBericht.cs to search for specific "bericht" across multiple pages. Updated NieuwsEnWerkInstructiesScenarios.cs to use FindBerichtOnPagesAsync for verifying "nieuws" items. Replaced direct navigation to home page with Page.NavigateToNieuwsWerkinstructiesBeheer. Removed GetNieuwsSection().GetByRole(AriaRole.Article) and replaced with assertions using FindBerichtOnPagesAsync. Added necessary using directives in ManageBericht.cs.
Replaced `GetByText` with `GetBeheerRowByValue` for locating elements by `searchString`. This change improves the accuracy of element identification on the web page.
Removed FindBerichtOnPagesAsync from ManageBericht.cs. Updated NieuwsEnWerkInstructiesScenarios.cs to navigate directly to the home page. Added manual iteration through Nieuws section pages by clicking "Next Page" and checking for nieuwsbericht visibility. Updated assertion to reflect new nieuwsbericht existence check method.
Removed FindBerichtOnPagesAsync from ManageBericht.cs. Replaced NavigateToNieuwsWerkinstructiesBeheer with GotoAsync("/"). Updated logic to manually navigate and check for nieuws items. Iterate through pages using nextPageButton until disabled. Check visibility of nieuws item by title on each page. Updated assertions to reflect new navigation and search logic.
The code within the `while` loop that waits for the `nieuwsSection.First` element to be visible has been removed. The loop now ends after checking if the `nieuwsSection` contains the specified `niewus.Title`. A new step has been added after the loop to assert that the `nieuwsbericht` should not be visible. The assertion `Assert.AreEqual(false, niewsExists);` has been added to verify that `niewsExists` is `false`. These changes improve the efficiency of the test by removing redundant waits and directly asserting the expected outcome.
…C-686-e2e-31-32-33-34-35
Introduce IsBerichtVisibleOnAllPagesAsync in ManageBericht.cs to encapsulate the logic for checking the visibility of a Bericht across multiple pages within a section. Refactor NieuwsEnWerkInstructiesScenarios.cs to use this new method, simplifying the test code by removing manual page navigation and visibility checks.
…C-686-e2e-31-32-33-34-35
Updated ManageBericht.cs with GetBerichtOnAllPagesAsync and AreSkillsVisibleByNameAsync methods. Refactored NieuwsEnWerkInstructiesScenarios.cs to use these new methods, improving navigation and visibility checks for Nieuws and Werkinstructies articles. Enhanced code readability and maintainability by updating assertions to use the new methods.
…cenario-27-28-30 pc-686 end-to-end test scenarios 27, 28, 30
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
…2e-31-32-33-34-35 PC-686 end to end test scenario 31-32-33-34-35
- Added `WaitForPageAndSpinnerAsync` calls in `ManageBericht.cs` to ensure complete page load before interactions. - Refactored to store `Rich Text Editor` element in a variable before filling it in `ManageBericht.cs`. - Introduced `WaitForPageAndSpinnerAsync` method in `ManageBericht.cs` for centralized page and spinner wait logic. - Updated `NieuwsEnWerkInstructiesScenarios.cs` to use `nieuws.PublicatieDatum` for publication date expectation, enhancing test accuracy.
…C-686-e2e-nieuws-werkinstructies PC-686 Hotfix Improve page load handling and test accuracy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.