Skip to content

Commit

Permalink
Add E2E test for converting boolean type to text type
Browse files Browse the repository at this point in the history
  • Loading branch information
sahilsaini authored and sahilsaini1107 committed Apr 28, 2022
1 parent 246ad98 commit bf67654
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mathesar/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def table_with_all_types(schema, create_column_with_display_options):


@pytest.fixture
def base_schema_url(schema, live_server):
return f"{live_server}/{schema.database.name}/{schema.id}"
def base_schema_url(patent_schema, live_server):
return f"{live_server}/{patent_schema.database.name}/{patent_schema.id}"


@pytest.fixture
Expand Down
15 changes: 15 additions & 0 deletions mathesar/tests/integration/test_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,18 @@ def test_group_by_column(page, go_to_patents_data_table):
expect(locator_group_count).not_to_be_visible()
expect(locator_group_header).not_to_be_visible()
expect(page.locator("button:has-text('Group')")).to_be_visible()


def test_convert_boolean_col_to_text_col(page, base_schema_url):
page.goto(base_schema_url)
page.click("[aria-label='New Table']")
page.click("button:has-text('Import Data')")
page.click("text=Copy and Paste Text")
page.fill("textarea", "foo,bar\ntrue,false")
page.click("button:has-text('Continue')")
page.click("button:has-text('Finish Import')")
page.click("button:has-text('foo')")
page.click("button:has-text('Boolean')")
page.click("text=T Text")
page.click("button:has-text('Save')")
page.locator(".dropdown .container .section .btn:has-text('Text')")

0 comments on commit bf67654

Please sign in to comment.