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

feat: Allows testers' results to be publicly viewable #1209

Merged
merged 16 commits into from
Sep 12, 2024

Conversation

howard-e
Copy link
Contributor

Address #1204.

@howard-e howard-e changed the title Expand public view Allows testers' results to be publicly viewable Sep 10, 2024
@howard-e howard-e requested a review from stalgiag September 10, 2024 17:25
Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

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

This is awesome!

I tested manually and tried to see if I could break it. I was unable to. It does feel a bit weird to get the form view when viewing an unsubmitted test. I get that it isn't actually editable but just feels strange. Maybe it would feel better if the icon on the left in the navigator didn't switch to the "in progress" icon. No strong feelings here though.

I left minor organizational comments inline.

disabled={!nonSelfAssignedRuns.length}
>
<FontAwesomeIcon icon={faFileImport} />
View Results for...
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like only the label is different so a possible simplification could be:

const dropdownLabel = isAdmin ? "Open run as..." : "View Results for...";

<Dropdown focusFirstItemOnShow>
  <Dropdown.Toggle
    variant="secondary"
    disabled={!nonSelfAssignedRuns.length}
  >
    <FontAwesomeIcon icon={faFileImport} />
    {dropdownLabel}
  </Dropdown.Toggle>
  <Dropdown.Menu role="menu">
    {nonSelfAssignedRuns.map(testPlanRun => (
      <Dropdown.Item
        key={testPlanRun.id}
        role="menuitem"
        href={`/run/${testPlanRun.id}?user=${testPlanRun.tester.id}`}
      >
        {testPlanRun.tester.username}
      </Dropdown.Item>
    ))}
  </Dropdown.Menu>
</Dropdown>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another good catch! Done in 643c123

@@ -84,7 +88,10 @@ const UnexpectedBehaviorsFieldset = ({
name={`problem-${commandIndex}`}
autoFocus={isSubmitted && unexpectedBehaviors.failChoice.focus}
defaultChecked={unexpectedBehaviors.failChoice.checked}
onClick={unexpectedBehaviors.failChoice.click}
onClick={e => {
if (readOnly) e.preventDefault();
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be nice to wrap this behavior in a handler function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, done in e62a595

// we are ready enough to show the page and all the buttons when the above code is
// pageReady and we have an anon view, bot test run, or a test result to display
const completeRender = pageReady && (!isSignedIn || currentTest.testResult);
// const enableInteractions = isSignedIn || !isViewingRun;
Copy link
Contributor

Choose a reason for hiding this comment

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

Left behind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!

@howard-e
Copy link
Contributor Author

howard-e commented Sep 11, 2024

It does feel a bit weird to get the form view when viewing an unsubmitted test. I get that it isn't actually editable but just feels strange. Maybe it would feel better if the icon on the left in the navigator didn't switch to the "in progress" icon

@stalgiag agreed with this, it does seem a little odd. Following this is a screenshot I've done to represent the case where there is "missing" results for that tester's test in the test navigator using a gray question mark with an updated gray border. Also in the screenshot, is a highlighted text to show some description around the current state of the test if viewing as a user that's not admin / signed out (although I'm more weary about adding new language). I was thinking it could be something like:

  • Viewing "submitted | in progress | unopened(?)" tests of tester in read-only mode ...

What do you think?

screenshot showing what's described above

@stalgiag
Copy link
Contributor

@stalgiag agreed with this ...

What do you think?

That looks great! I think 'unopened' works well enough.

…n admin / signed out user through the test navigator and heading message
@howard-e
Copy link
Contributor Author

@stalgiag agreed with this ...
What do you think?

That looks great! I think 'unopened' works well enough.

Thanks for your thoughts there! I've pushed 38ef952 for you to check out.

@howard-e howard-e changed the title Allows testers' results to be publicly viewable feat: Allows testers' results to be publicly viewable Sep 12, 2024
Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for going above and beyond in addressing the feedback.

@stalgiag stalgiag merged commit afede8d into development Sep 12, 2024
2 checks passed
@stalgiag stalgiag deleted the expand-public-view branch September 12, 2024 16:13
howard-e added a commit that referenced this pull request Sep 18, 2024
…024 Release

Includes the following changes:
* #1206, to address #1202 and #1203
* #1209, to address #1204
* #1195, to address #975
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In production / Completed
Development

Successfully merging this pull request may close these issues.

2 participants