Skip to content

Commit

Permalink
Update e2e test (#632)
Browse files Browse the repository at this point in the history
* Update e2e

* Small refactor
  • Loading branch information
floreks authored Oct 24, 2022
1 parent 041a66d commit 9656cf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions www/e2e/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export default defineConfig({
chromeWebSecurity: false,
supportFile: 'cypress/support/index.ts',
experimentalSessionAndOrigin: true,
viewportWidth: 1920,
viewportHeight: 1080,
setupNodeEvents(on) {
on('file:preprocessor', webpack(options))
},
Expand Down
6 changes: 3 additions & 3 deletions www/e2e/cypress/pages/login.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Config } from '@config/config'
import { BasePage } from '@pages/base'
import { RootPage } from '@pages/root'
import { Condition } from '@ctypes/condition'
import { Mutations } from '@ctypes/mutations'
import { Queries } from '@ctypes/queries'
import { GQLInterceptor } from '@intercept/graphql'
import { BasePage } from '@pages/base'
import { RootPage } from '@pages/root'

export class LoginPage extends BasePage {
static login(email: string = Config.EMAIL, password: string = Config.PASSWORD): void {
Expand All @@ -19,7 +19,7 @@ export class LoginPage extends BasePage {
this._passwordInput.type(password)
this._continueButton.should(Condition.BeVisible).and(Condition.BeEnabled).click()

GQLInterceptor.wait([Mutations.Login])
GQLInterceptor.wait([Mutations.Login, Queries.Repos, Queries.Tags])
})
}

Expand Down
6 changes: 1 addition & 5 deletions www/e2e/cypress/pages/marketplace.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Application } from '@ctypes/application'
import { Condition } from '@ctypes/condition'
import { Queries } from '@ctypes/queries'
import { GQLInterceptor } from '@intercept/graphql'
import { BasePage } from '@pages/base'

export class MarketplacePage extends BasePage {
Expand All @@ -12,10 +10,8 @@ export class MarketplacePage extends BasePage {
}

static openRepository(name: Application): void {
GQLInterceptor.wait([Queries.Repos, Queries.Tags])

this._contains('a', name)
.should(Condition.BeVisible)
.click()
.click({ force: true })
}
}

0 comments on commit 9656cf5

Please sign in to comment.