Commit graph

40 commits

Author SHA1 Message Date
Ankush Menat
5c17f9ad79
Merge pull request #15661 from gavindsouza/thumbnail-for-images
fix: Thumbnail for external images (from URL)
2022-02-02 12:21:06 +05:30
Gavin D'souza
897b8a5b66 test: Add test for hosting binary file using StaticPage resolver 2022-01-19 19:30:08 +05:30
Gavin D'souza
227dc26707 Merge branch 'develop' of github.com:frappe/frappe into set_value-refactor 2022-01-17 14:04:13 +05:30
Gavin D'souza
3052808048 fix: Don't cast to str if None or Falsy
* refactor: use get_single_value instead of set_value(blah, None, blah1)
* User.reload in test_home_page to combat what happens locally
2022-01-10 15:05:57 +05:30
Conor
40ba1ac9ba fix: Postgres Compatibility
* Handle inconsistencies in type handling in DatabaseQuery & Database
  APIs
* Update incompatible queries with frappe.qb notation
* Fixed use cases discovered by failing ERPNext CI tests

fix: db independent syntax for user_type

fix: handle postgres datetime values

feat: add ability to auto commit on db inserts

feat: add ability to escape underscore in postgres

fix: handle missing data in test runner bootstrapping

fix: db independent syntax for queries

fix: refactor to use qb

fix: update cache for language

fix: use pluck in email_queue

Co-authored-by: gavin <gavin18d@gmail.com>

fix: don't auto insert on tests for make_property_setter

fix: remove auto_commit in custom_field insertion

fix: remove auto_commit functionality

fix: review comments

fix: revert link validation

fix: style suggestion for readability

Co-authored-by: gavin <gavin18d@gmail.com>

fix: revert .lower() in link validation

fix: add rollback for setup_wizard

Revert "fix: add rollback for setup_wizard"

This reverts commit 83b3b0913db17718ccd5edae01858cff15603829.

Revert "feat: add ability to escape underscore in postgres"

This reverts commit 8ed9c2aa3306438e94bb813f60e65b416d0b947b.

fix: more concise representation of order fields

Co-authored-by: gavin <gavin18d@gmail.com>
2022-01-07 10:44:57 +05:30
Gavin D'souza
c1db7649eb test: Delete from Access Log before each website test
This should fix flaky test_printview_page which fails due to name
collision while creating access log documents
2021-10-27 14:37:19 +05:30
Gavin D'souza
f08faf151c test(website): Clear db.value_cache on tearDown 2021-10-22 18:18:14 +05:30
Gavin D'souza
a575cff8a7 fix: Retry flaky test_printview_page if errored 2021-10-19 12:35:55 +05:30
Faris Ansari
7a34c542c1 test: safe_render 2021-08-03 12:40:48 +05:30
Suraj Shetty
fccd19a44c test: Add test to validate minified js load 2021-07-03 14:13:16 +05:30
Suraj Shetty
4363e51c6d test: Fix improper tests for website rendering 2021-07-01 22:10:02 +05:30
Suraj Shetty
a93bb67030 test: Add test case to validate raw file load 2021-07-01 22:08:15 +05:30
Suraj Shetty
9ad276767f test: Reset no_cache flag 2021-06-24 13:30:11 +05:30
Suraj Shetty
62684a70c1 test: Clear website cache after changing look_for_sidebar flag 2021-06-24 12:05:24 +05:30
Suraj Shetty
090c604b0a test: Add test cases to validate caching 2021-06-24 12:01:04 +05:30
Suraj Shetty
e83e80c6af test: Move tests to correct test file 2021-06-24 10:23:07 +05:30
Suraj Shetty
6f3e6fee82 test: Add test to check ability to use get_context without context object 2021-06-24 10:22:27 +05:30
Suraj Shetty
1ef83ea15f test: Add printview page test 2021-06-04 11:50:03 +05:30
Suraj Shetty
2d8c6c1710 Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-06-03 11:43:28 +05:30
Suraj Shetty
2544964501 test: Add test case to validate custom page renderer 2021-06-03 10:41:22 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Suraj Shetty
78206bea8f test: Clear hook cache after updating hook 2021-05-25 16:39:48 +05:30
Suraj Shetty
ca56b21290 test: Check all cases of setting homepage 2021-05-25 15:01:20 +05:30
Suraj Shetty
9429d06a17 refactor: Remove reduntant code
- Use Error & NotFound page as required
2021-05-11 16:44:50 +05:30
Suraj Shetty
e101105bce refactor: Import get_response instead of using serve.get_response 2021-05-11 10:41:18 +05:30
Suraj Shetty
b39b5effbf Merge branch 'develop' of https://github.com/frappe/frappe into refactor-website 2021-05-11 10:38:04 +05:30
Ankush Menat
a077466b1e
chore: replace assertEquals with alias assertEqual
`assertEquals` has been deprecated, while not fully removed it will
still keep giving warnings in tests / CI.

ref: https://docs.python.org/3/library/unittest.html#deprecated-aliases
2021-05-06 21:16:22 +05:30
Suraj Shetty
30659b9ee2 feat: Option to consider query string while writing website redirect
- if match_with_query_string is true in a website redirect rule, system will try to match the regex with the result of route + query_string
2021-03-11 10:29:12 +05:30
Rushabh Mehta
e79e142061 fix(minor): fix some tests and merge old and new website tests 2021-02-15 17:43:17 +05:30
barredterra
1930993675 test: login-css is no longer in login.html 2020-09-10 14:49:31 +02:00
Rushabh Mehta
137df8290b fix(sider): fix sider issues 2020-08-17 09:41:54 +05:30
Rushabh Mehta
b0f2af0ac5 fix(tests): add tests for home page 2020-08-17 09:41:54 +05:30
Gavin D'souza
450f5c3785 chore: moved 'get_html_for_route' to frappe.utils 2019-11-29 20:42:25 +05:30
Gavin D'souza
aa1e698acf chore: cleanup redundant function definitions, sort imports 2019-11-29 18:00:40 +05:30
Faris Ansari
11ad92a21f feat: Website Redirects 2019-05-07 11:32:28 +05:30
Faris Ansari
b61a37a233 fix: Notification test in Postgres (#7044) 2019-03-08 20:47:21 +05:30
Chinmay Pai
825b0120fa fix(login): redirect user from login page if already logged in (#6689)
* fix(login): redirect user from login page if already logged in

the user should not be able to access the login page if a user session already exists. closes #6500.

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>

* fix(test-website): fix website test

what is the point in writing tests if they don't really work/function as intended?

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>

* fix(regex): do not replace '\' in rules

that defeats the entire purpose of creating rules, wtf?

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>

* fix(test_website): change user using set_user()

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>

* redirect: prefix string with r to escape string literals

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-12-31 13:46:55 +05:30
Rushabh Mehta
90188a99c5
[feature] add website_redirects hook (#5692) 2018-06-20 12:10:07 +05:30
Achilles Rasquinha
c26c741fec fix travis test 2018-03-13 00:39:58 +05:30
Rushabh Mehta
5e3bcbe01f [tests] added basic tests for page and generator 2016-06-27 11:50:04 +05:30