Skip to content

Commit

Permalink
lint: auto fix with eslint (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwajiehao committed Jun 7, 2021
1 parent 923892d commit 9df3943
Show file tree
Hide file tree
Showing 24 changed files with 3,763 additions and 2,574 deletions.
290 changes: 173 additions & 117 deletions cypress/integration/editPage.spec.js

Large diffs are not rendered by default.

415 changes: 262 additions & 153 deletions cypress/integration/files.spec.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions cypress/integration/homepage.spec.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
describe('Login flow', () => {
const CMS_BASEURL = Cypress.env('BASEURL')
const LOGIN_BUTTON_TEXT = 'Login with GitHub'
const GITHUB_LOGIN_URL = 'https://github.com/login'
describe("Login flow", () => {
const CMS_BASEURL = Cypress.env("BASEURL")
const LOGIN_BUTTON_TEXT = "Login with GitHub"
const GITHUB_LOGIN_URL = "https://github.com/login"

it('Home page should have login button', () => {
it("Home page should have login button", () => {
cy.visit(CMS_BASEURL)
cy.get('button').should('have.text', LOGIN_BUTTON_TEXT)
cy.get("button").should("have.text", LOGIN_BUTTON_TEXT)
})

it('Login button should redirect to GitHub login on click', () => {
it("Login button should redirect to GitHub login on click", () => {
cy.visit(CMS_BASEURL)

// This is necessary to prevent the frontend from throwing the 401 error from the backend.
// TODO: We should handle this properly in the axios interceptor.
cy.on('uncaught:exception', (err, runnable) => {
cy.on("uncaught:exception", (err, runnable) => {
// returning false here prevents Cypress from failing the test
return false
})

cy.contains(LOGIN_BUTTON_TEXT).click()
cy.url().should('include', GITHUB_LOGIN_URL)
cy.url().should("include", GITHUB_LOGIN_URL)
})
})
})
387 changes: 242 additions & 145 deletions cypress/integration/images.spec.js

Large diffs are not rendered by default.

866 changes: 544 additions & 322 deletions cypress/integration/pages.spec.js

Large diffs are not rendered by default.

0 comments on commit 9df3943

Please sign in to comment.