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

Browser maze runner tests for feature flags #1562

Conversation

imjoehaines
Copy link
Contributor

Goal

Adds some maze runner tests for feature flags to the browser test suite

@imjoehaines imjoehaines requested a review from a team November 3, 2021 09:33
@github-actions
Copy link

github-actions bot commented Nov 3, 2021

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 42.49 kB 12.97 kB
After 42.49 kB 12.97 kB
± No change No change

code coverage diff

Coverage values did not change👌.

Total:

Lines Branches Functions Statements
0%(+0%) 0%(+0%) 0%(+0%) 0%(+0%)

Generated by 🚫 dangerJS against cf0267c

Copy link
Contributor

@Cawllec Cawllec left a comment

Choose a reason for hiding this comment

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

Left a couple of comments regarding integration the feature flags into maze-runner, but everything looks good here and we can use it as a baseline for which steps would be useful.

And the error is a valid browser payload for the error reporting API
And event 0 is handled
And the error payload field "events.0.featureFlags" is an array with 8 elements
And the event "featureFlags.0.featureFlag" equals "from config 1"
Copy link
Contributor

Choose a reason for hiding this comment

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

We could simplify this with a new step that consumes a table and applies its contents across the featureFlags. That way this could also be unordered which would remove a source of flakiness.

For now, provided we think flakes due to the ordering of feature flags are unlikely, I propose we raise a ticket to add said step to Maze-runner for future use in this and other notifiers.

Proposed table would look something like:

| featureFlag    | variant              |
|--------------|----------------|
| from config 1 | 1234                 |
| from config 2 |                          |

etc

@@ -41,3 +41,15 @@
txt = Maze.driver.find_element(id: 'bugsnag-test-state').text
assert_equal('DONE', txt, "Expected #bugsnag-test-state text to be 'DONE'. It was '#{txt}'.")
end

Then("the event {string} has no variant") do |field_path|
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned above we should add some steps to maze-runner core to perform these steps unless they're going to seriously vary between each notifier.

@imjoehaines imjoehaines merged commit 588c76e into integration/feature-flags Nov 4, 2021
@imjoehaines imjoehaines deleted the feature-flags/browser-maze-runner-tests branch November 4, 2021 17:09
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.

2 participants