-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
Add E2E test for converting boolean type to text type #1182
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1182 +/- ##
=======================================
Coverage 93.39% 93.39%
=======================================
Files 113 113
Lines 4332 4332
=======================================
Hits 4046 4046
Misses 286 286
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
''' statement = "\n SELECT c.oid\n FROM pg_catalog.pg_class c\n LEFT JOIN pg_catalog.pg_namespace n O...(c.oid))\n AND c.relname = %(table_name)s AND c.relkind in\n ('r', 'v', 'm', 'f', 'p')\n "
E sqlalchemy.exc.OperationalError: (psycopg2.errors.AdminShutdown) terminating connection due to administrator command /usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py:717: OperationalError self = Engine(postgresql://mathesar:***@mathesar_db/mathesar_db_test)
/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py:3211: self = <sqlalchemy.pool.impl.QueuePool object at 0x7f76afd938e0>
/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py:307: cls = <class 'sqlalchemy.pool.base._ConnectionFairy'>
/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py:767: cls = <class 'sqlalchemy.pool.base._ConnectionRecord'>
/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py:430: self = <sqlalchemy.util.langhelpers.safe_reraise object at 0x7f7697ba8940>
/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py:70:
/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py:207: cls = <class 'sqlalchemy.pool.base._ConnectionRecord'>
/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py:427: self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f76ae6160d0>
/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py:552: self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f76ae6160d0>
/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py:611: self = <sqlalchemy.util.langhelpers.safe_reraise object at 0x7f7697ba8a60>
/usr/local/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py:70:
/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py:207: self = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f76ae6160d0>
/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py:605: connection_record = <sqlalchemy.pool.base._ConnectionRecord object at 0x7f76ae6160d0>
/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/create.py:578: self = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x7f76afd93580>
/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py:584: dsn = "host=mathesar_db user=mathesar password=mathesar options='-c timezone=utc -c lc_monetary=en_US.UTF-8' dbname=mathesar_db_test"
E psycopg2.OperationalError: FATAL: database "mathesar_db_test" does not exist /usr/local/lib/python3.9/site-packages/psycopg2/init.py:127: OperationalError The above exception was the direct cause of the following exception: create_schema = <function create_schema.._create_schema at 0x7f76ac24bee0>
mathesar/tests/integration/conftest.py:65: mathesar/tests/integration/conftest.py:43: in _create_schema dsn = "host=mathesar_db user=mathesar password=mathesar options='-c timezone=utc -c lc_monetary=en_US.UTF-8' dbname=mathesar_db_test"
E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: database "mathesar_db_test" does not exist /usr/local/lib/python3.9/site-packages/psycopg2/init.py:127: OperationalError self = <sqlalchemy.future.engine.Connection object at 0x7f76afa312b0>
/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py:1770: self = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x7f76afe78880>
E psycopg2.errors.InvalidCatalogName: database "mathesar_db_test" does not exist /usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py:717: InvalidCatalogName The above exception was the direct cause of the following exception:
conftest.py:28: /usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py:280: in execute self = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x7f76afe78880>
E sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InvalidCatalogName) database "mathesar_db_test" does not exist /usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py:717: ProgrammingError page =
mathesar/tests/integration/test_imports.py:9: /usr/local/lib/python3.9/site-packages/playwright/sync_api/_generated.py:7985: in click self = <playwright._impl._connection.Channel object at 0x7f76ac512460>
E playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. /usr/local/lib/python3.9/site-packages/playwright/_impl/_connection.py:63: TimeoutError page =
mathesar/tests/integration/test_imports.py:20: /usr/local/lib/python3.9/site-packages/playwright/sync_api/_generated.py:7985: in click self = <playwright._impl._connection.Channel object at 0x7f76ac4243a0>
E playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. /usr/local/lib/python3.9/site-packages/playwright/_impl/_connection.py:63: TimeoutError page =
mathesar/tests/integration/test_schemas.py:9: /usr/local/lib/python3.9/site-packages/playwright/sync_api/_generated.py:7985: in click self = <playwright._impl._connection.Channel object at 0x7f76ac18d310>
E playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. /usr/local/lib/python3.9/site-packages/playwright/_impl/_connection.py:63: TimeoutError page =
mathesar/tests/integration/test_tables.py:9: /usr/local/lib/python3.9/site-packages/playwright/sync_api/_generated.py:7985: in click self = <playwright._impl._connection.Channel object at 0x7f76ac5697c0>
E playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. /usr/local/lib/python3.9/site-packages/playwright/_impl/_connection.py:63: TimeoutError page =
mathesar/tests/integration/test_tables.py:17: /usr/local/lib/python3.9/site-packages/playwright/sync_api/_generated.py:7985: in click self = <playwright._impl._connection.Channel object at 0x7f76ac7a0eb0>
E playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. /usr/local/lib/python3.9/site-packages/playwright/_impl/_connection.py:63: TimeoutError ../usr/local/lib/python3.9/site-packages/rest_framework_friendly_errors/settings.py:18 -- Docs: https://docs.pytest.org/en/stable/warnings.html |
@sahilsaini110 Since this PR isn't fully ready, I'm marking it as a draft. Feel free to @ anyone directly for help. |
@ManishShah120 may you please help me with this issue |
Ok, trying. |
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')") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_convert_boolean_col_to_text_col(page, patent_schema, base_schema_url):
pass patent_schema
as the argument.
Also
28 page.fill("textarea", "foo\ntrue\nfalse\nfalse\ntrue")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things look good, could you try doing the above suggestion once. In my case after doing the changes it worked, i.e., the test passed.
def base_schema_url(patent_schema, live_server): | ||
return f"{live_server}/{patent_schema.database.name}/{patent_schema.id}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't do these changes too, so try once undoing it.
Hello @ManishShah120 I have tried the above changes but still errors are there. |
Ohh, I see. there must be other reason then!! |
This should be unblocked now. |
@sahilsaini110 I'm following up since it's been a few days since this PR was updated, are you still working on this? |
yes I am, will try to resolve all the checks and put them for review again. |
3512335
to
f0c5539
Compare
@ManishShah120 may you please check why still this check is failing. |
f0c5539
to
bf67654
Compare
I'm closing this pull request and starting a new one because this one has a lot of commits and is causing unnecessary work to be messed up. |
Fixes #1127
Added E2E test to convert col type from boolean to text type.
Technical details
Screenshots
Additional Context
mathesar_types
to full-fill some of the important db functions to work with e2e integ Testing #1168Checklist
Update index.md
).master
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin