Skip to content

Update test code for 6.4.0 #57

Open
@esciara

Description

@esciara

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions