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

Feature/176 - Compare and Search views #181

Merged
merged 22 commits into from
Apr 19, 2021

Conversation

tiiavalt
Copy link
Contributor

See issue #176

This PR's commits should be squashed into one when merging.

@tiiavalt tiiavalt linked an issue Apr 13, 2021 that may be closed by this pull request
Copy link
Contributor

@turso turso left a comment

Choose a reason for hiding this comment

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

This was a pretty big pull request.

I don't know if those backend scripts are still needed, maybe @lakooi has some idea on it?

Left few suggestions how to fix the codacy issues and there where few functions that where repeated that can be fixed, but it's also ok if not. Those where mostly suggestions.

All in all looks pretty solid.

@@ -0,0 +1,161 @@
#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea about this backend scripts if they are needed or not. Or are they really part of this pull request?

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed this file from the branch as it contained our backend credentials

EXPOSE 3000
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

});
//Done twice since 2 builds
const secondBuildByBuildNumber = comparedDataState[1]
.filter(({ test_cases }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this function is repeated above so it could be moved to a single function

});

const first_not_matching = firstBuildByBuildNumber.filter(test_case => {
return !matching_array.some(matcher => {
Copy link
Contributor

Choose a reason for hiding this comment

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

here is also some repetition.

@@ -0,0 +1,56 @@
import React from 'react';
import Status from './Status';
// import { dashify } from '../../utils/helpers';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need these comments anymore?

let found = 0;
let metadata_len = json.metadata.length;
while (index < metadata_len && found === 0) {
if (json.metadata[index].metadata_name === name) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (json.metadata[index].metadata_name === name) {
if (json.metadata[parseInt(index)].metadata_name === name) {

This could fix the codacy issue

};
json.metadata.push(temp);
} else {
json.metadata[index].metadata2_value =
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
json.metadata[index].metadata2_value =
json.metadata[parseInt(index)].metadata2_value =

} else {
json.metadata[index].metadata2_value =
meta.metadata_value;
json.metadata[index].suite2_id = meta.suite_id;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
json.metadata[index].suite2_id = meta.suite_id;
json.metadata[parseInt(index)].suite2_id = meta.suite_id;

json.metadata[index].metadata2_value =
meta.metadata_value;
json.metadata[index].suite2_id = meta.suite_id;
json.metadata[index].test2_run_id =
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
json.metadata[index].test2_run_id =
json.metadata[parseInt(index)].test2_run_id =

@turso turso merged commit 87deca5 into develop Apr 19, 2021
@turso turso deleted the feature/176-comparison-and-search-views branch April 19, 2021 10:20
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 this pull request may close these issues.

Compare and Search views
3 participants