2021-09-02 17:03:19 +00:00
|
|
|
describe('Editor- Toggle switch widget', () => {
|
|
|
|
|
beforeEach(() => {
|
|
|
|
|
//read login data from fixtures
|
|
|
|
|
cy.fixture('login-data').then(function (testdata) {
|
2021-09-12 04:22:29 +00:00
|
|
|
cy.login(testdata.email, testdata.password);
|
|
|
|
|
});
|
|
|
|
|
cy.wait(1000);
|
|
|
|
|
cy.createAppIfEmptyDashboard();
|
|
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.get('.badge').contains('Edit').click();
|
|
|
|
|
cy.get('title').should('have.text', 'ToolJet - Dashboard');
|
|
|
|
|
});
|
2021-09-02 17:03:19 +00:00
|
|
|
|
|
|
|
|
it('should be able to drag and drop button to canvas', () => {
|
2021-09-12 04:22:29 +00:00
|
|
|
cy.get('input[placeholder="Search…"]').type('toggle');
|
2021-09-02 17:03:19 +00:00
|
|
|
|
2021-09-12 04:22:29 +00:00
|
|
|
cy.get('.draggable-box').contains('Toggle Switch').drag('.real-canvas', { force: true, position: 'topLeft' });
|
2021-09-02 17:03:19 +00:00
|
|
|
});
|
2021-09-12 04:22:29 +00:00
|
|
|
});
|