public class

TableAssertions

extends AbstractFuncTestUtil
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.AbstractFuncTestUtil
     ↳ com.atlassian.jira.functest.framework.assertions.TableAssertions

Class Overview

Used to make assertions about web Tables.

Summary

[Expand]
Inherited Fields
From class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
Public Constructors
TableAssertions(WebTester tester, JIRAEnvironmentData environmentData)
Public Methods
void assertTableCellHasText(WebTable webTable, int row, int column, String text)
Asserts that the particular table cell contains the text specified.
void assertTableContainsRow(WebTable webTable, String[] expectedRow)
This method asserts that the given table contains AT LEAST ONE copy of the given row.
void assertTableContainsRowCount(WebTable webTable, String[] expectedRow, int expectedCount)
Asserts that the given table contains the expected number of copies of the given row.
void assertTableContainsRowOnce(WebTable webTable, Object[] expectedRow)
This method asserts that the given table contains EXACTLY ONE copy of the given row.
void assertTableContainsRowOnce(WebTable webTable, Object[] expectedRow, boolean exactCellSearching)
This method asserts that the given table contains EXACTLY ONE copy of the given row.
void assertTableRowEquals(WebTable table, int row, Object[] expectedRow)
Assert that the specified row of the table is equal to the expectedRow.
void assertTableRowEqualsCollapsed(WebTable table, int row, Object[] expectedRow)
Assert that the specified row of the table is equal to the expectedRow with whitespace collapsed.
WebTable getWebTable(String tableSummaryOrId)
Gets a WebTable by summury or ID.
[Expand]
Inherited Methods
From class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
From class java.lang.Object
From interface com.atlassian.jira.testkit.client.log.FuncTestLogger

Public Constructors

public TableAssertions (WebTester tester, JIRAEnvironmentData environmentData)

Public Methods

public void assertTableCellHasText (WebTable webTable, int row, int column, String text)

Asserts that the particular table cell contains the text specified.

Parameters
webTable the web table
row the row index (zero-based)
column the column index (zero-based)
text the text to find

public void assertTableContainsRow (WebTable webTable, String[] expectedRow)

This method asserts that the given table contains AT LEAST ONE copy of the given row. For a more strict test, use assertTableContainsRowOnce(com.meterware.httpunit.WebTable, Object[]).

Parameters
webTable The webTable under tests
expectedRow the row we expect to find.

public void assertTableContainsRowCount (WebTable webTable, String[] expectedRow, int expectedCount)

Asserts that the given table contains the expected number of copies of the given row.

Parameters
webTable The webTable under tests
expectedRow the row we expect to find exactly one copy of.
expectedCount The number of copies of this row we expect to find.

public void assertTableContainsRowOnce (WebTable webTable, Object[] expectedRow)

This method asserts that the given table contains EXACTLY ONE copy of the given row.

Parameters
webTable The webTable under tests
expectedRow the row we expect to find exactly one copy of.

public void assertTableContainsRowOnce (WebTable webTable, Object[] expectedRow, boolean exactCellSearching)

This method asserts that the given table contains EXACTLY ONE copy of the given row.

Parameters
webTable The webTable under tests
expectedRow the row we expect to find exactly one copy of.
exactCellSearching set to true if cell contents should match exactly (equals); false for fuzzily (contains)

public void assertTableRowEquals (WebTable table, int row, Object[] expectedRow)

Assert that the specified row of the table is equal to the expectedRow. Equality for individual cells is determined by com.atlassian.jira.functest.framework.assertions.TableAssertions.StrictWhitespaceContainsChecker

Parameters
table table to look up the row
row the row number of the table to compare
expectedRow the expected row to match

public void assertTableRowEqualsCollapsed (WebTable table, int row, Object[] expectedRow)

Assert that the specified row of the table is equal to the expectedRow with whitespace collapsed. Equality for individual cells is determined by EqualsChecker.

Parameters
table table to look up the row
row the row number of the table to compare
expectedRow the expected row to match with whitespace collapsed.

public WebTable getWebTable (String tableSummaryOrId)

Gets a WebTable by summury or ID.

Parameters
tableSummaryOrId Table ID (or summary - whatever that is)
Returns
  • a WebTable by summury or ID.