Skip to content

Commit

Permalink
Not sure why this was removed
Browse files Browse the repository at this point in the history
  • Loading branch information
madwort committed Jul 3, 2024
1 parent 1300e70 commit 0e71651
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/integration/views/test_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,37 @@ def test_workspace_multiselect_add_files_one_valid(airlock_client, bll):
assert response.rendered_content.count('value="OUTPUT"') == 1


def test_workspace_multiselect_add_files_none_valid(airlock_client, bll):
airlock_client.login(workspaces=["test1"])
workspace = factories.create_workspace("test1")
factories.write_workspace_file(workspace, "test/path1.txt")
factories.write_workspace_file(workspace, "test/path2.txt")
release_request = factories.create_release_request(
workspace, user=airlock_client.user
)
factories.write_request_file(release_request, "group1", "test/path1.txt")
factories.write_request_file(release_request, "group1", "test/path2.txt")

response = airlock_client.post(
"/workspaces/multiselect/test1",
data={
"action": "add_files",
"selected": [
"test/path1.txt",
"test/path2.txt",
],
"next_url": workspace.get_url("test/path.txt"),
},
)

assert response.status_code == 200
assert "test/path1.txt" in response.rendered_content
assert "test/path2.txt" in response.rendered_content
assert response.rendered_content.count("already in group") == 2
assert response.rendered_content.count('value="OUTPUT"') == 0
assert 'name="filegroup"' not in response.rendered_content


def test_workspace_multiselect_bad_action(airlock_client, bll):
airlock_client.login(workspaces=["test1"])
workspace = factories.create_workspace("test1")
Expand Down

0 comments on commit 0e71651

Please sign in to comment.