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

Cleanup it tests #36

Merged
merged 18 commits into from Dec 19, 2018

Conversation

Projects
None yet
2 participants
@Skejven
Copy link
Member

Skejven commented Dec 13, 2018

Description

Fixed #34 .

Motivation and Context

IT tests contained a lot of unnecessary and some tests that made them hard to understand.
Now they are cleaned up.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I hereby agree to the terms of the Knot.x Contributor License Agreement.

@tomaszmichalak

This comment has been minimized.

Copy link
Contributor

tomaszmichalak commented Dec 13, 2018

Good job!

Skejven added some commits Dec 14, 2018

.rxSendForm(getMultiMap(formData));

subscribeToResult_shouldSucceed(context, httpResponseSingle, resp -> {
assertEquals(Jsoup.parse(FileReader.readTextSafe(expectedResponseFile)).body().html(),

This comment has been minimized.

@tomaszmichalak

tomaszmichalak Dec 18, 2018

Contributor

Please mark io.knotx.junit.util.FileReader as deprecated.

This comment has been minimized.

@Skejven
.rxSendForm(getMultiMap(formData));

subscribeToResult_shouldSucceed(context, httpResponseSingle, resp -> {
assertEquals(Jsoup.parse(FileReader.readTextSafe(expectedResponseFile)).body().html(),

This comment has been minimized.

@tomaszmichalak

tomaszmichalak Dec 18, 2018

Contributor

Can we introduce util that would hide Jsoup dependency like:
String HTMLFormatter.get(String input)
String HTMLFormatter.get(URL input)
Then when we decide to change Jsoup to different engine we would not have to fix all tests.

This comment has been minimized.

@Skejven

Skejven Dec 19, 2018

Member

Good idea.
However, I will create assertion that checks HTML body.

This comment has been minimized.

@Skejven

@ExtendWith(KnotxExtension.class)
@TestInstance(Lifecycle.PER_CLASS)
public class SampleApplicationFallbackSupportIntegrationTest {

This comment has been minimized.

@tomaszmichalak

tomaszmichalak Dec 18, 2018

Contributor

I really like this class!

@tomaszmichalak tomaszmichalak merged commit 2eadfc8 into master Dec 19, 2018

3 checks passed

CodeFactor No issues found.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tomaszmichalak tomaszmichalak deleted the feature/cleanup-it-tests branch Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment