Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select + testing #183

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ context( "User can view and claim through static QR url", function() {

// Claim POAP
cy.get( 'a#static-print-qr-claim-button' ).click()
cy.contains( `Collecting your POAP` )

// Claim succeeded
cy.contains( `successfully collected` )
Expand Down
22 changes: 12 additions & 10 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,20 @@ Cypress.Commands.add( 'create_kiosk', ( code_amount = 'one', anti_farming_mode =

// Select no anti-farming
if( anti_farming_mode == 'background' ) {
cy.get( '#event-create-game-enabled' ).click( { force: true } )
cy.get( '#event-create-game-enabled-0' ).click( { force: true } )

cy.get( '#event-create-game-enabled' ).should( 'exist' )
cy.get( '#event-create-game-enabled' ).select( 0, { force: true } )
}

// Game based anti-farming
if( anti_farming_mode == 'game' ) {
// Select YES to anti-farming
cy.get( '#event-create-game-enabled' ).click( { force: true } )
cy.get( '#event-create-game-enabled-1' ).click( { force: true } )
cy.get( '#event-create-game-enabled' ).should( 'exist' )
cy.get( '#event-create-game-enabled' ).select( 1, { force: true } )
// Select anti-farming timing (10s)
cy.get( '#event-create-game-duration' ).click( { force: true } )
cy.get( '#event-create-game-duration-1' ).click( { force: true } )

cy.get( '#event-create-game-duration' ).should( 'exist' )
cy.get( '#event-create-game-duration' ).select( 1, { force: true } )
cy.log( 'Game time selected: 10s AKA 2 game turns' )
}

Expand All @@ -125,8 +127,8 @@ Cypress.Commands.add( 'create_kiosk', ( code_amount = 'one', anti_farming_mode =
}

// Enable naive mode
cy.get( '#event-create-game-enabled' ).click( { force: true } )
cy.get( '#event-create-game-enabled-2' ).click( { force: true } )
cy.get( '#event-create-game-enabled' ).should( 'exist' )
cy.get( '#event-create-game-enabled' ).select( 2, { force: true } )

// Add custom css to the event
cy.get( "#event-create-css" ).clear().type( `body { opacity: 0.99; }`, { parseSpecialCharSequences: false } )
Expand Down Expand Up @@ -157,8 +159,8 @@ Cypress.Commands.add( 'create_kiosk', ( code_amount = 'one', anti_farming_mode =
cy.get( '#event-create-layout-container' ).click( { force: true } )
}

cy.get( "#event-create-collect-emails" ).click( { force: true } )
cy.get( "#event-create-collect-emails-1" ).click( { force: true } )
cy.get( '#event-create-collect-emails' ).should( 'exist' )
cy.get( '#event-create-collect-emails' ).select( 1, { force: true } )
cy.get( '#event-create-custom-baseurl' ).should( 'not.exist' )
}

Expand Down
Loading
Loading