|
@@ -51,4 +51,17 @@ describe('modal', () => {
|
|
|
// cy.get('button[aria-label=close]').tab({ shift: true });
|
|
|
// cy.contains('确定').should('be.focused');
|
|
|
});
|
|
|
+
|
|
|
+ it('Full screen', () => {
|
|
|
+ cy.visit("http://localhost:6006/iframe.html?id=modal--full-screen&viewMode=story");
|
|
|
+ // 测试 classname 为 .semi-modal-content-fullScreen 的高度和 classname 为 .semi-modal-mask 高度一致
|
|
|
+ cy.get(".semi-button").click();
|
|
|
+ cy.get('.semi-modal-content-fullScreen').then($content => {
|
|
|
+ const contentHeight = $content[0].getBoundingClientRect().height;
|
|
|
+ cy.get('.semi-modal-mask').then($mask => {
|
|
|
+ const maskHeight = $mask[0].getBoundingClientRect().height;
|
|
|
+ expect(contentHeight).to.be.equal(maskHeight);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|