-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #438 from masakudamatsu/tiptap
Use Tiptap for text editor in place of Slate.js
- Loading branch information
Showing
25 changed files
with
2,441 additions
and
768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import {buttonLabel} from '../../src/utils/uiCopies'; | ||
|
||
const placeName = '出逢ひ茶屋おせん'; | ||
describe('Editor feature', () => { | ||
beforeEach(() => { | ||
cy.log('Resetting the database'); | ||
cy.exec('npx prisma migrate reset --force'); // https://docs.cypress.io/guides/end-to-end-testing/testing-your-app#Seeding-data | ||
cy.log('Setting up'); | ||
cy.auth('subscribed_user2', { | ||
username: Cypress.env('auth0UserSubscribed2'), | ||
password: Cypress.env('auth0PassSubscribed2'), | ||
}); | ||
cy.visit('/'); | ||
cy.waitForMapToLoad(); | ||
cy.log('Opening the editor'); | ||
cy.findByRole('button', {name: placeName}).click(); | ||
cy.findByRole('button', {name: buttonLabel.edit}).click(); | ||
}); | ||
it(`Saving a note without place name will show 'Unnamed place' as place name`, () => { | ||
cy.log('Preparing for deleting the whole place name'); | ||
const del = '{del}'; | ||
let keystroke = ''; | ||
for (let i = 0; i < placeName.length; i++) { | ||
keystroke = del + keystroke; | ||
} | ||
cy.log('Deleting place name and saving the note...'); | ||
cy.findByRole('textbox').type(keystroke); | ||
cy.findByText(placeName).should('not.exist'); // verify if above commands work | ||
cy.findByRole('button', {name: buttonLabel.saveEdit}).click(); | ||
cy.log(`...shows 'Unnamed place' as its place name`); | ||
cy.findByText('Unnamed place').should('be.visible'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
43c8314
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
my-ideal-map – ./
www.my-ideal-map.app
my-ideal-map.vercel.app
my-ideal-map-masakudamatsu.vercel.app
my-ideal-map.app
my-ideal-map-git-main-masakudamatsu.vercel.app