RedHatQE / RedHatQE/widgetastic.core

Preferred way of performing action on view before reading?

Open
#158 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
37
Forks
46
PR merge metrics
No merged PRs in 30d

Description

In Satellite, we have a page with multiple tabs. One of the tabs has two checkboxes and their state determines content of table below. Checkboxes state is reset when you switch out of the tab.

In our automation, page is modelled as view and each tab is nested view.

What is preferred way of reading the page content, with setting said checkboxes at the same time?

read() methods don't take any arguments, so I can't pass in the value that would force the action before reading. I can read selected tabs, call page.tab.widget.update() and read page.tab again while it's active, but it feels like leaking framework details into test code. Then there is this solution, which I find awkward.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the read() methods and the nested-view behavior described in the issue, then compare the linked contenthost.py solution. The issue does not name an implementation file or test; done would require an agreed API for setting checkbox state before reading without exposing framework details in test code.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.