Skip to content
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

Release #933

Merged
merged 36 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fcad23c
feat: allow title to use chained actions
Soare-Robert-Daniel Mar 28, 2024
1103ca7
feat: chained action tagify for feed title field
Soare-Robert-Daniel Mar 28, 2024
294c291
Merge branch 'development' into fix/title-with-chain-actions
Soare-Robert-Daniel Mar 29, 2024
585cb34
refactor: remove the simplex tag mix for title field
Soare-Robert-Daniel Mar 29, 2024
085d05f
Merge branch 'development' into fix/title-with-chain-actions
Soare-Robert-Daniel Mar 29, 2024
dd4d6e7
chore: minor
Soare-Robert-Daniel Mar 29, 2024
ff57b5b
chore: build
Soare-Robert-Daniel Mar 29, 2024
9cf9c57
Merge branch 'development' into fix/title-with-chain-actions
Soare-Robert-Daniel Mar 29, 2024
925ad29
Merge branch 'development' into fix/title-with-chain-actions
Soare-Robert-Daniel Apr 12, 2024
e71fb4f
chore: add e2e test for chained actions
Soare-Robert-Daniel Apr 12, 2024
fd26678
chore: combine test and block formbricks in e2e env
Soare-Robert-Daniel Apr 12, 2024
6b7b867
chore: tweak
Soare-Robert-Daniel Apr 12, 2024
c2d5216
Sync branch [skip ci]
pirate-bot Apr 15, 2024
cc9d025
Sync branch [skip ci]
pirate-bot Apr 15, 2024
4d9567c
Merge branch 'development' into fix/title-with-chain-actions
Soare-Robert-Daniel Apr 16, 2024
0f8d13c
fix: image import forn non-ASCII URLs
preda-bogdan Apr 17, 2024
510d320
Better checking for default image for the RSS Block (#929)
Soare-Robert-Daniel Apr 18, 2024
6517936
feat: enable float widget from sdk
preda-bogdan Apr 18, 2024
e388ce9
Merge branch 'development' into fix/title-with-chain-actions
Soare-Robert-Daniel Apr 19, 2024
e629f5c
chore(deps-dev): bump phpcompatibility/phpcompatibility-wp
dependabot[bot] Apr 29, 2024
40acd78
fix: change item_date to convert to site timezone on import
preda-bogdan May 13, 2024
b9225ec
chore(deps): bump codeinwp/themeisle-sdk from 3.3.18 to 3.3.22
dependabot[bot] May 20, 2024
1690611
fix: do not reuse global fallback img
Soare-Robert-Daniel May 20, 2024
079628c
chore: comments
Soare-Robert-Daniel May 21, 2024
d634dbb
chore: console.log
Soare-Robert-Daniel May 21, 2024
b987a2b
fix: processing order
Soare-Robert-Daniel May 22, 2024
6834e53
fix: use the user defined custom image tag
Soare-Robert-Daniel May 27, 2024
1daf2ed
fix: E2E test image tag
Soare-Robert-Daniel May 27, 2024
3a06eb9
Merge pull request #913 from Codeinwp/fix/title-with-chain-actions
vytisbulkevicius May 30, 2024
c3aaaaa
Merge pull request #934 from Codeinwp/feat/enable_float_widget
vytisbulkevicius May 30, 2024
a9e78d6
Merge pull request #936 from Codeinwp/dependabot/composer/development…
vytisbulkevicius May 30, 2024
8ddf302
Merge pull request #939 from Codeinwp/fix/import_timezone
vytisbulkevicius May 30, 2024
802cfaf
Merge pull request #940 from Codeinwp/dependabot/composer/development…
vytisbulkevicius May 30, 2024
958e2b2
Merge pull request #941 from Codeinwp/fix/global-fallback-img
vytisbulkevicius May 30, 2024
8355268
Merge pull request #930 from Codeinwp/fix/image_import_non_ascii
vytisbulkevicius May 30, 2024
794270e
Merge pull request #944 from Codeinwp/fix/custom-image-tag-import
vytisbulkevicius May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ cypress/videos/*
cypress/screenshots/*
cypress/integration/localhost*
cypress/fixtures
cypress.env.json
cypress.env.json
.phpunit.result.cache
121 changes: 87 additions & 34 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ module.exports = defineConfig({
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
pageLoadTimeout : 300000,
},
blockHosts: [
'app.formbricks.com'
],
})
84 changes: 72 additions & 12 deletions cypress/e2e/default/import_feed_free.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,72 @@ describe('Test Free - Import Feed', function() {
cy.get('.fz-tabs-menu li a').should('have.length', settings.tabs);
})

it('Create/Verify/Run import', function() {
it('Check chained actions insertion for title', function() {
// Create a new import.
cy.visit('/wp-admin/post-new.php?post_type=feedzy_imports');

// Fill up the form
cy.get('#post_title').clear().type( 'Chained actions: ' + feed.url );
cy.get('#feedzy-import-source').clear().type( feed.url );
cy.get('#feedzy-import-source').next('.fz-input-group-append').find('.add-outside-tags').click();

// Open the Map Content tab
cy.get('#fz-import-map-content > .feedzy-accordion-item__button').click();

// Clear the title field.
cy.get(':nth-child(4) > .fz-right > .fz-form-group > .fz-input-group > .fz-input-group-left > .fz-group > .tagify > .tagify__input').type('{selectall}{backspace}');

// Add chained actions for title field.
cy.get(':nth-child(4) > .fz-right > .fz-form-group > .fz-input-group > .fz-input-group-right > .dropdown > .btn').click();
cy.get(':nth-child(4) > .fz-right > .fz-form-group > .fz-input-group > .fz-input-group-right > .dropdown > .dropdown-menu > [data-field-tag="item_title"] > small').click(); // Select the [#item_title] tag.

// Add a chained action.
cy.get('.fz-action-relative > .components-button').click();
cy.get('.popover-action-list > ul > :nth-child(1)').click(); // Select the "Trim content" action.

// Add another chained action.
cy.get('.fz-action-relative > .components-button').click();
cy.get('.popover-action-list > ul > :nth-child(3)').click(); // Select the "Search and Replace" action.

// Save actions.
cy.get('.fz-save-action').click();

// Save the serialized data directly to the input field. (The Tagify lib used for UI does not update the input field based on Cypress click actions).
cy.get('.tagify__input > .tagify__tag a').invoke('attr', 'data-actions').then((serializedActions) => {
cy.get('[name="feedzy_meta_data[import_post_title]"]').clear({force: true}).invoke('val', '[[{"value": "' + serializedActions + '"}]]' ).blur({force: true});
});

// Save the import.
cy.get('button[type="submit"][name="save"]').scrollIntoView().click({force:true});

// Reopen the import.
cy.visit('/wp-admin/edit.php?post_type=feedzy_imports');
cy.get('tr:nth-of-type(1) .row-title').click();

// Open the Map Content tab
cy.get('#fz-import-map-content > .feedzy-accordion-item__button').click();

// Check the saved actions.
cy.get('.tagify__input > .tagify__tag').should('be.visible');
cy.get('.tagify__input > .tagify__tag a').invoke('attr', 'data-actions').then((serializedActions) => {
expect(serializedActions).to.include('item_title');
expect(serializedActions).to.include('trim');
expect(serializedActions).to.include('search_replace');

// Check if we have right actions.
const actions = JSON.parse(decodeURIComponent(serializedActions));

expect(actions).to.have.length(2);
expect(actions[0].id).to.equal('trim');
expect(actions[0].tag).to.equal('item_title');

expect(actions[1].id).to.equal('search_replace');
expect(actions[1].tag).to.equal('item_title');
} );

})

it('Check the Create/Verify/Run workflow for feed import', function() {
// 1. CREATE
cy.visit('/wp-admin/post-new.php?post_type=feedzy_imports');

Expand Down Expand Up @@ -54,7 +119,7 @@ describe('Test Free - Import Feed', function() {

cy.get('[name="feedzy_meta_data[import_post_title]"]').clear({force: true}).invoke('val', PREFIX + feed.title).blur({force: true});
cy.get('[name="feedzy_meta_data[import_post_content]"]').clear({force: true}).invoke('val', PREFIX + feed.fullcontent.content + feed.content).blur({force: true});
cy.get('[name="feedzy_meta_data[import_post_featured_img]"]').clear({force: true}).invoke('val', feed.image.url).blur({force: true});
cy.get('[name="feedzy_meta_data[import_post_featured_img]"]').clear({force: true}).invoke('val', feed.image.tag).blur({force: true});

// check disallowd magic tags
const tags = feed.tags.disallowed;
Expand Down Expand Up @@ -84,18 +149,15 @@ describe('Test Free - Import Feed', function() {

// show a notice.
//cy.get('div.notice.feedzy-error-critical').should('be.visible');
})

it('Update the new import with VALID url', function() {

cy.visit('/wp-admin/edit.php?post_type=feedzy_imports');

cy.get('tr:nth-of-type(1) .row-title').click();


// fill up the form
cy.get('#post_title').clear().type( feed.url );
cy.get('#feedzy-import-source').clear().type( feed.url );
cy.get('#feedzy-import-source').next('.fz-input-group-append').find('.add-outside-tags').click();


cy.get('button[type="submit"][name="save"]').scrollIntoView().click({force:true});

// check if the import has been setup
Expand All @@ -117,12 +179,12 @@ describe('Test Free - Import Feed', function() {
cy.get('#feedzy_post_terms').invoke('show').then( () => {
cy.get('#feedzy_post_terms option:selected').should('have.length', feed.taxonomy.length);
});

cy.get('[name="feedzy_meta_data[import_post_title]"]').should('have.value', PREFIX + feed.title);
cy.get('[name="feedzy_meta_data[import_post_content]"]').should('have.value', PREFIX + feed.fullcontent.content + feed.content + '\n');

// image from URL
cy.get('[name="feedzy_meta_data[import_post_featured_img]"]').should('have.value', feed.image.url);
cy.get('[name="feedzy_meta_data[import_post_featured_img]"]').should('have.value', feed.image.tag);

// publish
cy.get('button[type="submit"][name="publish"]').scrollIntoView().click({force:true});
Expand Down Expand Up @@ -254,6 +316,4 @@ describe('Test Free - Import Feed', function() {
cy.get('.wp-block-post-author-name .wp-block-post-author-name__link:contains("wordpress")').should('exist');

})


})
Loading
Loading