-
Notifications
You must be signed in to change notification settings - Fork 11
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
Tests: Enable cypress to run cucumber tests #133
Conversation
a46407b
to
3814caa
Compare
Vagrant spawning is little bit flaky, I need to look deeper into this |
e55e841
to
0c1e424
Compare
7a62c2c
to
08ff79b
Compare
08ff79b
to
15814cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left some questions and notes.
@@ -10,6 +10,11 @@ Vagrant.configure("2") do |config| | |||
|
|||
# Needed by Cypress - optional if you edit your /etc/hosts | |||
config.vm.network "forwarded_port", guest: 443, host: 443 | |||
config.vm.network "private_network", | |||
:ip => "192.168.56.10", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this pointing to the live instance instead of the local one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering why you set this specific IP and where it points to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, this is pointing to a local instance. Once the server is deployed, it's running on 192.168.56.101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, so it seems that it might be this IP as any other (from my understanding, it is a matter of choice).
FYI: While I was researching the config.vm.network "private_network"
command, I read the following in this article (good to take it into account):
To enable this feature we need to add config.vm.network "private_network" to our Vagrantfile. We’re also going to specify the IP address used by the VM. The downside to this is that we have to manage what VMs have what IP if we’re working with multiple VMs. The upsides are that it makes it easier to know what the IP address is without vagrant sshing in and the IP doesn’t get randomly reset forcing us to update a bunch of configuration files.
May there be also a missing number at the end? 192.168.56.101 instead of 192.168.56.10 :)
cypress/plugins/index.js
Outdated
@@ -0,0 +1,5 @@ | |||
const cucumber = require("cypress-cucumber-preprocessor").default; | |||
|
|||
module.exports = (on, config) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Carla!
To be completely frankly honest with you, I don't know either. I was setting it up using the documentation from cypress-cucumber-preprocessor.
The config
is not directly in the export statement anyway, so it is very much possible it's either injected or redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, after a second (and even third) reading, it seems that the article mentioned above refers to the use Webpack loader to process feature files. It is still a bit confusing to me if this step is entirely necessary...
But in any case, we can keep the current configuration from now (and change it afterward to adapt it to WebPack if we feel there is something missing).
Add libraries needed to run cucumber tests with cypress, namely cypress-cucumber-preprocessor and cypress-esbuild-preprocessor in order to translate gherkin steps to cypress executable test. Configure cypress to run the gherkin tests. Signed-off-by: Michal Polovka <mpolovka@redhat.com>
Test the addition of the user. This test still depends on login via old_UI and will be changed in the future. It also depends on freeipa#134 Signed-off-by: Michal Polovka <mpolovka@redhat.com>
15814cf
to
17490a9
Compare
LGTM. As mentioned in one of the comments, we can keep the current configuration for the Cucumber configuration and change it in the future to adapt it to WebPack if we feel there is some feature we can take advantage of. |
Thank you, Carla, I will merge this PR and keep an eye on it. Regarding the network, I have tried too many combinations to remember, but this seems to be the only one that works. Since it's stable, I would also prefer to keep it as it is right now. Thank you for the review! |
Add libraries needed to run cucumber tests with cypress, namely cypress-cucumber-preprocessor and cypress-esbuild-preprocessor in order to translate gherkin steps to cypress executable test.
Configure cypress to run the gherkin tests.