Skip to content
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

Create FBT Test Module #154

Open
ShantKhatri opened this issue May 29, 2024 · 4 comments
Open

Create FBT Test Module #154

ShantKhatri opened this issue May 29, 2024 · 4 comments
Labels
google-summer-of-code Issues specifically targeted at students enrolled in the program Google Summer of Code ui-test

Comments

@ShantKhatri
Copy link
Contributor

ShantKhatri commented May 29, 2024

Part of #153

Test the creation of Function Block Types (FBTs) flow.

This flow ensures:

  • User interactions for creating new FBTs.
  • Verify the successful addition of FBTs.
@bwiesmayr bwiesmayr added google-summer-of-code Issues specifically targeted at students enrolled in the program Google Summer of Code ui-test labels May 30, 2024
@ShantKhatri
Copy link
Contributor Author

Hello @bwiesmayr,
I am nearly finished with this module but am currently experiencing difficulties accessing certain lists and tables.
Please refer to the screenshot below for reference:
Screenshot 2024-06-04 191211
Could you please provide guidance or suggest an approach to access these lists and tables?

@bwiesmayr
Copy link
Contributor

Hi,
can you publish a PR in draft mode to show intermediate results? otherwise it is hard to answer such questions. In general, the dialog comes from the NewTypeWizard, specifically the NewTypeWizardPage. The type selection is for instance the templateTableViewer. You can only get the elements while the dialog is open, if you access them later, there is exceptions.

@ShantKhatri
Copy link
Contributor Author

ShantKhatri commented Jun 6, 2024

Hi @bwiesmayr , With the help of templateTableViewer we can access the template table, but we need to add the viewerId. I have created a draft PR, can you please review it, I'm not able to access the section from which the user selects the parent folder name. I'm confused about that section, is it Tree or Explorer or something else?

@bwiesmayr
Copy link
Contributor

Hi @ShantKhatri, after reviewing your PR: somehow we have to manage to separate the test code from the production code. Adding getters etc is okay, you can then modify the widgets in the test, but adding code only relevant for testing should be reconsidered.

I had to check the code in detail myself to get details of the tree implementation. The new fb type wizard inherits from the WizardNewFileCreationPage. In that class I think it is the variable resourceGroup. For obvious reasons, we cannot directly edit this class either (it comes from the platform). Here, we also do not seem to have getters but from what I saw, it is possible to provide an "initial value". This could be a solution for the SWTBot that you can experiment with. Testing the widget interactions themselves is not necessary because the widget is provided by the Eclipse platform, so this workaround is perfectly fine for testing 4diac IDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
google-summer-of-code Issues specifically targeted at students enrolled in the program Google Summer of Code ui-test
Projects
None yet
Development

No branches or pull requests

2 participants