Skip to content

Commit

Permalink
update test for switch buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
superstar54 committed Sep 8, 2024
1 parent eec5ae8 commit 37fc92c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions aiida_workgraph/web/frontend/src/components/WorkGraphItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,16 @@ function WorkGraph() {
checked={realtimeSwitch}
onChange={(checked) => setRealtimeSwitch(checked)}
style={{ marginRight: '10px' }}
/>
<label>Real-time state</label>
className="realtime-switch"
/>Real-time state
</div>
<div>
<Switch
checked={detailNodeViewSwitch}
onChange={(checked) => setDetailNodeViewSwitch(checked)}
style={{ marginRight: '10px' }}
/>
<label>Detail node view</label>
className="detail-node-view-switch"
/>Detail node view
</div>
</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion tests/web/frontend/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_workgraph_item(web_server, page, ran_wg_calcfunction):
"element => window.getComputedStyle(element).backgroundColor"
)
assert gui_node_color == "rgba(0, 0, 0, 0)"
page.get_by_role("switch").click() # Switch "Real-time state"
page.locator(".realtime-switch").click()

# this waits until a green background appears
page.wait_for_function(
Expand Down

0 comments on commit 37fc92c

Please sign in to comment.