Commit cf7b1562 authored by Regis's avatar Regis

reduced amount of failures in feature test - vue paints - .includes does not work

parent 5ba83d96
...@@ -22,8 +22,10 @@ ...@@ -22,8 +22,10 @@
'store', 'store',
], ],
created() { created() {
const url = window.location.href; // ** `.includes` does not work in PhantomJS
if (url.includes('?')) this.pageNum = url.split('?')[1];
// const url = window.location.toString();
// if (url.includes('?')) this.pageNum = url.split('?')[1];
// now fetch page appropriate data // now fetch page appropriate data
this.store.fetchDataLoop.call(this, Vue, this.pageNum); this.store.fetchDataLoop.call(this, Vue, this.pageNum);
}, },
......
require 'spec_helper' require 'spec_helper'
require 'rails_helper'
describe "Pipelines" do describe "Pipelines", feature: true, js: true do
include GitlabRoutingHelper include GitlabRoutingHelper
include WaitForAjax
let(:project) { create(:empty_project) } let(:project) { create(:empty_project) }
let(:user) { create(:user) } let(:user) { create(:user) }
...@@ -20,7 +22,11 @@ describe "Pipelines" do ...@@ -20,7 +22,11 @@ describe "Pipelines" do
before { visit namespace_project_pipelines_path(project.namespace, project, scope: scope) } before { visit namespace_project_pipelines_path(project.namespace, project, scope: scope) }
it { expect(page).to have_content(pipeline.short_sha) } it do
wait_for_ajax
expect(page).to have_content(pipeline.short_sha)
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment