Commit fcb09f0f authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'sl-qa-staging-65-fix-correct-page-issue' into 'master'

Ensure test is on login page before attempting login

See merge request gitlab-org/gitlab-ce!31040
parents a9c7bda8 50a24da2
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module QA module QA
context 'Plan' do context 'Plan' do
describe 'check xss occurence in @mentions in issues' do describe 'check xss occurence in @mentions in issues' do
before do it 'user mentions a user in comment' do
QA::Runtime::Env.personal_access_token = QA::Runtime::Env.admin_personal_access_token QA::Runtime::Env.personal_access_token = QA::Runtime::Env.admin_personal_access_token
unless QA::Runtime::Env.personal_access_token unless QA::Runtime::Env.personal_access_token
...@@ -20,6 +20,8 @@ module QA ...@@ -20,6 +20,8 @@ module QA
Page::Main::Menu.perform(&:sign_out) if Page::Main::Menu.perform { |p| p.has_personal_area?(wait: 0) } Page::Main::Menu.perform(&:sign_out) if Page::Main::Menu.perform { |p| p.has_personal_area?(wait: 0) }
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials) Page::Main::Login.perform(&:sign_in_using_credentials)
project = Resource::Project.fabricate_via_api! do |resource| project = Resource::Project.fabricate_via_api! do |resource|
...@@ -37,9 +39,7 @@ module QA ...@@ -37,9 +39,7 @@ module QA
issue.project = project issue.project = project
end end
issue.visit! issue.visit!
end
it 'user mentions a user in comment' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter show.select_all_activities_filter
show.comment('cc-ing you here @eve') show.comment('cc-ing you here @eve')
......
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