wolfiton

wolfiton

Problem with acceptance test in hound not starting server on port 4001

Hello everyone,

I have a problem in using hound to create a simple acceptance test following this https://shankardevy.com/phoenix-inside-out-mpf/#setting-up-hound

Even thought i followed all the instructions I am getting a failure:

mango  mix test ./test/mango_web/acceptance/homepage_test.exs\ 


  1) test presence of featured products (MangoWeb.HomepageTest)
     test/mango_web/acceptance/homepage_test.exs :7
     Assertion with =~ failed
     code:  assert page_source() =~ "Seasonal products"
     left:  "<html><head></head><body></body></html>"
     right: "Seasonal products"
     stacktrace:
       test/mango_web/acceptance/homepage_test.exs :10: (test)



Finished in 0.3 seconds
1 test, 1 failure

Also i am using phantomjs like this

phantomjs --wd

Here is the github repo with all the code i have for chapter 3 https://github.com/wolfiton/hound-problem-ch3

Thanks in advance

Marked As Solved

wolfiton

wolfiton

If anyone needs a solution to this problem follow the steps:

I assume also that you installed phantomjs using sudo apt-get install phantomjs already in Ubuntu

If you did not then don;t use step 1 the following steps are applicable

Step 1 sudo apt-get remove --purge phantomjs This command will remove phantomjs and all it’s configuration files in one go(you need root password for sudo action)

Step 2 Head over to Download PhantomJS and download the Linux 32 or Linux 64 archive
then open a terminal and navigate to where you file has been downloaded using cd(most common place is Downloads so cd ~/Downloads should do it)

Step 3 tar xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2 after extraction you should get a folder with the same name

Step 4 cd ~/Downloads/phantomjs-2.1.1-linux-x86_64/bin(this can be done in one line using cp but preferred this method for clarity reasons)

Step 5 sudo cp -R./phantomjs /usr/local/bin This command copies the phantomjs executable binary to the usr/local/bin

Step 6 Verify which pahntomjs the result should be usr/local/bin/phantomjs

Now you are good to go.

Good reads and ref

https://www.linuxquestions.org/questions/linux-newbie-8/how-to-extract-a-tar-bz2-file-161371/

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44532 311
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement