Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test code for 6.4.0 #57

Open
esciara opened this issue Sep 22, 2017 · 0 comments
Open

Update test code for 6.4.0 #57

esciara opened this issue Sep 22, 2017 · 0 comments

Comments

@esciara
Copy link

esciara commented Sep 22, 2017

Won't have time to do a pull request for this in a while, but I thought I share this information if someone else can do it whilst I can't.

Here is the code that needs changing, (I tested on another project I am working on), at least for the Postgres case. Changes still need to be made for the other databases setups.

Might be good to find a way to check whether version <6.4.0 or >=6.4.0, and trigger the right code to do the tests properly.

So here we go:

it { is_expected.to have_current_path %r{/setup/setupdbchoice-start.action} }
it { is_expected.to have_css 'form[name=standardform]' }
it { is_expected.to have_css 'form[name=embeddedform]' }

has to be replaced by:

      it { is_expected.to have_css 'form[name=setupdbchoice]' }
      it { is_expected.to have_css 'div.select-database-choice-box[data-database-choice=custom]' }
      it { is_expected.to have_css 'div.select-database-choice-box[data-database-choice=embedded]' }
      it { is_expected.to have_button 'Next' }

And

before :all do
within 'form[name=standardform]' do
select 'PostgreSQL', from: 'dbChoiceSelect'
click_button 'External Database'
wait_for_page
end
end

has to be replaced by:

  before :all do
    within 'form[name=setupdbchoice]' do
      find(:css, 'div.select-database-choice-box[data-database-choice=custom]').trigger('click')
      click_button 'Next'
      wait_for_page
    end
  end

  it { is_expected.to have_current_path %r{/setup/setupdbtype-start.action} }
  it { is_expected.to have_css 'form[name=setupdbtype]' }
  it { is_expected.to have_css 'select[name=dbChoiceSelect]' }
  it { is_expected.to have_button 'Next' }

  describe 'selecting PostgreSQL as database' do
    before :all do
      within 'form[name=setupdbtype]' do
        select 'PostgreSQL', from: 'dbChoiceSelect'
        click_button 'Next'
        wait_for_page
      end
    end

    it { is_expected.to have_button 'Direct JDBC' }
  end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant