mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #34060 from overleaf/oa-timeout-cta
[web] Compile timeout CTA GitOrigin-RevId: c1dd014150964ffec1b556943f572d3e5a8069ce
This commit is contained in:
@@ -14,20 +14,6 @@ describe('start free trial button', function () {
|
||||
getMeta('ol-ExposedSettings').isOverleaf = true
|
||||
})
|
||||
|
||||
it('renders the button with default text', function () {
|
||||
cy.mount(
|
||||
<SplitTestProvider>
|
||||
<StartFreeTrialButton source="cypress-test" />
|
||||
</SplitTestProvider>
|
||||
)
|
||||
|
||||
cy.wait('@event-paywall-prompt')
|
||||
.its('request.body.paywall-type')
|
||||
.should('eq', 'cypress-test')
|
||||
|
||||
cy.get('button').contains('Start Free Trial!')
|
||||
})
|
||||
|
||||
it('renders the button with custom text', function () {
|
||||
cy.mount(
|
||||
<SplitTestProvider>
|
||||
@@ -53,13 +39,15 @@ describe('start free trial button', function () {
|
||||
variant: 'danger',
|
||||
size: 'lg',
|
||||
}}
|
||||
/>
|
||||
>
|
||||
Start free trial
|
||||
</StartFreeTrialButton>
|
||||
</SplitTestProvider>
|
||||
)
|
||||
|
||||
cy.wait('@event-paywall-prompt')
|
||||
|
||||
cy.get('button.btn.btn-danger.btn-lg').contains('Start Free Trial!')
|
||||
cy.get('button.btn.btn-danger.btn-lg').contains('Start free trial')
|
||||
})
|
||||
|
||||
it('renders the button with custom class', function () {
|
||||
@@ -68,7 +56,9 @@ describe('start free trial button', function () {
|
||||
<StartFreeTrialButton
|
||||
source="cypress-test"
|
||||
buttonProps={{ className: 'ct-test-class' }}
|
||||
/>
|
||||
>
|
||||
Start free trial
|
||||
</StartFreeTrialButton>
|
||||
</SplitTestProvider>
|
||||
)
|
||||
|
||||
@@ -76,14 +66,16 @@ describe('start free trial button', function () {
|
||||
.its('request.body.paywall-type')
|
||||
.should('eq', 'cypress-test')
|
||||
|
||||
cy.get('.ct-test-class').contains('Start Free Trial!')
|
||||
cy.get('.ct-test-class').contains('Start free trial')
|
||||
})
|
||||
|
||||
it('calls onClick callback and opens a new tab to the subscription page on click', function () {
|
||||
const onClickStub = cy.stub()
|
||||
cy.mount(
|
||||
<SplitTestProvider>
|
||||
<StartFreeTrialButton source="cypress-test" handleClick={onClickStub} />
|
||||
<StartFreeTrialButton source="cypress-test" handleClick={onClickStub}>
|
||||
Start free trial
|
||||
</StartFreeTrialButton>
|
||||
</SplitTestProvider>
|
||||
)
|
||||
|
||||
@@ -92,7 +84,7 @@ describe('start free trial button', function () {
|
||||
cy.window().then(win => {
|
||||
cy.stub(win, 'open').as('Open')
|
||||
})
|
||||
cy.get('button.btn').contains('Start Free Trial!').click()
|
||||
cy.get('button.btn').contains('Start free trial').click()
|
||||
|
||||
cy.wrap(null).then(() => {
|
||||
cy.wait('@event-paywall-click')
|
||||
|
||||
Reference in New Issue
Block a user