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

Only show "add file(s)" buttons when a request is in pending or returned statuses #439

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

rebkwok
Copy link
Contributor

@rebkwok rebkwok commented Jul 1, 2024

Fixes #438

A file can only be added from a workspace with a current request if that request is in pending or returned status (i.e. author-editable ones). We already have appropriate checks and error messages if a file can't be added due to request status, but this disables the button.

Also adds similar checks for the "add files" multiselect and disables it if there is an active request in non-editable status. It doesn't check there are add-able files, since the modal already shows the file state for each selected file.

image

expect(locator).not_to_have_class(re.compile("selected"))


def assert_tree_element_is_selected(locator):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why these checks started failing on this PR, and only in the docker tests, but they should use the playwright expect anyway, which will let them rely on the default wait

Copy link
Member

@bloodearnest bloodearnest left a comment

Choose a reason for hiding this comment

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

Nice, thanks

@rebkwok rebkwok merged commit e4bbd85 into main Jul 3, 2024
10 checks passed
@rebkwok rebkwok deleted the add_file_bug branch July 3, 2024 08:04
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.

Disable add file button when request is under review
2 participants