Skip to content

Commit

Permalink
Merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
tboyetteredhat committed Jun 14, 2024
2 parents 9caa7f0 + e1f6e49 commit ab7145c
Show file tree
Hide file tree
Showing 20 changed files with 146 additions and 91 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Create and delete Affects in single request (`OSIDB-2821`)
* Add link to bugzilla tracker on Flaw form (`OSIDB-2897`)
* Set public date to current date on unembargo (`OSIDB-2829`)
* Add CVSSv3 score explanation input field (`OSIDB-2913`)
* Remove checkbox on IssueQueue (`OSIDB-2488`)

### Changed
Expand All @@ -34,6 +35,10 @@
* Shows recommended tracker icon
* Make `Impact`, `Public Date` and `Component` optional for a `Rejected` flaw (`OSIDB-2849`)
* Renamed Flaw Status to Flaw State (`OSIDB-2899`)
* Improve reporting on tracker filing errors (`OSIDB-2909`)
* Added timezone to Public Date field (UTC) (`OSIDB-2790`)
* Don't collapse affected modules automatically after deleting a component (only occurred when no other components were expanded) (`OSIDB-2757`)
* Add emptiness for CVSSv3, CWE ID, Owner, Description, Statement, Mitigation on Advanced Search (`OSIDB-2816`)

### Fixed
* The session is now shared across tabs
Expand Down
2 changes: 2 additions & 0 deletions features/environment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def after_scenario(context, scenario):
context.browser.quit()
18 changes: 7 additions & 11 deletions features/flaw_detail_embargo.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,18 @@ Feature: Flaw detail testing on embargo flaw
When I update the embargoed flaw with a future public date
Then The embargoed flaw is updated

Scenario: Update affects for embargoed flaw
When I update the affects of the flaw and click 'Save Changes' button
Then All changes are saved

Scenario: Make flaw public and add public data
When I unembargo this flaw and add public date
Then Flaw is unembargoed and have public date

Scenario: Add new affect for an embargoed flaw
Scenario: Add new affect for an embargoed flaw
When I add a new affect with valid data
When The affect is added
Then The affect is added

Scenario: Update affects for an embargoed flaw
When I update the affects of the flaw and click 'Save Changes' button
Then All changes are saved

Scenario: Delete an affect from a flaw
When I delete an affect of the flaw
Then The affect is deleted
Then The affect is deleted

Scenario: Make flaw public and add public data
When I unembargo this flaw and add public date
Then Flaw is unembargoed and have public date
3 changes: 0 additions & 3 deletions features/steps/advance_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def step_impl(context):
def step_impl(context):
advanced_search_page = AdvancedSearchPage(context.browser)
advanced_search_page.first_flaw_exist()
context.browser.quit()


@then('I select the field and value to search flaws and I am able to view flaws matching the search')
Expand Down Expand Up @@ -75,7 +74,6 @@ def step_impl(context):
# 2. Check the flaws list count is correct. Since the data is sharing
# currently, this check will be added when the test data is lockdown in
# the future.
context.browser.quit()


@when('I am searching flaws with two fields and two values')
Expand All @@ -94,4 +92,3 @@ def step_impl(context):
assert "CUSTOMER" == field_value
field_value = advanced_search_page.get_field_value_from_flawlist("impact")
assert "LOW" == field_value
context.browser.quit()
3 changes: 0 additions & 3 deletions features/steps/flaw_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def step_impl(context):
@then('A new flaw is created')
def step_impl(context):
os.environ["FLAW_ID"] = check_created_flaw_exist(context)
context.browser.quit()


@when("I add a CVE ID to a flaw without a CVE")
Expand Down Expand Up @@ -122,7 +121,6 @@ def step_impl(context):
@then("The flaw CVE ID is saved")
def step_impl(context):
go_to_specific_flaw_detail_page(context.browser)
context.browser.quit()


@when('I create new embargoed flaw with valid data')
Expand All @@ -133,7 +131,6 @@ def step_impl(context):
@then('The flaw is created and marked as an embargoed flaw')
def step_impl(context):
os.environ["FLAW_ID"] = check_created_flaw_exist(context, embargoed=True)
context.browser.quit()


@when('I create flaw with valid data including optional fields')
Expand Down
25 changes: 1 addition & 24 deletions features/steps/flaw_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def step_impl(context):
# Check the comment saved successfully
comment_xpath = f'//p["data-v-38eda711="][text()="{context.add_comment}"]'
wait_for_visibility_by_locator(context.browser, By.XPATH, comment_xpath)
context.browser.quit()


@when('I {action} the document text fields')
Expand All @@ -83,7 +82,6 @@ def step_impl(context):
for field in fields:
v = flaw_detail_page.get_document_text_field(field)
assert v == context.texts.get(field), f"{field} text should be {context.texts.get(field)}, got {v}"
context.browser.quit()


@when('I add an acknowledgment to the flaw')
Expand All @@ -104,7 +102,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.click_acknowledgments_dropdown_btn()
flaw_detail_page.check_acknowledgement_exist(context.acknowledgement_value)
context.browser.quit()


@when('I update the dropdown {field} value')
Expand All @@ -122,7 +119,6 @@ def step_impl(context, field):
flaw_detail_page = FlawDetailPage(context.browser)
_, v = flaw_detail_page.get_select_value(field)
assert context.selected == v, f"{field} value should be {context.selected}, got {v}"
context.browser.quit()


@when("I edit the first acknowledgement in correct format")
Expand All @@ -145,7 +141,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.click_acknowledgments_dropdown_btn()
flaw_detail_page.check_acknowledgement_exist(context.acknowledgement_value)
context.browser.quit()


@when("I delete an acknowledgement from acknowledgement list")
Expand All @@ -164,7 +159,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.click_acknowledgments_dropdown_btn()
flaw_detail_page.check_acknowledgement_not_exist(context.ack_value)
context.browser.quit()


@when("I update the random input fields")
Expand All @@ -186,7 +180,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
for value in context.field_values:
flaw_detail_page.check_value_exist(value)
context.browser.quit()


@when("I update the CVE ID with a valid data")
Expand All @@ -212,7 +205,6 @@ def step_impl(context):
go_to_specific_flaw_detail_page(context.browser)
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.check_value_exist(context.value)
context.browser.quit()


@when("I {action} the CWE ID")
Expand All @@ -235,7 +227,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
v = flaw_detail_page.get_input_value('cweid')
assert v == context.field_value, f"CWE ID should be {context.field_value}, got {v}"
context.browser.quit()


@when('I update the Reported Date with a valid data')
Expand All @@ -254,7 +245,6 @@ def step_impl(context):
expected = datetime.strftime(datetime.strptime(context.v, "%Y%m%d"), "%Y-%m-%d")
get_value = flaw_detail_page.get_input_value("reportedDate")
assert get_value == expected, f"get {get_value}, expected {expected}"
context.browser.quit()


@when('I click self assign button and save changes')
Expand All @@ -278,7 +268,6 @@ def step_impl(context):
home_page = HomePage(context.browser)
login_user = home_page.userBtn.get_text()
assert assignee == login_user.strip(), f'Self assign failed: {assignee}'
context.browser.quit()


def add_a_reference_to_first_flaw(context, value, wait_msg, external=True):
Expand Down Expand Up @@ -314,7 +303,6 @@ def step_impl(context):
flaw_detail_page.click_reference_dropdown_button()
flaw_detail_page.check_value_exist(context.first_value)
flaw_detail_page.check_value_exist(context.second_value)
context.browser.quit()


@when("I add two RHSB references to the flaw")
Expand All @@ -335,7 +323,6 @@ def step_impl(context):
flaw_detail_page.click_reference_dropdown_button()
flaw_detail_page.check_value_exist(context.first_value)
flaw_detail_page.check_value_not_exist(context.second_value)
context.browser.quit()


@when("I update the flaw and click 'Reset Changes' button")
Expand Down Expand Up @@ -364,7 +351,6 @@ def step_impl(context):
assert context.source == flaw_page.get_select_value('source')[1]
assert context.reported_date == flaw_page.get_input_value('reportedDate')
assert context.description == flaw_page.get_document_text_field('description')
context.browser.quit()


@when("I delete a reference from a flaw")
Expand All @@ -391,7 +377,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.click_reference_dropdown_button()
flaw_detail_page.check_value_not_exist(context.expected)
context.browser.quit()


@when("I edit a internal/external reference")
Expand Down Expand Up @@ -422,7 +407,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.click_reference_dropdown_button()
flaw_detail_page.check_value_exist(context.expected)
context.browser.quit()


@when("I add a RHSB reference to the flaw with incorrect link")
Expand All @@ -441,7 +425,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.click_reference_dropdown_button()
flaw_detail_page.check_value_not_exist(context.v)
context.browser.quit()


@when("I update the embargoed flaw with a past public date")
Expand All @@ -460,7 +443,6 @@ def step_impl(context):
flaw_detail_page = FlawDetailPage(context.browser)
v = flaw_detail_page.get_input_value("publicDate")
assert v != context.v, f"Public date is updated to a past date {v}"
context.browser.quit()


@when("I update the embargoed flaw with a future public date")
Expand All @@ -475,7 +457,7 @@ def step_impl(context):

@then("The embargoed flaw is updated")
def step_impl(context):
context.browser.quit()
pass


@when("I update the affects of the flaw and click 'Save Changes' button")
Expand Down Expand Up @@ -531,7 +513,6 @@ def step_impl(context):
context.value_dict.keys(), token, component_value)
# There is a bug OSIDB-2600, so the following step will be failed
assert context.value_dict == field_value_dict
context.browser.quit()

@when("I add a new affect with valid data")
def step_impl(context):
Expand All @@ -545,7 +526,6 @@ def step_impl(context):
go_to_specific_flaw_detail_page(context.browser)
flaw_detail_page = FlawDetailPage(context.browser)
flaw_detail_page.check_value_exist(context.ps_component)
context.browser.quit()

@when("I delete an affect of the flaw")
def step_impl(context):
Expand All @@ -565,7 +545,6 @@ def step_impl(context):
module_component_list = flaw_detail_page.get_affect_module_component_values(
token, context.component)
assert (context.module, context.component) not in module_component_list
context.browser.quit()

@when("I click 'delete' button of an affect")
def step_impl(context):
Expand All @@ -584,7 +563,6 @@ def step_impl(context):
module_component_list = flaw_detail_page.get_affect_module_component_values(
token, context.component)
assert (context.module, context.component) in module_component_list
context.browser.quit()


@when("I unembargo this flaw and add public date")
Expand All @@ -608,4 +586,3 @@ def step_impl(context):
v = flaw_detail_page.get_input_value("publicDate")
public_date = datetime.strptime(context.public_date, "%Y%m%d%H%M").strftime("%Y-%m-%d %H:%M")
assert public_date in v, f"Public date should be {public_date}, got {v}"
context.browser.quit()
8 changes: 0 additions & 8 deletions features/steps/flaw_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def step_impl(context):
def step_impl(context):
flaw_page = FlawDetailPage(context.browser)
flaw_page.save_button_exist()
context.browser.quit()


@when('I check the check-all checkbox of flaw table')
Expand All @@ -37,7 +36,6 @@ def step_impl(context):
def step_impl(context):
home_page = HomePage(context.browser)
home_page.check_is_all_flaw_selected()
context.browser.quit()


# @given('The check-all checkbox of flaw list is checked')
Expand Down Expand Up @@ -77,7 +75,6 @@ def step_impl(context):
# def step_impl(context):
# home_page = HomePage(context.browser)
# home_page.check_bulk_assign(context.links[0])
# context.browser.quit()


@when("I click the field header of flaw list table")
Expand All @@ -102,7 +99,6 @@ def step_impl(context):
for k, v in context.value_dict.items():
for order, values in v.items():
assert is_sorted(values, order) is True, f"Sort by field {k} in {order} failed."
context.browser.quit()


@when("I check 'Open Issues' checkbox of flaw list")
Expand All @@ -122,7 +118,6 @@ def step_impl(context):
def step_impl(context):
# Check the first state value in the asce sorted flaw list
assert context.state != 'DONE', 'Closed issue(s) in open issues filter result'
context.browser.quit()


@when("I set a default filter and back to flaw list")
Expand Down Expand Up @@ -151,7 +146,6 @@ def step_impl(context):
home_page.first_flaw_exist()
asce_state = home_page.get_specified_cell_value(1, 3)
assert desc_state == asce_state, "Default search not work."
context.browser.quit()


@given("I assgin an issue to me")
Expand Down Expand Up @@ -184,5 +178,3 @@ def step_impl(context):
time.sleep(1)
owner = home_page.get_field_value("owner")
assert context.user_name == owner
# Need to check the count of my issues that depends on testdata
context.browser.quit()
2 changes: 0 additions & 2 deletions features/steps/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def step_impl(context):
"""
home_page = LoginPage(context.browser)
home_page.check_login()
context.browser.quit()


@when('I click the Logout button from the account dropdown')
Expand All @@ -24,4 +23,3 @@ def step_impl(context):
def step_impl(context):
home_page = LoginPage(context.browser)
home_page.check_login()
context.browser.quit()
2 changes: 0 additions & 2 deletions features/steps/quick_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def step_impl(context):
detail_page = FlawDetailPage(context.browser)
value = detail_page.get_input_value("cveid")
assert value == context.value
context.browser.quit()


@then('I search the flaw with text and I am able to view flaws list matching the search')
Expand All @@ -38,4 +37,3 @@ def step_impl(context):
else:
value = detail_page.get_document_text_field(field)
assert text in value
context.browser.quit()
2 changes: 1 addition & 1 deletion src/components/AffectedOfferings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ updateAffectsExpandedState(theAffects.value);
watch(theAffects, (nextValue) => {
expandedModules.value = affectedModules.value.reduce((modules: Record<string, boolean>, moduleName: string) => {
modules[moduleName] = areAnyComponentsExpandedIn(moduleName) ?? false;
modules[moduleName] = areAnyComponentsExpandedIn(moduleName) || expandedModules.value[moduleName] || false;
return modules;
}, {});
updateAffectsExpandedState(nextValue);
Expand Down
Loading

0 comments on commit ab7145c

Please sign in to comment.