question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can we please overwrite query commands

See original GitHub issue

What would you like?

Cypress v12 designated several query commands, and now prevents me from overwriting them. Which broke my plugins https://github.com/bahmutov/cypress-if/issues/58 and https://github.com/bahmutov/cypress-aliases/issues/17 Can we please allow overwriting queries, I promise to use it for good

Cypress.Commands.overwrite('as', ...)

Why is this needed?

I keep track of information or change behavior of several query commands in my plugins

Other

No response

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:39
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

8reactions
muratkeremozcancommented, Dec 9, 2022

cypress-if and cypress-aliases are so core that I wish they were a part of the main code base.

5reactions
KonstantinxVxcommented, Dec 15, 2022

For those that would like to see this feature, can you please add a comment on why overriding a query is needed vs adding a custom query. We are interested in use-cases on why this is desirable beyond it preventing overriding existing queries for the sake of re-using the command name.

In my case, I overwrite .contains() command by adding regex for ignoring special symbols and pointing the default selector if none is provided.

Read more comments on GitHub >

github_iconTop Results From Across the Web

significance of insert overwrite query at the end of snowflake ...
This obviously creates tablename with from tablename2 where x = y. INSERT OVERWRITE INTO databasename. tablename SELECT DISTINCT * FROM ...
Read more >
Error while running Insert overwrite query on hive table
Hello Experts, We have identified that 2 records have been duplicated in our hive tables. We have taken the - 320536.
Read more >
INSERT OVERWRITE - Spark 3.0.0-preview Documentation
The INSERT OVERWRITE statement overwrites the existing data in the table using the new values. The inserted rows can be specified by value...
Read more >
CREATE VIEW - Amazon Redshift
One application of late-binding views is to query both Amazon Redshift and Redshift Spectrum tables. For example, you can use the UNLOAD command...
Read more >
az storage blob | Microsoft Learn
Please specify one of the following authentication parameters for your ... If neither are present, the command will try to query the storage...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found