diff options
author | Valery Sizov <valery@gitlab.com> | 2015-01-19 22:18:00 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-01-19 22:18:00 +0300 |
commit | 1809b3ee36b38cd47504114dfb1fed53206ebd15 (patch) | |
tree | 09e92374768004756b731e354cf46042bd52e9c5 /features/steps/admin | |
parent | 2fba31890e922fa8bae61e7aa3f21c5b4314e735 (diff) |
Spinach for admin applications
Diffstat (limited to 'features/steps/admin')
-rw-r--r-- | features/steps/admin/applications.rb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/features/steps/admin/applications.rb b/features/steps/admin/applications.rb new file mode 100644 index 00000000000..d59088fa3c3 --- /dev/null +++ b/features/steps/admin/applications.rb @@ -0,0 +1,55 @@ +class Spinach::Features::AdminApplications < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedAdmin + + step 'I click on new application button' do + click_on 'New Application' + end + + step 'I should see application form' do + page.should have_content "New application" + end + + step 'I fill application form out and submit' do + fill_in :doorkeeper_application_name, with: 'test' + fill_in :doorkeeper_application_redirect_uri, with: 'https://test.com' + click_on "Submit" + end + + step 'I see application' do + page.should have_content "Application: test" + page.should have_content "Application Id" + page.should have_content "Secret" + end + + step 'I click edit' do + click_on "Edit" + end + + step 'I see edit application form' do + page.should have_content "Edit application" + end + + step 'I change name of application and submit' do + page.should have_content "Edit application" + fill_in :doorkeeper_application_name, with: 'test_changed' + click_on "Submit" + end + + step 'I see that application was changed' do + page.should have_content "test_changed" + page.should have_content "Application Id" + page.should have_content "Secret" + end + + step 'I click to remove application' do + within '.oauth-applications' do + click_on "Destroy" + end + end + + step "I see that application is removed" do + page.find(".oauth-applications").should_not have_content "test_changed" + end +end |