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

Remove @Ignore for working test #268

Merged
merged 2 commits into from
Nov 21, 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 @@ -3,42 +3,38 @@ package functionaltests

import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration
import org.testcontainers.images.builder.Transferable
import spock.lang.PendingFeature

/**
*/
@Integration(applicationClass = Application)
class UploadControllerSpec extends ContainerGebSpec {

@PendingFeature(reason='text is null')
@PendingFeature(reason='https://github.com/grails/grails-core/issues/13849')
void "Test file upload"() {
when:"When go to an upload page"
go "/upload/index"
go "/upload/index"

def f = File.createTempFile("uploadtest", "txt")
f.deleteOnExit()
f.text = "Test upload"
def form = $('#myForm')
getContainer().copyFileToContainer(Transferable.of("Test upload", 0777), "/test.txt")
def form = $('#myForm')

form.myFile = f.absolutePath
$('#input1').click()
form.myFile = "/test.txt"
$('#input1').click()

then:"The file is uploaded"
$('p').text() == 'Test upload'

$('p').text() == 'Test upload'
}

@PendingFeature(reason='text is null')
@PendingFeature(reason='https://github.com/grails/grails-core/issues/13849')
void "Test file upload parameters"() {
when:"When go to an upload page"
go "/upload/index"

def f = File.createTempFile("uploadtest", "txt")
f.deleteOnExit()
f.text = "Test upload"
getContainer().copyFileToContainer(Transferable.of("Test upload", 0777), "/test.txt")
def form = $('#myForm2')

form.myFile = f.absolutePath
form.myFile = "/test.txt"
$('#input2').click()

then:"The file is uploaded"
Expand Down
3 changes: 0 additions & 3 deletions app1/src/test/groovy/functionaltests/BookHibernateSpec.groovy
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package functionaltests

import spock.lang.Ignore

class BookHibernateSpec extends grails.test.hibernate.HibernateSpec {
def setup() {
new Book(title: 'foo').save()
}

@Ignore('Either class [functionaltests.Book] is not a domain class or GORM has not been initialized correctly or has already been shutdown. Ensure GORM is loaded and configured correctly before calling any methods on a GORM entity.')
void "Test that dynamic finders work"() {
expect:"The book validates"
Book.count() == 1
Expand Down
Loading