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

Finish chapter "Testing Spec applications" #75

Closed
3 tasks done
koendehondt opened this issue Apr 19, 2024 · 6 comments · Fixed by #95
Closed
3 tasks done

Finish chapter "Testing Spec applications" #75

koendehondt opened this issue Apr 19, 2024 · 6 comments · Fixed by #95
Assignees
Milestone

Comments

@koendehondt
Copy link
Collaborator

koendehondt commented Apr 19, 2024

  • Add the code of the class under test
  • Check the code examples
  • Add the code to the code repo
@koendehondt koendehondt added this to the Book release milestone Apr 19, 2024
@koendehondt koendehondt self-assigned this Apr 28, 2024
@koendehondt
Copy link
Collaborator Author

The status reads:

Looking for some source of already written tests - may be the launcher so that people can have a look

@Ducasse Shouldn't we simply use the example that is in the chapter already, instead of using other code?

The test code is in the chapter, but the presenter class is not. The code is in Chapters/TestingInSpec/Spec2-Testing.st.

@Ducasse
Copy link
Member

Ducasse commented Apr 28, 2024

I do not remember :)
I probably thought that we do not have enough examples.
For the presenter class I have no idea where I put it.
And worse I have no idea what is this ClassVisualizerPresenter.
I do not think that I wrote it.
I do not understand its purpose (can you check the author using some VS magic?).

@koendehondt
Copy link
Collaborator Author

After re-reading the chapter "Testing Spec applications", I think the example with ClassVisualizerPresenter is strange. It has two functionalities:

  1. When a class is selected, the definition string is shown.
  2. When a button is selected, a morph with the class name changes color.

These two functionalities have no relation. Very strange. Very confusing.

I wonder whether it wouldn't be better to remove all the test code and move the section "Testing your application UI" from the chapter "Most of Spec in on example" to this chapter.

@koendehondt
Copy link
Collaborator Author

I do not remember :) I probably thought that we do not have enough examples. For the presenter class I have no idea where I put it. And worse I have no idea what is this ClassVisualizerPresenter. I do not think that I wrote it. I do not understand its purpose (can you check the author using some VS magic?).

You added it 😁. See f1d5ec1. The code was added by Christophe in 4ff405a.

@Ducasse
Copy link
Member

Ducasse commented Apr 29, 2024

To me this example is a non sense. I do not understand why I would color a class.
I would keep the test in the Most... because people should write tests.
Now we could just design a little example that is better than this one :)

@koendehondt
Copy link
Collaborator Author

@Ducasse I have written another little example that has a list and some buttons. You find the code in https://github.com/SquareBracketAssociates/CodeOfSpec20Book/blob/master/src/CodeOfSpec20Book/ColorChooser.class.st
Here is a screenshot:
ExampleApplication

I am adapting the text. I expect to finish tomorrow. I will assign you as reviewer when I am done.

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 a pull request may close this issue.

2 participants