-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3889 from novuhq/stacked-tenants-support
Stacked PR's Branch for Tenants Support
- Loading branch information
Showing
49 changed files
with
981 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/api/src/app/tenant/usecases/create-tenant/create-tenant.command.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/api/src/app/tenant/usecases/delete-tenant/delete-tenant.command.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
apps/api/src/app/tenant/usecases/update-tenant/update-tenant.command.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
describe('Tenants Page', function () { | ||
beforeEach(function () { | ||
cy.initializeSession().as('session'); | ||
}); | ||
|
||
it('should display empty tenants state', function () { | ||
cy.visit('/tenants'); | ||
|
||
cy.getByTestId('no-tenant-placeholder').contains('Add the first tenant for the'); | ||
}); | ||
|
||
it('should add new tenant', function () { | ||
createTenant(); | ||
|
||
cy.visit('/tenants'); | ||
|
||
cy.getByTestId('tenants-list-table').find('td:nth-child(1)').contains('Test Tenant'); | ||
cy.getByTestId('tenants-list-table').find('td:nth-child(2)').contains('test-tenant'); | ||
}); | ||
|
||
it('should update tenant', function () { | ||
createTenant(); | ||
|
||
//update tenant name | ||
cy.getByTestId('tenants-list-table') | ||
.find('tr') | ||
.eq(1) | ||
.click() | ||
.then(() => { | ||
cy.getByTestId('tenant-name').clear().type('New Name'); | ||
cy.getByTestId('update-tenant-sidebar-submit').click(); | ||
}); | ||
|
||
cy.getByTestId('tenants-list-table').find('td:nth-child(1)').contains('New Name'); | ||
cy.getByTestId('tenants-list-table').find('td:nth-child(2)').contains('test-tenant'); | ||
|
||
//update tenant identifier | ||
cy.getByTestId('tenants-list-table') | ||
.find('tr') | ||
.eq(1) | ||
.click() | ||
.then(() => { | ||
cy.getByTestId('tenant-identifier').clear().type('new-identifier'); | ||
cy.getByTestId('update-tenant-sidebar-submit').click(); | ||
}); | ||
|
||
cy.getByTestId('tenants-list-table').find('td:nth-child(1)').contains('New Name'); | ||
cy.getByTestId('tenants-list-table').find('td:nth-child(2)').contains('new-identifier'); | ||
}); | ||
|
||
function createTenant() { | ||
cy.visit('/tenants'); | ||
|
||
cy.getByTestId('add-tenant').click(); | ||
cy.getByTestId('tenant-name').type('Test Tenant'); | ||
cy.getByTestId('tenant-custom-properties').type('{"Org Name" : "Nike"}', { parseSpecialCharSequences: false }); | ||
cy.getByTestId('create-tenant-sidebar-submit').click(); | ||
} | ||
}); |
Oops, something went wrong.
b33bae4
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.
🎉 Published on https://dev.widget.novu.co as production
🚀 Deployed on https://64c91092a241581481c83b5e--dev-widget-novu.netlify.app