Skip to content

Commit

Permalink
Merge pull request #10927 from eduardoj/fix_smoketests_responsive_ux_…
Browse files Browse the repository at this point in the history
…flag

Adapt smoketests to responsive UX
  • Loading branch information
eduardoj committed Apr 1, 2021
2 parents e22a969 + 2892dd6 commit 7bd4ab9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions dist/t/spec/features/0010_authentication_spec.rb
Expand Up @@ -15,11 +15,11 @@
click_button('Sign Up')
end
expect(page).to have_content("The account 'test_user' is now active.")
expect(page).to have_link('link-to-user-home')
expect(page).to have_link('top-navigation-profile-dropdown')
end

it "should be able to login" do
login
expect(page).to have_link('link-to-user-home')
expect(page).to have_link('top-navigation-profile-dropdown')
end
end
8 changes: 4 additions & 4 deletions dist/t/spec/features/0030_project_spec.rb
Expand Up @@ -10,16 +10,16 @@
end

it "should be able to create" do
within("div#personal-navigation") do
click_link('Create Home')
within("#left-navigation") do
click_link('Create Your Home Project')
end
click_button('Accept')
expect(page).to have_content("Project 'home:Admin' was created successfully")
end

it "should be able to add repositories" do
within("div#personal-navigation") do
click_link('Home Project')
within("#left-navigation") do
click_link('Your Home Project')
end
click_link('Repositories')
click_link('Add from a Distribution')
Expand Down
18 changes: 9 additions & 9 deletions dist/t/spec/features/0040_package_spec.rb
Expand Up @@ -10,8 +10,8 @@
end

it "should be able to create new" do
within("div#personal-navigation") do
click_link('Home Project')
within("#left-navigation") do
click_link('Your Home Project')
end
click_link('Create Package')
fill_in 'package_name', with: 'hello_world'
Expand All @@ -22,8 +22,8 @@
end

it "should be able to upload files" do
within("div#personal-navigation") do
click_link('Home Project')
within("#left-navigation") do
click_link('Your Home Project')
end
click_link('hello_world')
click_link('Add File')
Expand All @@ -33,8 +33,8 @@
end

it "should be able to branch" do
within("div#personal-navigation") do
click_link('Home Project')
within("#left-navigation") do
click_link('Your Home Project')
end
click_link('Branch Package')
fill_in 'linked_project', with: 'openSUSE.org:openSUSE:Tools'
Expand All @@ -44,13 +44,13 @@
end

it 'should be able to delete' do
within("div#personal-navigation") do
click_link('Home Project')
within("#left-navigation") do
click_link('Your Home Project')
end
within("table#packages-table") do
click_link('build')
end
click_link('Delete package')
click_link('Delete Package')
expect(page).to have_content('Do you really want to delete this package?')
click_button('Delete')
expect(page).to have_content('Package was successfully removed.')
Expand Down
7 changes: 4 additions & 3 deletions dist/t/spec/spec_helper.rb
Expand Up @@ -42,12 +42,13 @@ def login
fill_in 'user-password', with: 'opensuse'
click_button('Log In')
end
expect(page).to have_link('link-to-user-home')
expect(page).to have_link('top-navigation-profile-dropdown')
end

def logout
within("#personal-navigation") do
click_link('top-navigation-profile-dropdown')
within("#top-navigation-area") do
click_link('Logout')
end
expect(page).to have_no_link('link-to-user-home')
expect(page).to have_no_link('top-navigation-profile-dropdown')
end

0 comments on commit 7bd4ab9

Please sign in to comment.