mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 17:36:14 -04:00
tests: test to see if I can have multiple cypress clients collaborating at once
This commit is contained in:
parent
92a42520ee
commit
89a661b448
2 changed files with 69 additions and 0 deletions
23
src/tests/frontend/cypress/integration/collaborate.js
Normal file
23
src/tests/frontend/cypress/integration/collaborate.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
Cypress.Commands.add('iframe', {prevSubject: 'element'},
|
||||
($iframe) => new Cypress.Promise((resolve) => {
|
||||
$iframe.ready(() => {
|
||||
resolve($iframe.contents().find('body'));
|
||||
});
|
||||
}));
|
||||
|
||||
describe(__filename, () => {
|
||||
it('Pad content exists', () => {
|
||||
cy.visit('http://127.0.0.1:9001/p/collab');
|
||||
cy.wait(10000); // wait for Minified JS to be built...
|
||||
cy.get('iframe[name="ace_outer"]', {timeout: 10000}).iframe()
|
||||
.find('.line-number:first')
|
||||
.should('have.text', '1');
|
||||
cy.get('iframe[name="ace_outer"]').iframe()
|
||||
.find('iframe[name="ace_inner"]').iframe()
|
||||
.find('.ace-line:first')
|
||||
.should('be.visible')
|
||||
.should('have.text', 'Welcome to Etherpad!');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue