mirror of
https://github.com/chinchang/web-maker.git
synced 2025-01-16 20:08:15 +01:00
add interface tests
This commit is contained in:
parent
cb4d19d05c
commit
fa7150b24f
@ -1 +1,3 @@
|
||||
{}
|
||||
{
|
||||
"chromeWebSecurity": false
|
||||
}
|
||||
|
@ -32,4 +32,20 @@ describe('Testing interfaces', () => {
|
||||
});
|
||||
cy.get('.modal__content').should('not.exist');
|
||||
});
|
||||
|
||||
it('Save button click should save the current work with a notification.', () => {
|
||||
cy.get('#htmlCodeEl').type('Hello');
|
||||
|
||||
cy.on('window:confirm', text => {
|
||||
expect(text).to.contains('Do you still want to continue saving locally?');
|
||||
});
|
||||
|
||||
cy.get('#saveBtn').click();
|
||||
|
||||
cy.then(() => {
|
||||
const ls = JSON.parse(localStorage.getItem('code'));
|
||||
expect(ls).to.be.not.null;
|
||||
expect(ls['title']).to.contain('Untitled');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user